From: Keith Packard Date: Thu, 26 Aug 2010 22:57:09 +0000 (-0700) Subject: altos: always rebuild ao_product.c to track git version X-Git-Tag: debian/0.6+373+gcf65c6b~16 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=34055129b4008f6a9833887b12dee39ffa408002;hp=99400fdc0f19ef538fc362dde5c3ab5b7cdac409 altos: always rebuild ao_product.c to track git version The git version is built into ao_product.c and saved in eeprom log files, providing useful diagnostics about the firmware revision used for each flight. However, if ao_product.c isn't recompiled, then the updated version won't be included. Force recompilation of this file each time make is run to ensure that the final output contains an updated version number. Signed-off-by: Keith Packard --- diff --git a/src/Makefile.proto b/src/Makefile.proto index 8bc8b0e1..59a3b8a6 100644 --- a/src/Makefile.proto +++ b/src/Makefile.proto @@ -214,9 +214,11 @@ all: ../$(PROG) ../altitude.h: make-altitude nickle $< > $@ -ao_product.h: ao-make-product.5c +ao_product.h: ao-make-product.5c always $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ +always: + ao_product.rel: ao_product.c ao_product.h $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<