aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-10-06 23:17:05 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-10-06 23:17:05 +0000
commit871f887d7494d65a50932f9cc920c6c533454531 (patch)
tree184b8518ac59cd55eb4a99fd002a294a28b9076f
parent15455415b8a562926410bd6af2c9e1e91f062bcd (diff)
downloadmandoc-871f887d7494d65a50932f9cc920c6c533454531.tar.gz
mandoc-871f887d7494d65a50932f9cc920c6c533454531.tar.zst
mandoc-871f887d7494d65a50932f9cc920c6c533454531.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--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f9f33742..31a9b240 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ STATIC = -static
# Linux requires -pthread to statically link with libdb.
#STATIC += -pthread
-CFLAGS += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\""
+CFLAGS += -g -DHAVE_CONFIG_H
CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
PREFIX = /usr/local
WWWPREFIX = /var/www
@@ -390,6 +390,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-fgetln test-fgetln.c >> config.log 2>&1; then \
echo '#define HAVE_FGETLN'; \
rm test-fgetln; \