diff --git a/Makefile b/Makefile index 19e4d48..f7008e8 100644 --- a/Makefile +++ b/Makefile @@ -48,8 +48,10 @@ dist: $(PACKAGE)-$(VERSION)/src/project.conf \ $(PACKAGE)-$(VERSION)/tests/define.cpp \ $(PACKAGE)-$(VERSION)/tests/if.cpp \ + $(PACKAGE)-$(VERSION)/tests/include.cpp \ $(PACKAGE)-$(VERSION)/tests/Makefile \ $(PACKAGE)-$(VERSION)/tests/cpp.sh \ + $(PACKAGE)-$(VERSION)/tests/include-define.cpp \ $(PACKAGE)-$(VERSION)/tests/project.conf \ $(PACKAGE)-$(VERSION)/Makefile \ $(PACKAGE)-$(VERSION)/COPYING \ diff --git a/tests/Makefile b/tests/Makefile index 100ea7e..8ee2d8c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,4 +1,4 @@ -TARGETS = define.o if.o +TARGETS = define.o if.o include.o PREFIX = /usr/local DESTDIR = BINDIR = $(PREFIX)/bin @@ -19,14 +19,20 @@ define.o_CXXFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CXXFLAGS) if.o_OBJS = if.o if.o_CXXFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CXXFLAGS) +include.o_OBJS = include.o +include.o_CXXFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CXXFLAGS) + define.o: define.cpp cpp.sh $(CXX) $(define.o_CXXFLAGS) -c define.cpp if.o: if.cpp cpp.sh $(CXX) $(if.o_CXXFLAGS) -c if.cpp +include.o: include.cpp cpp.sh + $(CXX) $(include.o_CXXFLAGS) -c include.cpp + clean: - $(RM) -- $(define.o_OBJS) $(if.o_OBJS) + $(RM) -- $(define.o_OBJS) $(if.o_OBJS) $(include.o_OBJS) distclean: clean $(RM) -- $(TARGETS) diff --git a/tests/include-define.cpp b/tests/include-define.cpp new file mode 100644 index 0000000..5256ba1 --- /dev/null +++ b/tests/include-define.cpp @@ -0,0 +1 @@ +#define GOOD diff --git a/tests/include.cpp b/tests/include.cpp new file mode 100644 index 0000000..c60de36 --- /dev/null +++ b/tests/include.cpp @@ -0,0 +1,6 @@ +#include "include-define.cpp" +#ifdef GOOD +#warning good +#else +#error error +#endif diff --git a/tests/project.conf b/tests/project.conf index fdf41bb..3e585ed 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,11 +1,12 @@ -targets=define.o,if.o +targets=define.o,if.o,include.o cxx=./cpp.sh cxxflags= -dist=Makefile,cpp.sh +dist=Makefile,cpp.sh,include-define.cpp [define.o] type=object sources=define.cpp +depends=../src/cpp [define.cpp] depends=cpp.sh @@ -13,6 +14,15 @@ depends=cpp.sh [if.o] type=object sources=if.cpp +depends=../src/cpp [if.cpp] depends=cpp.sh + +[include.o] +type=object +sources=include.cpp +depends=../src/cpp + +[include.cpp] +depends=cpp.sh