diff options
author | Aaron Ball <nullspoon@oper.io> | 2020-03-21 12:58:56 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2020-03-21 12:58:56 -0600 |
commit | cf15673142ac1b405eb04f06c28c2ce6f5836a78 (patch) | |
tree | f6757b2366d268918ec84d738651910b4d34c336 | |
parent | ad3b04713df7ed28922c005ba6346afbd77331c0 (diff) | |
download | luminous-cf15673142ac1b405eb04f06c28c2ce6f5836a78.tar.gz luminous-cf15673142ac1b405eb04f06c28c2ce6f5836a78.tar.xz |
Add compile date to version output
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | src/main.c | 2 |
2 files changed, 7 insertions, 3 deletions
@@ -10,13 +10,17 @@ PATCHLEVEL = 1 SUBLEVEL = 0 EXTRAVERSION = -rc2 -VERSTR = "$(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL))$(EXTRAVERSION)" +VERSTR = "$(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL))$(EXTRAVERSION)" +DATESTR = "$(shell date '+%F')" all: if [ ! -d obj ]; then mkdir obj; fi cc $(CCOPTS) $(DBG) src/config.c -c -o obj/config.o - cc $(CCOPTS) $(DBG) -DVERSTR=$(VERSTR) obj/*.o src/main.c -o luminous + cc $(CCOPTS) $(DBG) \ + -DVERSTR=$(VERSTR) \ + -D DATESTR=$(DATESTR) \ + obj/*.o src/main.c -o luminous install: install -D luminous ${DESTDIR}/${BINDIR}/luminous @@ -61,7 +61,7 @@ void props_new(struct props* p) { * NOTE: Version information is pulled from a macro defined by the Makefile. */ void version_print(FILE* fd) { - fprintf(fd, "luminous %s\n", xstr(VERSTR)); + fprintf(fd, "luminous %s (compiled: %s)\n", xstr(VERSTR), xstr(DATESTR)); } |