VirtualBox

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

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

kmk: replaced strcache with strcacahe2.

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