VirtualBox

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

最後變更 在這個檔案從1793是 1778,由 bird 提交於 17 年 前

kmk: 0.1.4!

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

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