5 # cc -E tries to guess by extension what to do with the file.
6 # And it does other weird things. cpp seems to Just Work(tm), so use that for
10 CSFLAGS=/warn:4 /debug
11 #CSFLAGS += /warnaserror
13 TESTRUNNER=$(WVDOTNET)/wvtestrunner.pl
15 # Rules for generating autodependencies on header files
16 $(patsubst %.cs.E,%.d,$(filter %.cs.E,$(FILES))): %.d: %.cs
17 @echo Generating dependency file $@ for $<
18 @set -e; set -o pipefail; rm -f $@; (\
19 ($(CSCPP) -M -MM -MQ '$@' $(CPPFLAGS) $< && echo Makefile) \
20 | paste -s -d ' ' - && \
21 $(CSCPP) -M -MM -MQ '$<'.E $(CPPFLAGS) $< \
23 || (rm -f $@ && echo "Error generating dependency file." && exit 1)
25 include $(patsubst %.cs.E,%.d,$(filter %.cs.E,$(FILES)))
27 # Rule for actually preprocessing source files with headers
30 set -o pipefail; $(CSCPP) $(CPPFLAGS) -C -dI $< \
32 | sed -e 's,^#include,//#include,' \
33 | grep -v '^# [0-9]' \
34 >$@ || (rm -f $@ && exit 1)