On Wed, 2013-03-06 at 20:18 -0800, Chris Li wrote: > > > > This still doesn't recompile lib.o every time. > > > Ah, I finally get it what you mean the lib.o did not compile every > time. Here I add a new header file "version.h" which store the > SPARSE_VERSION. The makefile will regenerate the version.h > if it does not match the current 'git-describe'. Now lib.o will > recompile every time you change git branch. > > Joe, I miss your sign off from the patch. Can you sign off on the patch? It's your patch now, I was just maybe an instigator. Looks good though. If you want: Reviewed-by: Joe Perches <joe@xxxxxxxxxxx> cheers, Joe > @@ -191,7 +199,7 @@ clean: clean-check > rm -f *.[oa] .*.d *.so $(PROGRAMS) $(SLIB_FILE) pre-process.h sparse.pc > > dist: > - @if test "`git describe`" != "v$(VERSION)" ; then \ > + @if test "v$(SPARSE_VERSION)" != "v$(VERSION)" ; then \ > echo 'Update VERSION in the Makefile before running "make dist".' ; \ You might make the makefile read the git version so you don't need to edit Makefile at all. Maybe something like: git describe | cut -f1 -d"-" -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html