summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2010-07-31 18:40:47 +0100
committerReuben Thomas <rrt@sc3d.org>2010-07-31 18:40:47 +0100
commit058df20919490ddbc3b1eb7af05f59c1478d6c2d (patch)
tree8b30c48e413b6320f628259fd974c2d693057f09 /Makefile
parente5447d64af56626025a404e16485a655d5f32960 (diff)
downloadlrexlib-058df20919490ddbc3b1eb7af05f59c1478d6c2d.tar.gz
Simplify the build system, adding the test target to common.mak (and
renaming it “check” for compatibility with GNU autotools), and using a list of library names to perform the top-level build, check and clean targets, rather than hand-written targets for each library.
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile70
1 files changed, 15 insertions, 55 deletions
diff --git a/Makefile b/Makefile
index e5b1e41..7eaa72d 100755
--- a/Makefile
+++ b/Makefile
@@ -1,65 +1,25 @@
# Makefile for lrexlib
-# See src/*.mak for user-definable settings
+# See src/*/Makefile for user-definable settings
-GNU = src/gnu
-PCRE = src/pcre
-POSIX = src/posix
-ONIG = src/oniguruma
-TRE = src/tre
+REGNAMES = gnu pcre posix oniguruma tre
-all: build test
+all: build check
-build: build_gnu build_pcre build_posix build_onig build_tre
+build:
+ @for i in $(REGNAMES); do \
+ make -C src/$$i; \
+ done
-test: test_gnu test_pcre test_posix test_onig test_tre
+check:
+ @for i in $(REGNAMES); do \
+ make -C src/$$i check; \
+ done
-clean: clean_gnu clean_pcre clean_posix clean_onig clean_tre
-
-build_gnu:
- make -C $(GNU)
-
-build_pcre:
- make -C $(PCRE)
-
-build_posix:
- make -C $(POSIX)
-
-build_onig:
- make -C $(ONIG)
-
-build_tre:
- make -C $(TRE)
-
-test_gnu:
- cd test && lua ./runtest.lua -d../$(GNU) gnu
-
-test_pcre:
- cd test && lua ./runtest.lua -d../$(PCRE) pcre
-
-test_posix:
- cd test && lua ./runtest.lua -d../$(POSIX) posix
-
-test_onig:
- cd test && lua ./runtest.lua -d../$(ONIG) onig
-
-test_tre:
- cd test && lua ./runtest.lua -d../$(TRE) tre
-
-clean_gnu:
- make -C $(GNU) clean
-
-clean_pcre:
- make -C $(PCRE) clean
-
-clean_posix:
- make -C $(POSIX) clean
-
-clean_onig:
- make -C $(ONIG) clean
-
-clean_tre:
- make -C $(TRE) clean
+clean:
+ @for i in $(REGNAMES); do \
+ make -C src/$$i clean; \
+ done
dist:
git2cl > ChangeLog