This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Ada] Support for building Ada utilities to autogenerate files


On Wed, Oct 10, 2001 at 11:57:57AM -0400, Geert Bosch wrote:
> 
> 
> 
> On Wed, 10 Oct 2001, Florian Weimer wrote:
> 
>   Not for the different tools, for both builds of xnmake.
>   
>   All the solutions I had in mind make building xnmake mandatory
>   (i.e. the "touch" trick no longer works), which we do not consider
>   acceptable, I think.
> 
> Wouldn't it be enough to add a dependency of nmake.adb on xnmake.ads?
> This would serialize building of both targets. Does this seem right?

Come to think of it, since Ada already requires GNU make, you ought to
be able to write

nmake.adb% nmake.ads%: sinfo.ads nmake.adt xnmake.adb
	-$(MKDIR) bldtools
	$(CP) $^ bldtools
	(cd bldtools && gnatmake -q xnmake \
	 && ./xnmake -b ../nmake.adb \
	 && ./xnmake -s ../nmake.ads)

which invokes an obscure feature of pattern rules to inform make that
one command builds both targets at once.  (This from memory, and I may
have the notation slightly wrong.)

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]