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: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!proxad.net!feeder2-2.proxad.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: [GNAT] compiler options ignored for sources from ADA_INCLUDE_PATH References: <167c4830-c8f9-48d3-9850-b1772c2aa452@googlegroups.com> <85k3j9fdq1.fsf@stephe-leake.org> <88b6ef16-7473-44a8-95fa-1115be6eac2c@googlegroups.com> Date: Tue, 27 Aug 2013 07:42:16 -0500 Message-ID: <857gf7fgpj.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) Cancel-Lock: sha1:ZvZWwWYqK1MAboCiBGAT+ZnVxuU= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 4336e521c9eabeef2f13032383 X-Received-Bytes: 3506 X-Original-Bytes: 3755 Xref: number.nntp.dca.giganews.com comp.lang.ada:183148 Date: 2013-08-27T07:42:16-05:00 List-Id: gautier_niouzes@hotmail.com writes: > Le lundi 26 août 2013 03:22:14 UTC+2, Stephen Leake a écrit : > >> If you want the same options (sounds like you do), create an 'options' >> project file that just defines some variables, and use those variables >> in the other project files. > > There is a snag here. "The other project files" can be XMLAda and many others. > XMLAda only depends on several project files: > xmlada.gpr > xmlada_dom.gpr > xmlada_input.gpr > xmlada_sax.gpr > xmlada_schema.gpr > xmlada_shared.gpr > xmlada_unicode.gpr > So I would need to to special versions of dozens of project files > (xmlada2.gpr, ...) for having a reference to options.gpr ? Why do you want to change the options in those files? If you really do need to change them, then yes, you need to create lots of new project files. Or just one, that includes all the sources. It depends on why they were split up in the first place. Or edit the existing project files in place; use a .diff so you can apply the same changes in the future. > Then have installation instructions for the users of my project > regarding where to place those special project files ? > Do changes in xmlada2.gpr etc. each time xmlada.gpr etc. are changing ? > I seems a bit complicated (to be polite)... Which is why you should not change options in external packages. You are trusting the package providers to provide good .ad? files; why do you not trust the .gpr files? You could lobby upstream to provide hooks for this, although I'm not clear what that would look like. > It's very fine when all projects are yours, but if you use many > external projects, it is not practical. > Thanks anyway for the explanations. I think I'll stick to > ADA_INCLUDE_PATH and a main project and have a script to precompile > those library items. So you are using one project file to compile all the sources, ignoring the provided package files. That may be dangerous; some of the packages may set options that are important (bug workarounds, for example). You cannot expect users to ignore the project files in xmlada. On Debian, for example, they are available pre-compiled. And the GNAT installer compiles them with the provided project files. GNAT and Debian (and probably most distributions) provide a standard place to put project files, so just "with xmlada;" in your project works. Why are you not doing that? If you really insist on doing things wrong, just create one project file that has Source_Dirs set to the same list as your current ADA_INCLUDE_PATH, and include that project in your project file. -- -- Stephe