[PATCH] Generate/update a version.h header file.

Bearsh me at bearsh.org
Tue Feb 26 11:54:26 PST 2013


Am 26.02.2013 19:41, schrieb Dirk Hohndel:
> Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> writes:
> 
>> On Tue, 26 Feb 2013, Dirk Hohndel wrote:
>>>
>>> So what I really want is for the Makefile to create the version.h file
>>> with the VERSION from the Makefile
>>
>> So, are you happy with the patch, after considering my comment:
> 
> It does create the version.h file. But the thing that failed for me in
> my attempts appears to fail with this as well...
> 
> I add a #include "version.h" to gtk-gui.c
> 
> I commit something to git. It updates the version. But gtk-gui.o is not
> rebuilt :-(
> 
> So I wonder if this is an issue with the version of make that I'm using...  
> .dep/gtk-gui.o.dep clealy lists version.h and version.h is indeed newer
> than gtk-gui.o
> 
> If I then do make -d to see what it considers it turns out that it never
> considers whetner to rebuild gtk-gui.o based on version.h. So somehow
> the new target breaks the dependency magic that Linus introduced.
> 
> And that's easily proven by running 'make subsurface' in which case it
> does indeed rebuild gtk-gui.o and then subsurface...

for me it just updated the version.h file after calling make. subsequent
calling ended up doing 'nothing' as it stopped once the tho versions
(from git and from version.h) matched

adding:
all: gen_version_file $(NAME)
to the makefile solved the issue, it also rebuild gtk-gui.c once I
change the version...

/martin



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130226/1c8c5137/attachment.pgp>


More information about the subsurface mailing list