aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Mikhirev2014-11-15 00:05:45 +0300
committerDmitry Mikhirev2014-11-15 00:05:45 +0300
commitc07eaf8a9e097eb0f40a389129060f77db28001d (patch)
tree1bc1cb374631e0de284a12fc0f237aeda0317b13
parent5ddd691b03d55f150596c6963bcb24cd4d2e719a (diff)
downloadmake_pcre-c07eaf8a9e097eb0f40a389129060f77db28001d.tar.gz
make_pcre-c07eaf8a9e097eb0f40a389129060f77db28001d.tar.bz2
make_pcre-c07eaf8a9e097eb0f40a389129060f77db28001d.tar.xz
make_pcre-c07eaf8a9e097eb0f40a389129060f77db28001d.zip
tests robustification
-rw-r--r--GNUmakefile35
1 files changed, 11 insertions, 24 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 038399c..fb71c7f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -5,39 +5,26 @@ tests = test001 test002 test003
-load pcre.so
-.PHONY: check $(tests) clean
+.PHONY: check clean
-pcre.so: CFLAGS += -I$(MAKE_INCLUDE_DIR)
pcre.so: CFLAGS += $(shell pcre-config --cflags)
pcre.so: LDFLAGS += $(shell pcre-config --libs)
pcre.so: pcre.c
- $(CC) $(CFLAGS) -fPIC $(LDFLAGS) -shared -o $@ $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -I$(MAKE_INCLUDE_DIR) -fPIC $(LDFLAGS) -shared -o $@ $<
check: $(tests)
-test001:
- @if [ '$(m ^test$,test)' = test ] ; then \
- echo '$@ PASSED'; \
- else \
- echo '$@ FAILED'; \
- return 1; \
- fi
-
-test002: var = st
-test002:
- @if [ '$(m ^te$(var)$$,test,e)' = test ] ; then \
- echo '$@ PASSED'; \
- else \
- echo '$@ FAILED'; \
- return 1; \
- fi
+test001 = '$(m ^test$,test)' = test
+test002: var = es
+test002 = '$(m ^t$(var)t$$,test,e)' = test
+test003 = '$(m ^t(es)t$,test)$0$1' = testtestes -a -z '$(m a,b)$0$1'
-test003:
- @if [ '$(m te(st),test)$0$1' = testtestst -a -z '$(m a,b)$0$1' ] ; then \
- echo '$@ PASSED'; \
+test%:
+ @if [ $($@) ] ; then \
+ echo '$@ PASSED'; \
else \
- echo '$@ FAILED'; \
- return 1; \
+ echo '$@ FAILED'; \
+ return 1; \
fi
clean: