[Gambas-user] gbc3-gb_error.o compiling rev #5670
Tobias Boege
taboege at ...626...
Sun May 26 12:08:58 CEST 2013
On Sun, 26 May 2013, Beno?t Minisini wrote:
> Le 26/05/2013 11:47, Beno?t Minisini a ?crit :
> > Le 26/05/2013 11:13, Tobias Boege a ?crit :
> >>
> >> One thing: trunk_version.h is always up to date since it's .PHONY.
> >
> > This is not what the 'make' documentation says.
> >
> > If a source file depends on a phony target like 'trunk_version.h' (which
> > is the case as soon as the file is explicitely included), then the phony
> > targer is always run.
> >
> > At least it behaves like that on my machine. Did you really check?
> >
> >> But gbx.c
> >> and friends don't depend on trunk_version.h
> >
> > They do, as they include the 'trunk_version.h' file.
> >
>
> Maybe I see your problem; you have to run 'make' from /trunk/main so
> that 'trunk_version.h' is automatically regenerated.
>
Ah, got it. make does not detect these dependencies of included files
automatically[0]. The generated Makefiles use the gcc -M class of switches
to generate .deps/*.Po files which contain this information and are then
pulled in by the Makefiles.
I didn't know this was possible so I felt to add the dependencies by hand.
Will save me some work in other projects :-)
I'll go and revert that commit.
Regards,
Tobi
[0] http://scottmcpeak.com/autodepend/autodepend.html
More information about the User
mailing list