VirtualBox

source: kBuild/trunk/src/gmake/Makefile.am@ 287

Last change on this file since 287 was 281, checked in by bird, 20 years ago

This commit was generated by cvs2svn to compensate for changes in r280,
which included commits to RCS files with non-trunk default branches.

  • Property svn:eol-style set to native
File size: 5.2 KB
Line 
1# This is a -*-Makefile-*-, or close enough
2
3AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news ansi2knr
4ACLOCAL_AMFLAGS = -I config
5
6# Only process if target is MS-Windows
7if WINDOWSENV
8 MAYBE_W32 = w32
9 W32INC = -I $(top_srcdir)/w32/include
10 W32LIB = -Lw32 -lw32
11endif
12
13SUBDIRS = glob config po doc $(MAYBE_W32)
14
15bin_PROGRAMS = make
16
17if USE_CUSTOMS
18 remote = remote-cstms.c
19else
20 remote = remote-stub.c
21endif
22
23
24make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
25 function.c getopt.c getopt1.c implicit.c job.c main.c \
26 misc.c read.c remake.c $(remote) rule.c signame.c \
27 variable.c version.c vpath.c hash.c
28
29EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
30
31noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
32 debug.h getopt.h gettext.h hash.h
33
34make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
35# Only process if target is MS-Windows
36if WINDOWSENV
37 make_LDADD += $(W32LIB)
38endif
39
40man_MANS = make.1
41
42DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
43
44AM_CPPFLAGS = $(GLOBINC)
45# Only process if target is MS-Windows
46if WINDOWSENV
47 AM_CPPFLAGS += $(W32INC)
48endif
49
50
51# Extra stuff to include in the distribution.
52# Note we need all the glob stuff here, rather than in glob/Makefile.am,
53# because often that directory isn't built on the systems used by the
54# maintainers.
55
56EXTRA_DIST = README build.sh.in $(man_MANS) \
57 README.customs README.OS2 \
58 SCOPTIONS SMakefile \
59 README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
60 README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
61 README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
62 readme.vms makefile.vms makefile.com config.h-vms \
63 vmsdir.h vmsfunctions.c vmsify.c
64
65MAKE_HOST = @MAKE_HOST@
66
67
68# Forward targets
69
70html:
71 cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
72
73.PHONY: html
74
75# --------------- Internationalization Section
76
77localedir = $(datadir)/locale
78
79# --------------- Local INSTALL Section
80
81# If necessary, change the gid of the app and turn on the setgid flag.
82#
83
84# Whether or not make needs to be installed setgid.
85# The value should be either `true' or `false'.
86# On many systems, the getloadavg function (used to implement the `-l'
87# switch) will not work unless make is installed setgid kmem.
88#
89inst_setgid = @NEED_SETGID@
90
91# Install make setgid to this group so it can get the load average.
92#
93inst_group = @KMEM_GROUP@
94
95install-exec-local:
96 @if $(inst_setgid); then \
97 app=$(DESTDIR)$(bindir)/`echo $(bin_PROGRAMS)|sed '$(transform)'`; \
98 if chgrp $(inst_group) $$app && chmod g+s $$app; then \
99 echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
100 else \
101 echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
102 echo "otherwise the \`-l' option will probably not work."; \
103 echo "You may need special privileges to complete the installation"; \
104 echo "of $$app."; \
105 fi; \
106 else true; fi
107
108# --------------- Local DIST Section
109
110# Install the w32 and tests subdirectories
111#
112dist-hook:
113 (cd $(srcdir); \
114 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`; \
115 tar chf - $$sub) \
116 | (cd $(distdir); tar xfBp -)
117
118
119# --------------- Local CHECK Section
120
121check-local: check-regression check-loadavg
122 @banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
123 dashes=`echo "$$banner" | sed s/./=/g`; \
124 echo; \
125 echo "$$dashes"; \
126 echo "$$banner"; \
127 echo "$$dashes"; \
128 echo
129
130.PHONY: check-loadavg check-regression
131
132check-loadavg: loadavg$(EXEEXT)
133 @echo The system uptime program believes the load average to be:
134 -uptime
135 @echo The GNU load average checking code thinks:
136 -./loadavg$(EXEEXT)
137
138# The loadavg function is invoked during "make check" to test getloadavg.
139noinst_PROGRAMS = loadavg
140nodist_loadavg_SOURCES = getloadavg.c
141loadavg_CPPFLAGS = -DTEST
142loadavg_LDADD = @GETLOADAVG_LIBS@
143
144# > check-regression
145#
146# Look for the make test suite, and run it if found and we can find perl.
147# If we're building outside the tree, we use symlinks to make a local copy of
148# the test suite. Unfortunately the test suite itself isn't localizable yet.
149#
150MAKETESTFLAGS =
151
152check-regression:
153 @if test -f "$(srcdir)/tests/run_make_tests"; then \
154 if $(PERL) -v >/dev/null 2>&1; then \
155 case `cd $(srcdir); pwd` in `pwd`) : ;; \
156 *) test -d tests || mkdir tests; \
157 rm -f srctests; \
158 if ln -s "$(srcdir)/tests" srctests; then \
159 for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
160 rm -f tests/$$f; ln -s ../srctests/$$f tests; \
161 done; fi ;; \
162 esac; \
163 echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
164 cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS); \
165 else \
166 echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
167 fi; \
168 else \
169 echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
170 fi
171
172
173# --------------- Maintainer's Section
174
175# Tell automake that I haven't forgotten about this file and it will be
176# created before we build a distribution (see maintMakefile in the CVS
177# distribution).
178
179README:
180
181@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