diff --git a/nufxlib/Makefile.in b/nufxlib/Makefile.in index 0894584..c02d0ec 100644 --- a/nufxlib/Makefile.in +++ b/nufxlib/Makefile.in @@ -31,7 +31,7 @@ OPT = @CFLAGS@ #OPT = @CFLAGS@ -DDEBUG_MSGS #OPT = @CFLAGS@ -DDEBUG_VERBOSE GCC_FLAGS = -Wall -Wwrite-strings -Wstrict-prototypes -Wpointer-arith -Wshadow -CFLAGS = @BUILD_FLAGS@ -I. @DEFS@ +CFLAGS = @BUILD_FLAGS@ -I. @DEFS@ -DOPTFLAGSTR="\"$(OPT)\"" SRCS = Archive.c ArchiveIO.c Bzip2.c Compress.c Crc16.c Debug.c \ Deferred.c Deflate.c Entry.c Expand.c FileIO.c Funnel.c \ @@ -85,11 +85,6 @@ $(SHARED_PRODUCT): $(OBJS) -rm -f $(STATIC_PRODUCT) $(SHARED_PRODUCT) $(CC) @SHARE_FLAGS@ -o $@ $(OBJS) @LIBS@ -# The build date is approximate, the build flags are accurate so long -# as they were changed by touching the makefile. -Version.c: Version.c.in Makefile - (sed -e "s/BUILT/`date`/" -e "s/OPTFLAGS/$(OPT)/" < Version.c.in > Version.c) - clean: (cd samples; make clean) -rm -f *.o core @@ -120,5 +115,8 @@ depend: makedepend -- $(CFLAGS) -I/usr/local/include -- $(SRCS) @(cd samples; unset CFLAGS OBJS; @SET_MAKE@ $(MAKE) depend) +# catch OPTFLAGSTR updates +Version.o: Makefile + # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/nufxlib/Version.c.in b/nufxlib/Version.c similarity index 74% rename from nufxlib/Version.c.in rename to nufxlib/Version.c index edfd143..0951c41 100644 --- a/nufxlib/Version.c.in +++ b/nufxlib/Version.c @@ -3,21 +3,17 @@ * Copyright (C) 2000-2007 by Andy McFadden, All Rights Reserved. * This is free software; you can redistribute it and/or modify it under the * terms of the BSD License, see the file COPYING-LIB. - * - * !!! NOTE !!! - * The file Version.c is automatically generated from Version.c.in. Don't - * edit the .c file if you want your changes to be permanent. */ #include "NufxLibPriv.h" -/* executable was build on or after this date (inserted automatically) */ +/* executable was build on or after this date */ #ifdef __DATE__ static const char gNuBuildDate[] = __DATE__; #else -static const char gNuBuildDate[] = "BUILT"; +static const char gNuBuildDate[] = "??? ?? ????"; #endif -static const char gNuBuildFlags[] = "OPTFLAGS"; +static const char gNuBuildFlags[] = OPTFLAGSTR; /*