VirtualBox

source: kBuild/trunk/src/kmk/Makefile.am@ 1109

Last change on this file since 1109 was 1109, checked in by bird, 17 years ago

New feature: if1of and ifn1of (CONFIG_WITH_SET_CONDITIONALS).

  • Property svn:eol-style set to native
File size: 7.5 KB
Line 
1# This is a -*-Makefile-*-, or close enough
2#
3# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
4# Free Software Foundation, Inc.
5# This file is part of GNU Make.
6#
7# GNU Make is free software; you can redistribute it and/or modify it under the
8# terms of the GNU General Public License as published by the Free Software
9# Foundation; either version 2, or (at your option) any later version.
10#
11# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
12# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License along with
16# GNU Make; see the file COPYING. If not, write to the Free Software
17# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
19AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news
20ACLOCAL_AMFLAGS = -I config
21
22MAKE_HOST = @MAKE_HOST@
23
24# Only process if target is MS-Windows
25if WINDOWSENV
26 MAYBE_W32 = w32
27 W32INC = -I $(top_srcdir)/w32/include
28 W32LIB = -Lw32 -lw32
29endif
30
31# we can safely drop doc and po when bootstrapping kmk.
32# SUBDIRS = glob config po doc $(MAYBE_W32)
33SUBDIRS = glob config $(MAYBE_W32)
34
35bin_PROGRAMS = kmk
36
37if USE_CUSTOMS
38 remote = remote-cstms.c
39else
40 remote = remote-stub.c
41endif
42
43
44kmk_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
45 function.c getopt.c getopt1.c implicit.c job.c main.c \
46 misc.c read.c remake.c $(remote) rule.c signame.c \
47 strcache.c variable.c version.c vpath.c hash.c \
48 \
49 kbuild.c \
50 electric.c \
51 \
52 kmkbuiltin.c \
53 kmkbuiltin/append.c \
54 kmkbuiltin/cat.c \
55 kmkbuiltin/cp.c \
56 kmkbuiltin/cp_utils.c \
57 kmkbuiltin/echo.c \
58 kmkbuiltin/install.c \
59 kmkbuiltin/mkdir.c \
60 kmkbuiltin/mv.c \
61 kmkbuiltin/ln.c \
62 kmkbuiltin/printf.c \
63 kmkbuiltin/rm.c \
64 kmkbuiltin/rmdir.c \
65 kmkbuiltin/err.c \
66 kmkbuiltin/setmode.c \
67 kmkbuiltin/strmode.c \
68 kmkbuiltin/strlcpy.c \
69 kmkbuiltin/osdep.c
70
71
72EXTRA_kmk_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
73
74noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
75 debug.h getopt.h gettext.h hash.h
76
77#kmk_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
78kmk_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@
79# Only process if target is MS-Windows
80if WINDOWSENV
81 kmk_LDADD += $(W32LIB)
82endif
83
84man_MANS = make.1
85
86# org - DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
87DEFS = \
88 -DNO_ARCHIVES \
89 -DEXPERIMENTAL \
90 -DCONFIG_WITH_TOUPPER_TOLOWER \
91 -DCONFIG_WITH_EXPLICIT_MULTITARGET \
92 -DCONFIG_WITH_PREPEND_ASSIGNMENT \
93 \
94 -DKMK \
95 -DKMK_HELPERS \
96 -DVARIABLE_HASH \
97 -DCONFIG_NO_DEFAULT_SUFFIXES \
98 -DCONFIG_NO_DEFAULT_PATTERN_RULES \
99 -DCONFIG_NO_DEFAULT_TERMINAL_RULES \
100 -DCONFIG_NO_DEFAULT_SUFFIX_RULES \
101 -DCONFIG_NO_DEFAULT_VARIABLES \
102 -DCONFIG_WITH_EXTENDED_NOTPARALLEL \
103 -DCONFIG_WITH_INCLUDEDEP \
104 -DCONFIG_WITH_VALUE_LENGTH \
105 -DCONFIG_WITH_RSORT \
106 -DCONFIG_WITH_ABSPATHEX \
107 -DCONFIG_WITH_COMPARE \
108 -DCONFIG_WITH_STACK \
109 -DCONFIG_WITH_MATH \
110 -DCONFIG_WITH_XARGS \
111 -DCONFIG_WITH_NANOTS \
112 -DCONFIG_WITH_SET_CONDITIONALS \
113 -DCONFIG_PRETTY_COMMAND_PRINTING \
114 \
115 -DBUILD_PLATFORM=\"$(BUILD_TARGET)\" \
116 -DBUILD_PLATFORM_ARCH=\"$(BUILD_TARGET_ARCH)\" \
117 -DBUILD_PLATFORM_CPU=\"$(BUILD_TARGET_CPU)\" \
118 \
119 -DKBUILD_VERSION_MAJOR=0 \
120 -DKBUILD_VERSION_MINOR=1 \
121 -DKBUILD_VERSION_PATCH=0 \
122 \
123 -DCONFIG_WITH_KMK_BUILTIN \
124 @DEFS@
125
126AM_CPPFLAGS = $(GLOBINC)
127# Only process if target is MS-Windows
128if WINDOWSENV
129 AM_CPPFLAGS += $(W32INC)
130endif
131
132
133# Extra stuff to include in the distribution.
134
135EXTRA_DIST = README build.sh.in $(man_MANS) \
136 README.customs README.OS2 \
137 SCOPTIONS SMakefile \
138 README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
139 README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
140 README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
141 make_msvc_net2003.sln make_msvc_net2003.vcproj \
142 readme.vms makefile.vms makefile.com config.h-vms \
143 vmsdir.h vmsfunctions.c vmsify.c
144
145# This is built during configure, but behind configure's back
146
147DISTCLEANFILES = build.sh
148
149# Forward targets
150
151html:
152 cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
153
154.PHONY: html
155
156# --------------- Internationalization Section
157
158localedir = $(datadir)/locale
159
160# --------------- Local INSTALL Section
161
162# If necessary, change the gid of the app and turn on the setgid flag.
163#
164
165# Whether or not make needs to be installed setgid.
166# The value should be either `true' or `false'.
167# On many systems, the getloadavg function (used to implement the `-l'
168# switch) will not work unless make is installed setgid kmem.
169#
170inst_setgid = @NEED_SETGID@
171
172# Install make setgid to this group so it can get the load average.
173#
174inst_group = @KMEM_GROUP@
175
176install-exec-local:
177 @if $(inst_setgid); then \
178 app=$(DESTDIR)$(bindir)/`echo $(bin_PROGRAMS)|sed '$(transform)'`; \
179 if chgrp $(inst_group) $$app && chmod g+s $$app; then \
180 echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
181 else \
182 echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
183 echo "otherwise the \`-l' option will probably not work."; \
184 echo "You may need special privileges to complete the installation"; \
185 echo "of $$app."; \
186 fi; \
187 else true; fi
188
189# --------------- Local DIST Section
190
191# Install the w32 and tests subdirectories
192#
193dist-hook:
194 (cd $(srcdir); \
195 sub=`find w32 tests -follow \( -name CVS -prune -o -name .cvsignore -o -name work -prune \) -o \( -name \*.orig -o -name \*.rej -o -name \*~ -prune \) -o -type f -print`; \
196 tar chf - $$sub) \
197 | (cd $(distdir); tar xfBp -)
198
199
200# --------------- Local CHECK Section
201
202check-local: check-regression check-loadavg
203 @banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
204 dashes=`echo "$$banner" | sed s/./=/g`; \
205 echo; \
206 echo "$$dashes"; \
207 echo "$$banner"; \
208 echo "$$dashes"; \
209 echo
210
211.PHONY: check-loadavg check-regression
212
213check-loadavg: loadavg$(EXEEXT)
214 @echo The system uptime program believes the load average to be:
215 -uptime
216 @echo The GNU load average checking code thinks:
217 -./loadavg$(EXEEXT)
218
219# The loadavg function is invoked during "make check" to test getloadavg.
220check_PROGRAMS = loadavg
221nodist_loadavg_SOURCES = getloadavg.c
222loadavg_CPPFLAGS = -DTEST
223loadavg_LDADD = @GETLOADAVG_LIBS@
224
225# > check-regression
226#
227# Look for the make test suite, and run it if found and we can find perl.
228# If we're building outside the tree, we use symlinks to make a local copy of
229# the test suite. Unfortunately the test suite itself isn't localizable yet.
230#
231MAKETESTFLAGS =
232
233check-regression:
234 @if test -f "$(srcdir)/tests/run_make_tests"; then \
235 if $(PERL) -v >/dev/null 2>&1; then \
236 case `cd $(srcdir); pwd` in `pwd`) : ;; \
237 *) test -d tests || mkdir tests; \
238 rm -f srctests; \
239 if ln -s "$(srcdir)/tests" srctests; then \
240 for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
241 rm -f tests/$$f; ln -s ../srctests/$$f tests; \
242 done; fi ;; \
243 esac; \
244 echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
245 cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS); \
246 else \
247 echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
248 fi; \
249 else \
250 echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
251 fi
252
253
254# --------------- Maintainer's Section
255
256# Tell automake that I haven't forgotten about this file and it will be
257# created before we build a distribution (see maintMakefile in the CVS
258# distribution).
259
260README:
261
262@MAINT_MAKEFILE@
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette