comparison Makefile @ 36:f9501248b6bd

Add tests
author Guido Berhoerster <guido+pwm@berhoerster.name>
date Wed, 07 Aug 2019 11:28:07 +0200
parents 34ada71ff3e5
children
comparison
equal deleted inserted replaced
35:2a8298bafec2 36:f9501248b6bd
49 XSLTPROC := xsltproc 49 XSLTPROC := xsltproc
50 DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl 50 DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
51 DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \ 51 DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \
52 --stringparam man.copyright.section.enabled 0 52 --stringparam man.copyright.section.enabled 0
53 53
54 TESTS_OUTPUT_PATH = ./tests/output
55
54 define generate-manpage-rule = 56 define generate-manpage-rule =
55 $(addsuffix .%,$(basename $1)): $(addsuffix .%.xml,$(basename $(firstword $1))) docbook-update-source-data.xsl 57 $(addsuffix .%,$(basename $1)): $(addsuffix .%.xml,$(basename $(firstword $1))) docbook-update-source-data.xsl
56 $$(XSLTPROC) \ 58 $$(XSLTPROC) \
57 --xinclude \ 59 --xinclude \
58 --stringparam package $$(PACKAGE) \ 60 --stringparam package $$(PACKAGE) \
177 179
178 MANPAGES = $(PWM_MAN1) $(PWM_CLIP_MAN1) 180 MANPAGES = $(PWM_MAN1) $(PWM_CLIP_MAN1)
179 181
180 .DEFAULT_TARGET = all 182 .DEFAULT_TARGET = all
181 183
182 .PHONY: all clean clobber dist install 184 .PHONY: all check clean clobber dist install
183 185
184 all: $(PWM_BIN) $(PWM_CLIP_BIN) $(MANPAGES) 186 all: $(PWM_BIN) $(PWM_CLIP_BIN) $(MANPAGES)
185 187
186 $(PWM_BIN): XCPPFLAGS += -DPACKAGE=\"$(PACKAGE)\" \ 188 $(PWM_BIN): XCPPFLAGS += -DPACKAGE=\"$(PACKAGE)\" \
187 -DVERSION=\"$(VERSION)\" 189 -DVERSION=\"$(VERSION)\"
273 $(INSTALL.data) $${manpage} \ 275 $(INSTALL.data) $${manpage} \
274 "$(DESTDIR)$(mandir)/man$${manpage##*.}/$${manpage##*/}"; \ 276 "$(DESTDIR)$(mandir)/man$${manpage##*.}/$${manpage##*/}"; \
275 fi \ 277 fi \
276 done 278 done
277 279
280 check: $(PWM_BIN)
281 rm -rf $(TESTS_OUTPUT_PATH); \
282 SHELL=$(SHELL) PWM=./$(PWM_BIN) \
283 TESTS_OUTPUT_PATH=$(TESTS_OUTPUT_PATH) $(SHELL) tests/run-tests.sh
284
278 clean: 285 clean:
279 rm -f $(LIBCOMPAT_LIB) $(LIBPWM_LIB) $(PWM_CLIP_BIN) $(PWM_BIN) \ 286 rm -f $(LIBCOMPAT_LIB) $(LIBPWM_LIB) $(PWM_CLIP_BIN) $(PWM_BIN) \
280 $(OBJS) $(MANPAGES) 287 $(OBJS) $(MANPAGES)
281 288
282 clobber: clean 289 clobber: clean