diff options
author | 2013-10-06 23:20:39 +0000 | |
---|---|---|
committer | 2013-10-06 23:20:39 +0000 | |
commit | 6ca4bfd315b1bf9f621b97cfa4dff5c325b18c17 (patch) | |
tree | fc36394a749c8bf6c72ab95be7fe71c14dcb336d | |
parent | 59fbd41e518c2cae4d2a2ef8ef7800f6cf50c015 (diff) | |
download | mandoc-6ca4bfd315b1bf9f621b97cfa4dff5c325b18c17.tar.gz mandoc-6ca4bfd315b1bf9f621b97cfa4dff5c325b18c17.tar.zst mandoc-6ca4bfd315b1bf9f621b97cfa4dff5c325b18c17.zip |
Put VERSION into config.h.
This makes life easier for downstream maintainers having more than one
Makefile, for example DragonFly and FreeBSD.
Suggested by Franco Fichtner <franco at lastsummer dot de>.
-rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -30,7 +30,7 @@ STATIC = -static # Linux requires -pthread to statically link with libdb. #STATIC += -pthread -CFLAGS += -I/usr/local/include -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\"" +CFLAGS += -I/usr/local/include -g -DHAVE_CONFIG_H CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings PREFIX = /usr/local WWWPREFIX = /var/www @@ -357,6 +357,7 @@ config.h: config.h.pre config.h.post rm -f config.log ( cat config.h.pre; \ echo; \ + echo '#define VERSION "$(VERSION)"'; \ if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-ohash test-ohash.c >> config.log 2>&1; then \ echo '#define HAVE_OHASH'; \ rm test-ohash; \ |