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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:4dc9:: with SMTP id t70mr2654161jad.0.1547572927982; Tue, 15 Jan 2019 09:22:07 -0800 (PST) X-Received: by 2002:a9d:2c22:: with SMTP id f31mr77673otb.4.1547572927839; Tue, 15 Jan 2019 09:22:07 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!q69no79978itb.0!news-out.google.com!v71ni113ita.0!nntp.google.com!q69no79976itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 15 Jan 2019 09:22:07 -0800 (PST) In-Reply-To: <420cf9d0-fec9-4ab5-b5a8-ce8dced55a0d@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=146.5.2.29; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.29 References: <3fd9efd3-2ac5-4711-a1bc-fb75c57d7ffa@googlegroups.com> <2e4fb7e1-f649-43f6-95ec-61edf5a85732@googlegroups.com> <09955674-4095-410d-a688-1ed463ea6b2d@googlegroups.com> <420cf9d0-fec9-4ab5-b5a8-ce8dced55a0d@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6c5eed8b-e736-42ac-9f43-983516c6db0c@googlegroups.com> Subject: Re: New tool "gprexec", basically "make with project file" From: Shark8 Injection-Date: Tue, 15 Jan 2019 17:22:07 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55284 Date: 2019-01-15T09:22:07-08:00 List-Id: On Tuesday, January 15, 2019 at 9:41:04 AM UTC-7, Shark8 wrote: >=20 > Package PROJECT_NAME Sorry, I accidentally submitted the form while composing my example... whic= h is here: Package PROJECT_NAME is Type Archetectures is ( x86, x86_64, ARM, SPARC, MIPS_V ); Type Node_Type is (Storage, Processing); Type Partition_Type is (Active, Passive); Type Compilation_Parameters is record CPUs : Natural :=3D 0; -- Use as many cores as available. Symbols : Boolean :=3D True; -- Don't strip symbols. Target : Archetectures; --... end record; =20 Type Partition( Params : Compilation_Parameters; Style : Partition_Type = ) is record null; --... Other DSA paramters. end record; =20 Type Node( Style : Node_type ) is record Archetecture : Archetectures; case Style is when Storage =3D> null; --...=20 when Processing =3D> null; --... end case; end record; =20 Generic Params : Compilation_Parameters; Procedure Compile; =20 --- CONCEPTUAL GENERIC PACKAGE Generic Partitions : Array (Positive range <>) of not null access Partition; Package Compiler is Procedure Execute; End Compiler; =20 --- CONCEPTUAL BODY FOR COMPILER. Package Body Compiler is Procedure Execute is Begin For P of Partitions loop declare Procedure Make is new Compile( P.Params ); begin Make; end; End loop; End Execute; End Compiler; =20 =20 End PROJECT_NAME; Now, obviously there would have to be standardization -- and it would proba= bly work better if "Archetectures" were a parameter to PROJECT_NAME -- beca= use if all config-packages were generic we could "nest" dependencies: Generic Type STANDARD_PARAM is limited private; -- "Configuration standard param" with Package P1 is new Project_1( STANDARD_PARAM ); with Package P2 is new Project_2( STANDARD_PARAM ); -- P3 depends on P1&2 with Package P3 is new Project_3( STANDARD_PARAM, P1, P2 ); Package Project_4 is -- ... STANDARD STRUCTURE. End Project_4; Now, all of that is operating with the idea of using Ada as a config-langua= ge, which is doable, but perhaps a bit ugly... It might be a bit better to = sit down, think about configurations (esp. in the presence of DSA) and deve= lop an Ada-like language for that. (Perhaps in conjunction with a new Ada I= R similar to DIANA, such that this configuration-description "compiles down= to" the proper generic-nodes which can then be interpreted by the compiler= as the configuration[s] to use; or processed by tools to inter-operate wit= h current tools [ie IR =E2=86=92 (GPR_File, Gnatdist_Configuration_File) fo= r GNAT].)