summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-10-06 23:20:39 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-10-06 23:20:39 +0000
commit3caebfc076a37ac9a0c295ca05509a0c1598cf1d (patch)
tree499e494583ba4a4cf7b17c011e310aedd236a15b
parentbc2f8eb857c79d6e24b34c3b100abfb79637c7c6 (diff)
downloadmandoc-3caebfc076a37ac9a0c295ca05509a0c1598cf1d.tar.gz
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--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 380d5dd0..fd0bb072 100644
--- a/Makefile
+++ b/Makefile
@@ -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; \