VirtualBox

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

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

Added $(make-stats ) that provides access to memory and hash stats (if CONFIG_WITH_MAKE_STATS is defined).

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