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 # 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
) $< \
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
25 set
-o pipefail
; $(CSCPP
) $(CPPFLAGS
) -C
-dI
$< \
27 | sed
-e
's,^#include,//#include,' \
28 | grep
-v
'^# [0-9]' \
29 >$@ ||
(rm -f
$@
&& exit
1)