mangen: Set build date externally

Patch build system to allow the build date in the man entry
to be set externally. In Debian it will be set to the latest
debian/changelog entry for reproducibility.
This commit is contained in:
Dhole authored and Pali Rohár committed 2015-06-24 17:46:28 +02:00
1 parent 289d2f22b2
commit 94a2fe0c17
2 files changed
+8 -2

No files matched your search

+3 -1
View File
@@ -3,11 +3,13 @@ include ../config.mk
PREFIX ?= /usr/local PREFIX ?= /usr/local
INSTALL ?= install INSTALL ?= install
BUILD_DATE ?= $(shell LC_ALL=C date '+%b %e %Y')
CC = gcc CC = gcc
CROSS_CC = $(CROSS_COMPILE)$(CC) CROSS_CC = $(CROSS_COMPILE)$(CC)
HOST_CC = $(HOST_COMPILE)$(CC) HOST_CC = $(HOST_COMPILE)$(CC)
CPPFLAGS += -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L CPPFLAGS += -DVERSION=\"$(VERSION)\" -DBUILD_DATE="\"$(BUILD_DATE)\"" -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L
CFLAGS += -W -Wall -O2 -pedantic -std=c99 CFLAGS += -W -Wall -O2 -pedantic -std=c99
LIBS += -lusb LIBS += -lusb
+5 -1
View File
@@ -25,6 +25,10 @@
#define INFO NAME " \\- Open Free Fiasco Firmware Flasher, version " VERSION #define INFO NAME " \\- Open Free Fiasco Firmware Flasher, version " VERSION
#define DESCRIPTION "0xFFFF is Open Free Fiasco Firmware Flasher for Maemo devices. It support generating and unpacking FIASCO images on local computer. Useful for editing Maemo firmware package for future flash. It support via USB flashing any image type to Maemo device and also \"cold\" flashing which means flashing dead device with erased bootloader. There is support for booting kernel via USB without flashing to NAND and also changing configuration of Maemo device (enable/disable R&D mode, changing HW revision strings, ...).\n\n0xFFFF is alternative tool to proprietary Nokia flasher-3.5 and fiasco-gen. 0xFFFF generate compatible FIASCO images and also accept FIASCO images generated by Nokia fiasco-gen." #define DESCRIPTION "0xFFFF is Open Free Fiasco Firmware Flasher for Maemo devices. It support generating and unpacking FIASCO images on local computer. Useful for editing Maemo firmware package for future flash. It support via USB flashing any image type to Maemo device and also \"cold\" flashing which means flashing dead device with erased bootloader. There is support for booting kernel via USB without flashing to NAND and also changing configuration of Maemo device (enable/disable R&D mode, changing HW revision strings, ...).\n\n0xFFFF is alternative tool to proprietary Nokia flasher-3.5 and fiasco-gen. 0xFFFF generate compatible FIASCO images and also accept FIASCO images generated by Nokia fiasco-gen."
#ifndef BUILD_DATE
#define BUILD_DATE __DATE__
#endif
int main() { int main() {
FILE * pipe; FILE * pipe;
@@ -34,7 +38,7 @@ int main() {
if ( ! pipe ) if ( ! pipe )
return 1; return 1;
puts(".TH " NAME " 1 \"" __DATE__ "\" \"" NAME " " VERSION "\""); puts(".TH " NAME " 1 \"" BUILD_DATE "\" \"" NAME " " VERSION "\"");
puts(""); puts("");
puts(".SH NAME"); puts(".SH NAME");