comparison Makefile @ 4:dfd3ddbdb201

Add tests
author Guido Berhoerster <guido+libpws@berhoerster.name>
date Fri, 13 May 2016 14:32:44 +0200
parents 97097b4b6bfb
children 0feba0fea9d0
comparison
equal deleted inserted replaced
3:2b9244d20ecf 4:dfd3ddbdb201
63 --stringparam html.longdesc 0 \ 63 --stringparam html.longdesc 0 \
64 --stringparam ulink.target '' \ 64 --stringparam ulink.target '' \
65 --stringparam docbook.css.source '' \ 65 --stringparam docbook.css.source '' \
66 --stringparam css.decoration 0 \ 66 --stringparam css.decoration 0 \
67 --stringparam default.table.width '100%' 67 --stringparam default.table.width '100%'
68
69 TESTS_OUTPUT_PATH = ./tests/output
68 70
69 define generate-manpage-rule = 71 define generate-manpage-rule =
70 $(addsuffix .%,$(basename $1)): $(addsuffix .%.xml,$(basename $(firstword $1))) docbook-update-source-data.xsl 72 $(addsuffix .%,$(basename $1)): $(addsuffix .%.xml,$(basename $(firstword $1))) docbook-update-source-data.xsl
71 $$(XSLTPROC) \ 73 $$(XSLTPROC) \
72 --xinclude \ 74 --xinclude \
246 $(firstword $(PWS_INIT_MANPAGES)) \ 248 $(firstword $(PWS_INIT_MANPAGES)) \
247 $(firstword $(PWS3_FILE_CREATE_MANPAGES))) 249 $(firstword $(PWS3_FILE_CREATE_MANPAGES)))
248 250
249 .DEFAULT_TARGET = all 251 .DEFAULT_TARGET = all
250 252
251 .PHONY: all clean clobber dist install 253 .PHONY: all clean clobber dist install check
252 254
253 all: $(PWSDUMP_BIN) $(LIBPWS_LIB) $(MANPAGES) 255 all: $(PWSDUMP_BIN) $(LIBPWS_LIB) $(MANPAGES)
254 256
255 doc: $(MANPAGES) $(XHTML_DOCUMENTATION) 257 doc: $(MANPAGES) $(XHTML_DOCUMENTATION)
256 258
360 $(INSTALL.data) $${manpage} \ 362 $(INSTALL.data) $${manpage} \
361 "$(DESTDIR)$(mandir)/man$${manpage##*.}/$${manpage##*/}"; \ 363 "$(DESTDIR)$(mandir)/man$${manpage##*.}/$${manpage##*/}"; \
362 fi \ 364 fi \
363 done 365 done
364 366
367 check: $(PWSDUMP_BIN)
368 rm -rf $(TESTS_OUTPUT_PATH); \
369 SHELL=$(SHELL) PWSDUMP=$(PWSDUMP_BIN) \
370 TESTS_OUTPUT_PATH=$(TESTS_OUTPUT_PATH) $(SHELL) tests/run-tests.sh
371
365 clean: 372 clean:
366 rm -f $(LIBPWS_LIB) $(PWSDUMP_BIN) $(OBJS) $(MANPAGES) \ 373 rm -f $(LIBPWS_LIB) $(PWSDUMP_BIN) $(OBJS) $(MANPAGES) \
367 $(XHTML_DOCUMENTATION) 374 $(XHTML_DOCUMENTATION)
375 rm -rf $(TESTS_OUTPUT_PATH)
368 376
369 clobber: clean 377 clobber: clean
370 rm -f $(patsubst %.o,%.d,$(OBJS)) 378 rm -f $(patsubst %.o,%.d,$(OBJS))
371 379
372 dist: clobber 380 dist: clobber