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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Sun, 29 Aug 2010 11:25:35 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <4c77d250$0$7653$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1283095522 31168 192.74.137.71 (29 Aug 2010 15:25:22 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 29 Aug 2010 15:25:22 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:/BYf+67xEj1Chj+RW7Tz1JsDNLE= Xref: g2news1.google.com comp.lang.ada:13817 Date: 2010-08-29T11:25:35-04:00 List-Id: Natasha Kerensikova writes: > On 2010-08-29, Jeffrey Carter wrote: >> On 08/29/2010 03:45 AM, Natasha Kerensikova wrote: >>> >>> I find compiler issues to be the weakest point of Ada: documentation is >>> pretty well hidden, installation is a mess, and there is that >>> project-file stuff which seems almost as complicated as Ada language >>> itself, while being compiler-dependant. Coming for a C world where >>> everything is simpler and well documented in manual pages... >> >> Make files are simple? I still don't understand them completely ... The 'make' language is pretty simple. Programs written in this language (i.e. make files) are often complicated. The gcc make files are a nightmare. Textual macro substitution is just a wrong way to design a language. I once had a bug in a make file, where some macro SOURCE_FILES was set to a list of files in some directory. Turns out some program had evilly put a file called .#something in that directory, so the macro expansion was something like: SOURCE_FILES=this.ada that.ada .#something other.ada which is equivalent to: SOURCE_FILES=this.ada that.ada . because # starts a comment in 'make'. It took me a long time to figure out why other.ada was being ignored. Yuck! And combine that with the idiotic rule that 'ls' doesn't show you files starting with ".", by default. > I depends on what you're trying to with them. I agree that makefiles can > be pretty obscure, but that usually happen when you're trying to make it > do more than it was meant to. > > Now honestly I have not looked into project files yet, so I have no idea > of their expressive power or clarity. You really don't need to understand project files. If you're comfortable with 'make', you can write a very simple make file, like: .PHONY: my_program my_program: gnatmake -g -O0 -gnata -gnato my_program.adb Put all your Ada code in the same directory, and follow the *.ads/*.adb convention. Maybe put the object files in a subdirectory: .PHONY: my_program my_program: mkdir -p obj cd obj ; gnatmake -g -O0 -gnata -gnato -I.. ../my_program.adb (Above code not tested!) Or just write a one-line shell script with the gnatmake command in it. > However project files are specific to Ada, while makefiles have a much > broader use, which makes them more useful as a standard and a more > rewarding time investment. Actually, gprbuild can use project files to build Ada, C, C++, etc. - Bob