javascript: support using nodejs as jsshell interpreter.
[wvtest.git] / dotnet / wvtestrules.mk
blob638f43c64c6138b18da2334826e7e0afa5eb7981
1 default: all
3 SHELL=/bin/bash
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
7 # our C# (.cs) files
8 CSCPP=cpp
10 # Rules for generating autodependencies on header files
11 $(patsubst %.cs.E,%.d,$(filter %.cs.E,$(FILES))): %.d: %.cs
12 @echo Generating dependency file $@ for $<
13 @set -e; set -o pipefail; rm -f $@; (\
14 ($(CSCPP) -M -MM -MQ '$@' $(CPPFLAGS) $< && echo Makefile) \
15 | paste -s -d ' ' - && \
16 $(CSCPP) -M -MM -MQ '$<'.E $(CPPFLAGS) $< \
17 ) > $@ \
18 || (rm -f $@ && echo "Error generating dependency file." && exit 1)
20 include $(patsubst %.cs.E,%.d,$(filter %.cs.E,$(FILES)))
22 # Rule for actually preprocessing source files with headers
23 %.cs.E: %.cs
24 @rm -f $@
25 set -o pipefail; $(CSCPP) $(CPPFLAGS) -C -dI $< \
26 | expand -8 \
27 | sed -e 's,^#include,//#include,' \
28 | grep -v '^# [0-9]' \
29 >$@ || (rm -f $@ && exit 1)