VirtualBox

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

Last change on this file since 1863 was 1863, checked in by bird, 16 years ago

kmk: Allocation caches for nameseq, dep and idep. next: variable.

  • Property svn:eol-style set to native
File size: 8.2 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 kmk_redirect
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 expreval.c \
50 incdep.c \
51 kbuild.c \
52 electric.c \
53 ../lib/md5.c \
54 ../lib/kDep.c \
55 \
56 kmkbuiltin.c \
57 kmkbuiltin/append.c \
58 kmkbuiltin/cat.c \
59 kmkbuiltin/chmod.c \
60 kmkbuiltin/cmp.c \
61 kmkbuiltin/cmp_util.c \
62 kmkbuiltin/cp.c \
63 kmkbuiltin/cp_utils.c \
64 kmkbuiltin/echo.c \
65 kmkbuiltin/expr.c \
66 kmkbuiltin/install.c \
67 kmkbuiltin/kDepIDB.c \
68 kmkbuiltin/ln.c \
69 kmkbuiltin/md5sum.c \
70 kmkbuiltin/mkdir.c \
71 kmkbuiltin/mv.c \
72 kmkbuiltin/printf.c \
73 kmkbuiltin/rm.c \
74 kmkbuiltin/rmdir.c \
75 kmkbuiltin/test.c \
76 kmkbuiltin/err.c \
77 kmkbuiltin/setmode.c \
78 kmkbuiltin/strmode.c \
79 kmkbuiltin/strlcpy.c \
80 kmkbuiltin/osdep.c \
81 kmkbuiltin/kbuild_protection.c \
82 kmkbuiltin/kbuild_version.c
83
84kmk_redirect_SOURCES = kmkbuiltin/redirect.c
85
86EXTRA_kmk_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
87
88noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
89 debug.h getopt.h gettext.h hash.h
90
91#kmk_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
92kmk_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@
93# Only process if target is MS-Windows
94if WINDOWSENV
95 kmk_LDADD += $(W32LIB)
96endif
97
98man_MANS = make.1
99
100# org - DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
101DEFS = \
102 -DNO_ARCHIVES \
103 -DEXPERIMENTAL \
104 -DCONFIG_WITH_TOUPPER_TOLOWER \
105 -DCONFIG_WITH_DEFINED \
106 -DCONFIG_WITH_EXPLICIT_MULTITARGET \
107 -DCONFIG_WITH_PREPEND_ASSIGNMENT \
108 -DCONFIG_WITH_LOCAL_VARIABLES \
109 -DCONFIG_WITH_2ND_TARGET_EXPANSION \
110 -DCONFIG_WITH_ALLOC_CACHES \
111 \
112 -DKMK \
113 -DKMK_HELPERS \
114 -DVARIABLE_HASH \
115 -DCONFIG_NO_DEFAULT_SUFFIXES \
116 -DCONFIG_NO_DEFAULT_PATTERN_RULES \
117 -DCONFIG_NO_DEFAULT_TERMINAL_RULES \
118 -DCONFIG_NO_DEFAULT_SUFFIX_RULES \
119 -DCONFIG_NO_DEFAULT_VARIABLES \
120 -DCONFIG_WITH_EXTENDED_NOTPARALLEL \
121 -DCONFIG_WITH_INCLUDEDEP \
122 -DCONFIG_WITH_VALUE_LENGTH \
123 -DCONFIG_WITH_RSORT \
124 -DCONFIG_WITH_ABSPATHEX \
125 -DCONFIG_WITH_COMPARE \
126 -DCONFIG_WITH_STACK \
127 -DCONFIG_WITH_MATH \
128 -DCONFIG_WITH_XARGS \
129 -DCONFIG_WITH_NANOTS \
130 -DCONFIG_WITH_SET_CONDITIONALS \
131 -DCONFIG_WITH_IF_CONDITIONALS \
132 -DCONFIG_WITH_DATE \
133 -DCONFIG_WITH_FILE_SIZE \
134 -DCONFIG_WITH_WHICH \
135 -DCONFIG_WITH_EVALPLUS \
136 -DCONFIG_WITH_MAKE_STATS \
137 -DCONFIG_WITH_COMMANDS_FUNC \
138 -DCONFIG_PRETTY_COMMAND_PRINTING \
139 \
140 -DKBUILD_HOST=\"$(BUILD_TARGET)\" \
141 -DKBUILD_HOST_ARCH=\"$(BUILD_TARGET_ARCH)\" \
142 -DKBUILD_HOST_CPU=\"$(BUILD_TARGET_CPU)\" \
143 \
144 -DKBUILD_SVN_REV=1 \
145 -DKBUILD_VERSION_MAJOR=0 \
146 -DKBUILD_VERSION_MINOR=1 \
147 -DKBUILD_VERSION_PATCH=4 \
148 \
149 -DCONFIG_WITH_KMK_BUILTIN \
150 @DEFS@
151
152AM_CPPFLAGS = $(GLOBINC) -I$(srcdir)/../lib
153# Only process if target is MS-Windows
154if WINDOWSENV
155 AM_CPPFLAGS += $(W32INC)
156endif
157
158
159# Extra stuff to include in the distribution.
160
161EXTRA_DIST = README build.sh.in $(man_MANS) \
162 README.customs README.OS2 \
163 SCOPTIONS SMakefile \
164 README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
165 README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
166 README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
167 make_msvc_net2003.sln make_msvc_net2003.vcproj \
168 readme.vms makefile.vms makefile.com config.h-vms \
169 vmsdir.h vmsfunctions.c vmsify.c
170
171# This is built during configure, but behind configure's back
172
173DISTCLEANFILES = build.sh
174
175# Forward targets
176
177html:
178 cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
179
180.PHONY: html
181
182# --------------- Internationalization Section
183
184localedir = $(datadir)/locale
185
186# --------------- Local INSTALL Section
187
188# If necessary, change the gid of the app and turn on the setgid flag.
189#
190
191# Whether or not make needs to be installed setgid.
192# The value should be either `true' or `false'.
193# On many systems, the getloadavg function (used to implement the `-l'
194# switch) will not work unless make is installed setgid kmem.
195#
196inst_setgid = @NEED_SETGID@
197
198# Install make setgid to this group so it can get the load average.
199#
200inst_group = @KMEM_GROUP@
201
202install-exec-local:
203 @if $(inst_setgid); then \
204 app=$(DESTDIR)$(bindir)/`echo $(bin_PROGRAMS)|sed '$(transform)'`; \
205 if chgrp $(inst_group) $$app && chmod g+s $$app; then \
206 echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
207 else \
208 echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
209 echo "otherwise the \`-l' option will probably not work."; \
210 echo "You may need special privileges to complete the installation"; \
211 echo "of $$app."; \
212 fi; \
213 else true; fi
214
215# --------------- Local DIST Section
216
217# Install the w32 and tests subdirectories
218#
219dist-hook:
220 (cd $(srcdir); \
221 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`; \
222 tar chf - $$sub) \
223 | (cd $(distdir); tar xfBp -)
224
225
226# --------------- Local CHECK Section
227
228check-local: check-regression check-loadavg
229 @banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
230 dashes=`echo "$$banner" | sed s/./=/g`; \
231 echo; \
232 echo "$$dashes"; \
233 echo "$$banner"; \
234 echo "$$dashes"; \
235 echo
236
237.PHONY: check-loadavg check-regression
238
239check-loadavg: loadavg$(EXEEXT)
240 @echo The system uptime program believes the load average to be:
241 -uptime
242 @echo The GNU load average checking code thinks:
243 -./loadavg$(EXEEXT)
244
245# The loadavg function is invoked during "make check" to test getloadavg.
246check_PROGRAMS = loadavg
247nodist_loadavg_SOURCES = getloadavg.c
248loadavg_CPPFLAGS = -DTEST
249loadavg_LDADD = @GETLOADAVG_LIBS@
250
251# > check-regression
252#
253# Look for the make test suite, and run it if found and we can find perl.
254# If we're building outside the tree, we use symlinks to make a local copy of
255# the test suite. Unfortunately the test suite itself isn't localizable yet.
256#
257MAKETESTFLAGS =
258
259check-regression:
260 @if test -f "$(srcdir)/tests/run_make_tests"; then \
261 if $(PERL) -v >/dev/null 2>&1; then \
262 case `cd $(srcdir); pwd` in `pwd`) : ;; \
263 *) test -d tests || mkdir tests; \
264 rm -f srctests; \
265 if ln -s "$(srcdir)/tests" srctests; then \
266 for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
267 rm -f tests/$$f; ln -s ../srctests/$$f tests; \
268 done; fi ;; \
269 esac; \
270 echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
271 cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS); \
272 else \
273 echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
274 fi; \
275 else \
276 echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
277 fi
278
279
280# --------------- Maintainer's Section
281
282# Tell automake that I haven't forgotten about this file and it will be
283# created before we build a distribution (see maintMakefile in the CVS
284# distribution).
285
286README:
287
288@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