VirtualBox

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

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

md5sum.

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