|
@@ -1303,31 +1303,6 @@ $(CONFIG_LOCAL_NAMED_HEADERS) :
|
1303
|
1303
|
|
1304
|
1304
|
endif
|
1305
|
1305
|
|
1306
|
|
-###############################################################################
|
1307
|
|
-#
|
1308
|
|
-# Auto-incrementing build serial number. Append "bs" to your list of
|
1309
|
|
-# build targets to get a serial number printed at the end of the
|
1310
|
|
-# build. Enable -DBUILD_SERIAL in order to see it when the code runs.
|
1311
|
|
-#
|
1312
|
|
-BUILDSERIAL_H = config/.buildserial.h
|
1313
|
|
-BUILDSERIAL_NOW = config/.buildserial.now
|
1314
|
|
-BUILDSERIAL_NEXT = config/.buildserial.next
|
1315
|
|
-
|
1316
|
|
-$(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT) :
|
1317
|
|
- $(ECHO) 1 > $@
|
1318
|
|
-
|
1319
|
|
-$(BUILDSERIAL_H) : $(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT)
|
1320
|
|
- $(ECHO) '#define BUILD_SERIAL_NUM $(shell cat $<)' > $@
|
1321
|
|
-
|
1322
|
|
-ifeq ($(filter bs,$(MAKECMDGOALS)),bs)
|
1323
|
|
-$(shell diff -q $(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT) > /dev/null || \
|
1324
|
|
- cp -f $(BUILDSERIAL_NEXT) $(BUILDSERIAL_NOW))
|
1325
|
|
-endif
|
1326
|
|
-
|
1327
|
|
-bs : $(BUILDSERIAL_NOW)
|
1328
|
|
- @$(ECHO) $$(( $(shell cat $<) + 1 )) > $(BUILDSERIAL_NEXT)
|
1329
|
|
- @$(ECHO) "Build serial number is $(shell cat $<)"
|
1330
|
|
-
|
1331
|
1306
|
###############################################################################
|
1332
|
1307
|
#
|
1333
|
1308
|
# Build the TAGS file(s) for emacs
|