source: trunk/include/makefrwd.mif@ 109

Last change on this file since 109 was 60, checked in by Ben Rietbroek, 10 years ago

Fixed building on Linux [v1.1.1-testing]

Of course the lowercasing broke building on Linux.
This commit fixes that.

File size: 2.2 KB
Line 
1###############################################################################
2# makefrwd.mif :: Make Include -- Forwards GNU Make to other Make Utilities. #
3###############################################################################
4
5#
6# A Linux build-environment where "make" would not work is like having
7# a motorbike with an empty tank, flat tires and no wrench in site.
8# Penguins like to "just make" using GNU Make, so let's forward it.
9#
10# This is done by defining 2 targets: 'all:' for when no targets are specified,
11# and '%:' to forward one or more targets.
12#
13# Because GNU Make first looks for 'GNUmakefile', which only includes this
14# forwarder, it will process this file before 'Makefile'.
15# The Make Utility that we forward to will process 'Makefile'.
16#
17# Note that GNU Make processes the '%:' target-list sequentially.
18# So for multiple targets specified on the cli, there is a difference
19# whether make (and thus this front-end) or wmake directly (using Makefile)
20# was used.
21#
22# With wmake the targets are all specified in the Makefile so dependencies
23# are resolved. With GNU Make, each target is seperately forwarded to Makefile
24# wmake, so no dependencies are resolved.
25# This means that a 'make rebuild clean' behaves exactly like that,
26# removing all just built targets, because the 'clean' is performed last.
27# A 'wmake rebuild clean' will not run the last 'clean' because 'rebuild'
28# runs it before doing the build, so 'clean' is considered up-to-date.
29#
30
31#
32# The Make Utility we want to forward to.
33#
34OTHER_MAKE=wmake
35
36#
37# Braces need to be escaped on Linux.
38#
39ifeq "$(SHELL)" "/bin/sh"
40LB = \(
41RB = \)
42LQ = \'
43RQ = \'
44LDQ = \"
45RDQ = \"
46else
47LB = (
48RB = )
49LQ = '
50RQ = '
51LDQ = "
52RDQ = "
53endif
54
55#
56# Show this message to indicate this front-end is active.
57#
58HEADER=GNU Make front-end invoked for $(LQ)$(OTHER_MAKE)$(RQ)
59
60
61
62#
63# Forward to the other Make Utility.
64# Note that the local target 'default:' is not passed so the
65# first target in Makefile is used.
66#
67default:
68 @echo $(HEADER)
69 @$(OTHER_MAKE)
70
71#
72# Forward any target to the other Make Utility.
73# Note that this rule gets processed in sequence for every target
74# specified on the cli.
75#
76%:
77 @echo $(HEADER) with target: $(LQ)$@$(RQ)
78 @$(OTHER_MAKE) -h $@
Note: See TracBrowser for help on using the repository browser.