VirtualBox

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

Last change on this file since 2657 was 2591, checked in by bird, 13 years ago

kmk: Merged in changes from GNU make 3.82. Previous GNU make base version was gnumake-2008-10-28-CVS.

  • Property svn:eol-style set to native
File size: 8.7 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# 2007, 2008, 2009, 2010 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
8# the terms of the GNU General Public License as published by the Free Software
9# Foundation; either version 3 of the License, or (at your option) any later
10# version.
11#
12# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
13# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15# details.
16#
17# You should have received a copy of the GNU General Public License along with
18# this program. If not, see <http://www.gnu.org/licenses/>.
19
20AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news
21ACLOCAL_AMFLAGS = -I config
22
23MAKE_HOST = @MAKE_HOST@
24
25# Only process if target is MS-Windows
26if WINDOWSENV
27 MAYBE_W32 = w32
28 W32INC = -I $(top_srcdir)/w32/include
29 W32LIB = -Lw32 -lw32
30endif
31
32# we can safely drop doc and po when bootstrapping kmk.
33# SUBDIRS = glob config po doc $(MAYBE_W32)
34SUBDIRS = glob config $(MAYBE_W32)
35
36bin_PROGRAMS = kmk kmk_redirect
37
38if USE_CUSTOMS
39 remote = remote-cstms.c
40else
41 remote = remote-stub.c
42endif
43
44
45kmk_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
46 function.c getopt.c getopt1.c implicit.c job.c main.c \
47 misc.c read.c remake.c $(remote) rule.c signame.c \
48 strcache.c variable.c version.c vpath.c hash.c \
49 \
50 expreval.c \
51 incdep.c \
52 strcache2.c \
53 alloccache.c \
54 kbuild.c \
55 kbuild-read.c \
56 electric.c \
57 ../lib/md5.c \
58 ../lib/kDep.c \
59 \
60 kmkbuiltin.c \
61 kmkbuiltin/append.c \
62 kmkbuiltin/cat.c \
63 kmkbuiltin/chmod.c \
64 kmkbuiltin/cmp.c \
65 kmkbuiltin/cmp_util.c \
66 kmkbuiltin/cp.c \
67 kmkbuiltin/cp_utils.c \
68 kmkbuiltin/echo.c \
69 kmkbuiltin/expr.c \
70 kmkbuiltin/install.c \
71 kmkbuiltin/kDepIDB.c \
72 kmkbuiltin/kDepObj.c \
73 kmkbuiltin/ln.c \
74 kmkbuiltin/md5sum.c \
75 kmkbuiltin/mkdir.c \
76 kmkbuiltin/mv.c \
77 kmkbuiltin/printf.c \
78 kmkbuiltin/rm.c \
79 kmkbuiltin/rmdir.c \
80 kmkbuiltin/sleep.c \
81 kmkbuiltin/test.c \
82 kmkbuiltin/err.c \
83 kmkbuiltin/fts.c \
84 kmkbuiltin/setmode.c \
85 kmkbuiltin/strmode.c \
86 kmkbuiltin/strlcpy.c \
87 kmkbuiltin/osdep.c \
88 kmkbuiltin/kbuild_protection.c \
89 kmkbuiltin/kbuild_version.c
90
91kmk_redirect_SOURCES = kmkbuiltin/redirect.c
92
93EXTRA_kmk_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
94
95noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
96 debug.h getopt.h gettext.h hash.h
97
98#kmk_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
99kmk_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@
100# Only process if target is MS-Windows
101if WINDOWSENV
102 kmk_LDADD += $(W32LIB)
103endif
104
105man_MANS = make.1
106
107# org - DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
108DEFS = \
109 -DNO_ARCHIVES \
110 -DEXPERIMENTAL \
111 -DCONFIG_WITH_TOUPPER_TOLOWER \
112 -DCONFIG_WITH_DEFINED \
113 -DCONFIG_WITH_EXPLICIT_MULTITARGET \
114 -DCONFIG_WITH_DOT_MUST_MAKE \
115 -DCONFIG_WITH_PREPEND_ASSIGNMENT \
116 -DCONFIG_WITH_LOCAL_VARIABLES \
117 -DCONFIG_WITH_2ND_TARGET_EXPANSION \
118 -DCONFIG_WITH_ALLOC_CACHES \
119 -DCONFIG_WITH_STRCACHE2 \
120 \
121 -DKMK \
122 -DKMK_HELPERS \
123 -DCONFIG_NO_DEFAULT_SUFFIXES \
124 -DCONFIG_NO_DEFAULT_PATTERN_RULES \
125 -DCONFIG_NO_DEFAULT_TERMINAL_RULES \
126 -DCONFIG_NO_DEFAULT_SUFFIX_RULES \
127 -DCONFIG_NO_DEFAULT_VARIABLES \
128 -DCONFIG_WITH_EXTENDED_NOTPARALLEL \
129 -DCONFIG_WITH_INCLUDEDEP \
130 -DCONFIG_WITHOUT_THREADS \
131 -DCONFIG_WITH_VALUE_LENGTH \
132 \
133 -DCONFIG_WITH_ABSPATHEX \
134 -DCONFIG_WITH_COMMANDS_FUNC \
135 -DCONFIG_WITH_DATE \
136 -DCONFIG_WITH_DEFINED_FUNCTIONS \
137 -DCONFIG_WITH_EVALPLUS \
138 -DCONFIG_WITH_FILE_SIZE \
139 -DCONFIG_WITH_LOOP_FUNCTIONS \
140 -DCONFIG_WITH_MATH \
141 -DCONFIG_WITH_NANOTS \
142 -DCONFIG_WITH_ROOT_FUNC \
143 -DCONFIG_WITH_RSORT \
144 -DCONFIG_WITH_STACK \
145 -DCONFIG_WITH_STRING_FUNCTIONS \
146 -DCONFIG_WITH_WHERE_FUNCTION \
147 -DCONFIG_WITH_WHICH \
148 -DCONFIG_WITH_XARGS \
149 \
150 -DCONFIG_WITH_COMPARE \
151 -DCONFIG_WITH_SET_CONDITIONALS \
152 -DCONFIG_WITH_IF_CONDITIONALS \
153 -DCONFIG_WITH_PRINTF \
154 -DCONFIG_WITH_MINIMAL_STATS \
155 -DCONFIG_PRETTY_COMMAND_PRINTING \
156 -DCONFIG_WITH_PRINT_STATS_SWITCH \
157 -DCONFIG_WITH_PRINT_TIME_SWITCH \
158 -DCONFIG_WITH_RDONLY_VARIABLE_VALUE \
159 -DCONFIG_WITH_LAZY_DEPS_VARS \
160 \
161 -DKBUILD_TYPE=\"$(KBUILD_TYPE)\" \
162 -DKBUILD_HOST=\"$(KBUILD_TARGET)\" \
163 -DKBUILD_HOST_ARCH=\"$(KBUILD_TARGET_ARCH)\" \
164 -DKBUILD_HOST_CPU=\"$(KBUILD_TARGET_CPU)\" \
165 \
166 -DKBUILD_SVN_REV=1 \
167 -DKBUILD_VERSION_MAJOR=0 \
168 -DKBUILD_VERSION_MINOR=1 \
169 -DKBUILD_VERSION_PATCH=9998 \
170 \
171 -DCONFIG_WITH_KMK_BUILTIN \
172 @DEFS@
173
174AM_CPPFLAGS = $(GLOBINC) -I$(srcdir)/../lib
175# Only process if target is MS-Windows
176if WINDOWSENV
177 AM_CPPFLAGS += $(W32INC)
178endif
179
180
181# Extra stuff to include in the distribution.
182
183EXTRA_DIST = README build.sh.in $(man_MANS) \
184 README.customs README.OS2 \
185 SCOPTIONS SMakefile \
186 README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
187 README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
188 README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
189 make_msvc_net2003.sln make_msvc_net2003.vcproj \
190 readme.vms makefile.vms makefile.com config.h-vms \
191 vmsdir.h vmsfunctions.c vmsify.c
192
193# This is built during configure, but behind configure's back
194
195DISTCLEANFILES = build.sh
196
197# Forward targets
198
199html:
200 cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
201
202.PHONY: html
203
204# --------------- Internationalization Section
205
206localedir = $(datadir)/locale
207
208# --------------- Local INSTALL Section
209
210# If necessary, change the gid of the app and turn on the setgid flag.
211#
212
213# Whether or not make needs to be installed setgid.
214# The value should be either `true' or `false'.
215# On many systems, the getloadavg function (used to implement the `-l'
216# switch) will not work unless make is installed setgid kmem.
217#
218inst_setgid = @NEED_SETGID@
219
220# Install make setgid to this group so it can get the load average.
221#
222inst_group = @KMEM_GROUP@
223
224install-exec-local:
225 @if $(inst_setgid); then \
226 app=$(DESTDIR)$(bindir)/`echo $(bin_PROGRAMS)|sed '$(transform)'`; \
227 if chgrp $(inst_group) $$app && chmod g+s $$app; then \
228 echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
229 else \
230 echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
231 echo "otherwise the \`-l' option will probably not work."; \
232 echo "You may need special privileges to complete the installation"; \
233 echo "of $$app."; \
234 fi; \
235 else true; fi
236
237# --------------- Local DIST Section
238
239# Install the w32 and tests subdirectories
240#
241dist-hook:
242 (cd $(srcdir); \
243 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`; \
244 tar chf - $$sub) \
245 | (cd $(distdir); tar xfBp -)
246
247
248# --------------- Local CHECK Section
249
250check-local: check-regression check-loadavg
251 @banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
252 dashes=`echo "$$banner" | sed s/./=/g`; \
253 echo; \
254 echo "$$dashes"; \
255 echo "$$banner"; \
256 echo "$$dashes"; \
257 echo
258
259.PHONY: check-loadavg check-regression
260
261check-loadavg: loadavg$(EXEEXT)
262 @echo The system uptime program believes the load average to be:
263 -uptime
264 @echo The GNU load average checking code thinks:
265 -./loadavg$(EXEEXT)
266
267# The loadavg function is invoked during "make check" to test getloadavg.
268check_PROGRAMS = loadavg
269nodist_loadavg_SOURCES = getloadavg.c
270loadavg_CPPFLAGS = -DTEST
271loadavg_LDADD = @GETLOADAVG_LIBS@
272
273# > check-regression
274#
275# Look for the make test suite, and run it if found and we can find perl.
276# If we're building outside the tree, we use symlinks to make a local copy of
277# the test suite. Unfortunately the test suite itself isn't localizable yet.
278#
279MAKETESTFLAGS =
280
281check-regression:
282 @if test -f "$(srcdir)/tests/run_make_tests"; then \
283 if $(PERL) -v >/dev/null 2>&1; then \
284 case `cd $(srcdir); pwd` in `pwd`) : ;; \
285 *) test -d tests || mkdir tests; \
286 rm -f srctests; \
287 if ln -s "$(srcdir)/tests" srctests; then \
288 for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
289 rm -f tests/$$f; ln -s ../srctests/$$f tests; \
290 done; fi ;; \
291 esac; \
292 echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
293 cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS); \
294 else \
295 echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
296 fi; \
297 else \
298 echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
299 fi
300
301
302# --------------- Maintainer's Section
303
304# Tell automake that I haven't forgotten about this file and it will be
305# created before we build a distribution (see maintMakefile in the CVS
306# distribution).
307
308README:
309
310@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