blob: 48ed195fd941810186cc86adff1f625dba10c4ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# -*- makefile -*-
#
# The rules for building a program.
# I'd rather not create a response file here,
# but since on Win32 we need to munge the paths
# anyway, we might as well.
sourcefile = $(PROGRAM).sources
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
response = $(depsdir)/$(PROGRAM).response
else
response = $(sourcefile)
endif
stampfile = $(depsdir)/$(PROGRAM).stamp
makefrag = $(depsdir)/$(PROGRAM).makefrag
all-local: $(PROGRAM)
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin
$(INSTALL_BIN) $(PROGRAM) $(DESTDIR)$(prefix)/bin
clean-local:
-rm -f *.exe $(BUILT_SOURCES) $(CLEAN_FILES) $(stampfile) $(makefrag)
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
-rm -f $(response)
endif
ifndef HAS_TEST
test-local: $(PROGRAM)
run-test-local:
endif
DISTFILES = $(sourcefile) $(EXTRA_DISTFILES)
dist-local: dist-default
cat $(sourcefile) |xargs -n 20 \
$(SHELL) -c 'for f in $$* ; do \
dest=`dirname $(distdir)/$$f` ; \
$(MKINSTALLDIRS) $$dest && cp $$f $$dest || exit 1 ; \
done' dollar0
# Changing makefile probably means changing the
# sources, so let's be safe and add a Makefile dep
$(PROGRAM): $(makefrag) $(response) $(stampfile)
$(CSCOMPILE) /target:exe /out:$@ $(BUILT_SOURCES) @$(response)
$(makefrag): $(sourcefile)
@echo Creating $@ ...
@echo "HAVE_MAKEFRAG = yes" >$@.new
@echo "$(stampfile): $(BUILT_SOURCES) \\" >>$@.new
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
@cat $@.new |sed -e '$$s, \\$$,,' >$@
@echo -e "\ttouch \$$@" >>$@
@rm -rf $@.new
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
$(response): $(sourcefile)
cat $< |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
endif
-include $(makefrag)
ifndef HAVE_MAKEFRAG
$(stampfile):
touch $@
endif
|