created "tests" subdirectory infrastructure
This commit is contained in:
parent
2aefd8d4ec
commit
90d313721f
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,3 +4,5 @@ tags
|
||||
.*.swp
|
||||
*.dep
|
||||
tmpl.*
|
||||
tests/*/itest.cc
|
||||
tests/*/itest.h
|
||||
|
10
Makefile
10
Makefile
@ -46,7 +46,15 @@ tmpl.h: tmpl.cc
|
||||
grep '$*_' $^ | sed -e 's/^/extern /' -e 's/ =.*/;/' >> $@
|
||||
echo '#endif' >> $@
|
||||
|
||||
clean:
|
||||
.PHONY: tests
|
||||
tests: PATH := $(shell pwd):$(PATH)
|
||||
tests: all
|
||||
$(MAKE) -C $@
|
||||
|
||||
tests-clean:
|
||||
$(MAKE) -C tests clean
|
||||
|
||||
clean: tests-clean
|
||||
-rm -f $(TARGET) *.o .*.dep tmpl.cc tmpl.h
|
||||
|
||||
-include $(CXXDEPS)
|
||||
|
14
tests/Makefile
Normal file
14
tests/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
all:
|
||||
for d in *; do \
|
||||
if [ -d $$d ]; then \
|
||||
make -C $$d; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
clean:
|
||||
for d in *; do \
|
||||
if [ -d $$d ]; then \
|
||||
make -C $$d clean; \
|
||||
fi; \
|
||||
done
|
14
tests/build/Makefile
Normal file
14
tests/build/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
TARGET := test
|
||||
I_SOURCE := itest
|
||||
CXXFLAGS := -O2
|
||||
LDFLAGS := -lpcre
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET):
|
||||
imbecile $(I_SOURCE).I
|
||||
$(CXX) -o $@ *.cc $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
-rm -f $(TARGET) *.o $(I_SOURCE).cc $(I_SOURCE).h
|
Loading…
x
Reference in New Issue
Block a user