diff options
author | Dmitry Mikhirev | 2014-11-14 18:22:10 +0300 |
---|---|---|
committer | Dmitry Mikhirev | 2014-11-14 18:22:10 +0300 |
commit | 56157c6dbf961d69d1a91a39723d0c68f8f81e82 (patch) | |
tree | 173e200f926748cd67dd660c1e90e1e15d8da8c1 /GNUmakefile | |
parent | 1f913a978aa1d9c1f797623c414752df15ba36ca (diff) | |
download | make_pcre-56157c6dbf961d69d1a91a39723d0c68f8f81e82.tar.gz make_pcre-56157c6dbf961d69d1a91a39723d0c68f8f81e82.tar.bz2 make_pcre-56157c6dbf961d69d1a91a39723d0c68f8f81e82.tar.xz make_pcre-56157c6dbf961d69d1a91a39723d0c68f8f81e82.zip |
added options handling, various fixes
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/GNUmakefile b/GNUmakefile index 91d3616..654e76e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,17 +1,33 @@ --load pcre.so - MAKE_INCLUDE_DIR := $(HOME)/src/make-4.1 CFLAGS += -I$(MAKE_INCLUDE_DIR) +tests = test001 test002 + +-load pcre.so + +.PHONY: check $(tests) clean + pcre.so: CFLAGS += $(shell pcre-config --cflags) pcre.so: LDFLAGS += $(shell pcre-config --libs) pcre.so: pcre.c $(CC) $(CFLAGS) -fPIC $(LDFLAGS) -shared -o $@ $< -ifeq ($(m ^pattern$,pattern), pattern) -check: - @echo test PASSED -else -check: - @echo test FAILED -endif +check: $(tests) + +test001: + @if [ '$(m ^test$,test)' = test ] ; then \ + echo '$@ PASSED'; \ + else \ + echo '$@ FAILED'; \ + fi + +test002: var = st +test002: + @if [ '$(m ^te$(var)$$,test,e)' = test ] ; then \ + echo '$@ PASSED'; \ + else \ + echo '$@ FAILED'; \ + fi + +clean: + $(RM) *.o *.so |