21 Commits

Author SHA1 Message Date
Vasiliy Fofanov
6bfbcf421b examples: improve Makefiles, mostly style issues
This comes from GitHub PR #115
no-tn-check

Change-Id: Ib11da9355a3e7a59d0d1f81ddfb9c1311fd9fc38
2022-08-08 13:49:16 +02:00
Nicolas Boulenguez
ccf0fe83ef examples/Makefile: remove redundant -o $@ option for gprconfig
Newcomers may not be interested in Make's $@ when learning gprbuild.

This commit hides default.cgpr as much as possible, but another
consistent option is to make the information flow explicit.
`gprconfig -o default.cgpr`
`gprbuild`--config=default.cgpr`
`gprclean --config=default.cgpr`
2022-08-06 18:01:01 +02:00
Nicolas Boulenguez
4b01ddcb7f examples/Makefile: allow the user to pass GPRBUILDFLAGS
For example, GPRBUILDFLAGS=-v is useful to understand what happens
when discovering gprbuild, or for full logs when examples are used as
basic tests.
2022-08-06 18:01:01 +02:00
Nicolas Boulenguez
ca20a85c82 examples/Makefile: explicitly write project names in gprbuild command line
Replace `gprbuild`, `gprbuild -Pfoo`, `gprbuild -Pfoo.gpr` and
`gprbuild foo` with the equivalent `gprbuild foo.gpr`.
Examples are intended for beginners, so an explicit file name is
preferable.
2022-08-06 18:01:01 +02:00
Nicolas Boulenguez
fde9741594 examples/Makefile: gprclean requires default.cgpr like gprbuild 2022-08-06 17:59:58 +02:00
Nicolas Boulenguez
a880f063f4 examples/first_steps/Makefile: stop generating default.cgpr on each make run 2022-08-06 17:18:56 +02:00
Nicolas Boulenguez
34963edb79 examples/Makefile: declare targets as .PHONY instead of depending on force
This is recommended by the GNU Make manual as more efficient and
explicit than the traditional force fake target.
2022-08-06 17:13:45 +02:00
Nicolas Roche
f9c76646dc Remove empty directories and adjust example makefile
Part of P701-009

Change-Id: I5b54b4c81b5fa6e316ef8b0bc482fabfccebfb35
2016-07-01 11:21:32 +02:00
Olivier Ramonat
5e7dc7f8ab Fix gprbuild examples on UNIX
The current working directory is not always in the PATH

Part of LB19-013

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprbuild@198141 936e1b1b-40f2-da11-902a-00137254ae57
2012-11-19 14:31:50 +00:00
Vassiliy Fofanov
5bf989ba03 Do not specify the "default" runtime for Ada, since gprconfig might
not output it if it is the same as one of the named runtimes.
Should fix the examples KC16-043


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprbuild@185008 936e1b1b-40f2-da11-902a-00137254ae57
2012-01-31 16:51:42 +00:00
Emmanuel Briot
2039b4d9d7 Make dependency on gnatpython.internal optional (only needed when
running cross tests, but not on developers' machines)
Add an empty file in empty object directories, since those are not
 properly checked out by git otherwise. This ensure that tests also
 pass when using git.
Part of K124-011

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprbuild@169639 936e1b1b-40f2-da11-902a-00137254ae57
2011-01-24 13:11:37 +00:00
Pascal Obry
26e36a4a47 fix some files permissions.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprbuild@168576 936e1b1b-40f2-da11-902a-00137254ae57
2010-12-21 20:17:42 +00:00
Pascal Obry
99672ce372 Fix file permissions.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprbuild@132388 936e1b1b-40f2-da11-902a-00137254ae57
2008-11-16 15:47:08 +00:00
Cyrille Comar
5b1ddb4204 (gprconfig-knowledge.adb, doc/gprbuild.texi)
Language & Name are now 2 non-mandatory attributes of node <compiler>
 whose value is a regular case-insensitive string (as opposed to a regexp).
 It makes it easier to specify language based rules that do not depend on
 the toolchain such as which dirver to use for linking multi-language
 applications.
(Makefile.in): fix typo in installation of html files
(share/gprconfig/*.xml): support for CYGMING-GCC configuration.
 Rewrite of linker driver preference using the new capabilities above.
(examples/first_steps/c_src/c_main.c): avoid warning.

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprbuild@114931 936e1b1b-40f2-da11-902a-00137254ae57
2007-08-28 16:13:52 +00:00
Tristan Gingold
149055ed32 Makefile updated.
For G713-016


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprbuild@113644 936e1b1b-40f2-da11-902a-00137254ae57
2007-07-18 08:54:13 +00:00
Cyrille Comar
551dfea843 * Makefile:
* Makefile:
* Makefile:
* Makefile:
* Makefile:
* Makefile:
* Makefile:
* compilers.xml:
* linker.xml:
* gprconfig-knowledge.adb:
Prettify the generated configuration files by
  - separate packages by a blank line
  - indent properly all attributes
Do not create ada_runtime.gpr anymore since it is not needed by
gprbuild and update example Makefiles accordingly




git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprbuild@113519 936e1b1b-40f2-da11-902a-00137254ae57
2007-07-13 10:49:50 +00:00
Cyrille Comar
d669c79fe2 normalize Makefiles and generate config files automatically
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprmake@62776 936e1b1b-40f2-da11-902a-00137254ae57
2007-05-11 15:26:16 +00:00
Cyrille Comar
8aa0477263 fix test case
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprmake@43127 936e1b1b-40f2-da11-902a-00137254ae57
2007-03-14 09:51:52 +00:00
Cyrille Comar
ff4f8dfd6e reworked test case
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprmake@43095 936e1b1b-40f2-da11-902a-00137254ae57
2007-03-13 10:16:26 +00:00
Vincent Celier
5944c0dc56 Fix C main: int main, not void vain; no void between bracket when
calling; call adainit and adafinal.


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprmake@42926 936e1b1b-40f2-da11-902a-00137254ae57
2007-03-05 18:57:29 +00:00
Cyrille Comar
cf2ff2d3b6 examples from the ug
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprmake@42924 936e1b1b-40f2-da11-902a-00137254ae57
2007-03-05 17:59:27 +00:00