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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,39bde956b245c191 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.31.165 with SMTP id b5mr19278924pbi.1.1323100317221; Mon, 05 Dec 2011 07:51:57 -0800 (PST) Path: lh20ni72466pbb.0!nntp.google.com!news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news-transit.tcx.org.uk!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: How to nicely distribute a simple Ada library? Date: Mon, 05 Dec 2011 16:51:55 +0100 Organization: Ada @ Home Message-ID: References: <361x89sndsg9$.16ruxrwxud090$.dlg@40tude.net> <4edce1ab$0$6552$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: lkd1vYQ5JOdD3cMja1OGUQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.60 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: news2.google.com comp.lang.ada:14839 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2011-12-05T16:51:55+01:00 List-Id: Le Mon, 05 Dec 2011 16:22:19 +0100, Georg Bauhaus = a =C3=A9crit: > Another reason is obfuscation. Where do you find the build > settings for this software? Somewhere in the sources. > [=E2=80=A6] For readability, on the opposite (see below) > Some software I have seen included -lsomething only because > this was useful on the development platform at some point, > not because the software needed "something". Reply to both you and Dmitry: I like to use it for system library = dependencies. When a platform provides a library which is not optional = because it is part of the standard environment, I like to add a pragma = Linker_Options in bodies. I see three advantages for this: first this is= = clearly visible from body source (especially if specified at the top of = = the source) and then, this applies localization principle (lack of = localization does not help understanding), and then again, if this packa= ge = is not used, then the linker option is automatically dropped (avoid = unneeded dependencies). If multiple package links to the same library, = there is no troubles anyway. Do you (either you or Dmitry) see a serious reason to not do this way ? I did not though about linker options in the large, only about this one:= = specify a library to be linked with the package. The only one issue I know is linker dependency. The pragma Linker_Option= s = arguments syntax is not specified by the standard. I don't know about th= e = syntax used with other linkers than GNU LD. > Perhaps options in sources is a habit imported from some > dialect of Pascal? Be sure, no (I've suffered to much with this to repeat the experience) -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity