=================================================================== RCS file: /cvs/mandoc/Makefile,v retrieving revision 1.395.2.10 retrieving revision 1.395.2.11 diff -u -p -r1.395.2.10 -r1.395.2.11 --- mandoc/Makefile 2013/12/31 23:19:04 1.395.2.10 +++ mandoc/Makefile 2014/01/04 01:24:48 1.395.2.11 @@ -60,6 +60,14 @@ DBLN = llib-lapropos.ln llib-lmandocdb.ln llib-lman. all: mandoc preconv demandoc $(DBBIN) +TESTSRCS = test-betoh64.c \ + test-fgetln.c \ + test-getsubopt.c \ + test-mmap.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strptime.c + SRCS = Makefile \ NEWS \ TODO \ @@ -160,17 +168,11 @@ SRCS = Makefile \ term.h \ term_ascii.c \ term_ps.c \ - test-betoh64.c \ - test-fgetln.c \ - test-getsubopt.c \ - test-mmap.c \ - test-strlcat.c \ - test-strlcpy.c \ - test-strptime.c \ tree.c \ vol.c \ vol.in \ - whatis.1 + whatis.1 \ + $(TESTSRCS) LIBMAN_OBJS = man.o \ man_hash.o \ @@ -390,50 +392,9 @@ mdocml.tar.gz: $(SRCS) index.html: $(INDEX_OBJS) -config.h: config.h.pre config.h.post +config.h: configure config.h.pre config.h.post $(TESTSRCS) 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; \ - fi; \ - if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-strptime test-strptime.c >> config.log 2>&1; then \ - echo '#define HAVE_STRPTIME'; \ - rm test-strptime; \ - fi; \ - if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-getsubopt test-getsubopt.c >> config.log 2>&1; then \ - echo '#define HAVE_GETSUBOPT'; \ - rm test-getsubopt; \ - fi; \ - if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-strlcat test-strlcat.c >> config.log 2>&1; then \ - echo '#define HAVE_STRLCAT'; \ - rm test-strlcat; \ - fi; \ - if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-mmap test-mmap.c >> config.log 2>&1; then \ - echo '#define HAVE_MMAP'; \ - rm test-mmap; \ - fi; \ - if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-strlcpy test-strlcpy.c >> config.log 2>&1; then \ - echo '#define HAVE_STRLCPY'; \ - rm test-strlcpy; \ - fi; \ - if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-betoh64 test-betoh64.c >> config.log 2>&1; then \ - echo '#define HAVE_BETOH64'; \ - rm test-betoh64; \ - fi; \ - if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-strcasestr test-strcasestr.c >> config.log 2>&1; then \ - echo '#define HAVE_STRCASESTR'; \ - rm test-strcasestr; \ - fi; \ - if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-strsep test-strsep.c >> config.log 2>&1; then \ - echo '#define HAVE_STRSEP'; \ - rm test-strsep; \ - fi; \ - echo; \ - cat config.h.post \ - ) > $@ + CC="$(CC)" CFLAGS="$(CFLAGS)" VERSION="$(VERSION)" ./configure .h.h.html: highlight -I $< >$@