From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT GPL is proving...educational Date: Mon, 22 Jul 2013 09:52:29 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="d88aa8a0fafe4f7fb3eb325f8f3d97d0"; logging-data="17756"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WxZ/rP+FflEsEyg5jRPr0qv0nUKtBj28=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:sQ+MRgRBW4+ibQBCsGChRkh9/cM= sha1:cTha+3jvPcEAXGEuR4b1451QyUg= Xref: news.eternal-september.org comp.lang.ada:16464 Date: 2013-07-22T09:52:29+01:00 List-Id: Niklas Holsti writes: > Note that AdaCore provides the "gnatchop" tool to split multi-unit > source files into single-unit files following the GNAT default naming > rules. Basically, you say > > gnatchop multi-unit-file-name > > and the resulting single-unit files appear in the working directory. Also, gnatchop[1] has the flags -r generate Source_Reference pragmas referencing original source file and -w overwrite existing filenames which can be used to maintain a multiple-unit source file. I can't see how to make GPS support this, and I can't find whether AdaGIDE will because it's Windows-only; for Emacs, I wrote a minor mode[2] which runs gnatchop -w -r whenever a gnatchop-mode buffer is saved. [1] http://docs.adacore.com/gnat-unw-docs/html/gnat_ugn_9.html#SEC108 [2] https://sourceforge.net/u/simonjwright/gnatchop/wiki/Home/