aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorDmitry Mikhirev2014-11-14 20:37:31 +0300
committerDmitry Mikhirev2014-11-14 20:37:31 +0300
commit5ddd691b03d55f150596c6963bcb24cd4d2e719a (patch)
tree72bae616c74e2ba63b3645a99475070cc852ebf8 /GNUmakefile
parent56157c6dbf961d69d1a91a39723d0c68f8f81e82 (diff)
downloadmake_pcre-5ddd691b03d55f150596c6963bcb24cd4d2e719a.tar.gz
make_pcre-5ddd691b03d55f150596c6963bcb24cd4d2e719a.tar.bz2
make_pcre-5ddd691b03d55f150596c6963bcb24cd4d2e719a.tar.xz
make_pcre-5ddd691b03d55f150596c6963bcb24cd4d2e719a.zip
capture strings to variables $(0), $(1), ...
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 654e76e..038399c 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,12 +1,13 @@
MAKE_INCLUDE_DIR := $(HOME)/src/make-4.1
-CFLAGS += -I$(MAKE_INCLUDE_DIR)
+CFLAGS = -Wall
-tests = test001 test002
+tests = test001 test002 test003
-load pcre.so
.PHONY: check $(tests) 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
@@ -19,6 +20,7 @@ test001:
echo '$@ PASSED'; \
else \
echo '$@ FAILED'; \
+ return 1; \
fi
test002: var = st
@@ -27,6 +29,15 @@ test002:
echo '$@ PASSED'; \
else \
echo '$@ FAILED'; \
+ return 1; \
+ fi
+
+test003:
+ @if [ '$(m te(st),test)$0$1' = testtestst -a -z '$(m a,b)$0$1' ] ; then \
+ echo '$@ PASSED'; \
+ else \
+ echo '$@ FAILED'; \
+ return 1; \
fi
clean: