make-dfsg/Makefile.am

142 lines
4.2 KiB
Text
Raw Normal View History

1997-08-18 18:11:04 +00:00
# -*-Makefile-*-, or close enough
1998-07-30 20:54:47 +00:00
AUTOMAKE_OPTIONS = 1.3
1997-08-18 18:11:04 +00:00
bin_PROGRAMS = make
make_SOURCES = main.c commands.c job.c dir.c file.c misc.c read.c remake.c \
rule.c implicit.c default.c variable.c expand.c function.c \
vpath.c version.c ar.c arscan.c remote-$(REMOTE).c \
commands.h dep.h filedef.h job.h make.h rule.h variable.h \
signame.c signame.h \
getopt.c getopt1.c getopt.h
make_LDADD = @LIBOBJS@ @ALLOCA@ @GLOBLIB@
1997-08-18 18:11:04 +00:00
info_TEXINFOS = make.texinfo
1998-07-30 20:54:47 +00:00
man_MANS = make.1
1997-08-18 18:11:04 +00:00
INCLUDES = -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
1997-08-18 18:11:04 +00:00
EXTRA_DIST = README build.sh.in $(man_MANS) README.customs remote-cstms.c\
1997-08-27 20:30:54 +00:00
make-stds.texi texinfo.tex SCOPTIONS SMakefile\
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h\
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat\
readme.vms makefile.vms makefile.com config.h-vms vmsdir.h\
vmsfunctions.c vmsify.c
1997-08-18 18:11:04 +00:00
SUBDIRS = glob
1997-09-19 19:47:55 +00:00
MOSTLYCLEANFILES = loadavg.c
CLEANFILES = loadavg
1998-07-30 20:54:47 +00:00
# --------------- Local BUILD Section
build.sh: $(top_builddir)/config.status $(srcdir)/build.sh.in
cd $(top_builddir) \
&& CONFIG_FILES=build.sh.in CONFIG_HEADERS= $(SHELL) ./config.status
1998-07-30 20:54:47 +00:00
# --------------- Local INSTALL Section
# If necessary, change the gid of the app and turn on the setgid flag.
#
# Whether or not make needs to be installed setgid.
# The value should be either `true' or `false'.
# On many systems, the getloadavg function (used to implement the `-l'
# switch) will not work unless make is installed setgid kmem.
#
inst_setgid = @NEED_SETGID@
# Install make setgid to this group so it can get the load average.
#
inst_group = @KMEM_GROUP@
install-exec-local:
@if $(inst_setgid); then \
app=$(DESTDIR)$(bindir)/`echo $(bin_PROGRAMS)|sed '$(transform)'`; \
if chgrp $(inst_group) $$app && chmod g+s $$app; then \
echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
else \
echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
echo "otherwise the \`-l' option will probably not work."; \
echo "You may need special privileges to complete the installation"; \
echo "of $$app."; \
fi; \
else true; fi
1997-08-27 20:30:54 +00:00
# --------------- Local DIST Section
# Install the w32 subdirectory
#
dist-hook:
(cd $(srcdir); \
1998-07-30 20:54:47 +00:00
w32=`find w32 -follow \( -name CVS -prune \) -o \( -name \*.orig -o -name \*.rej -o -name \*~ -prune \) -o -type f -print`; \
1997-08-27 20:30:54 +00:00
tar chf - $$w32) \
| (cd $(distdir); tar xfBp -)
# --------------- Local CHECK Section
check-local: check-loadavg check-regression
.PHONY: check-loadavg check-regression
# > check-loadavg
1997-08-18 18:11:04 +00:00
#
1997-08-27 20:30:54 +00:00
loadavg: loadavg.c config.h
@rm -f loadavg
1997-09-05 21:01:49 +00:00
$(LINK) -I. -I$(srcdir) -DHAVE_CONFIG_H -DTEST $(make_LDFLAGS) loadavg.c $(LIBS)
1998-07-30 20:54:47 +00:00
1997-08-27 20:30:54 +00:00
# We copy getloadavg.c into a different file rather than compiling it
# directly because some compilers clobber getloadavg.o in the process.
1998-07-30 20:54:47 +00:00
#
1997-08-27 20:30:54 +00:00
loadavg.c: getloadavg.c
ln $(srcdir)/getloadavg.c loadavg.c || \
1998-07-30 20:54:47 +00:00
cp $(srcdir)/getloadavg.c loadavg.c
1997-08-27 20:30:54 +00:00
check-loadavg: loadavg
@echo The system uptime program believes the load average to be:
-uptime
@echo The GNU load average checking code believes:
-./loadavg
# > check-regression
#
# Look for the make test suite, and run it if found. Look in MAKE_TEST if
# specified, or else in the srcdir or the distdir, their parents, and _their_
# parents.
#
1998-07-30 20:54:47 +00:00
MAKETESTFLAGS =
1997-09-19 19:47:55 +00:00
check-regression: all
1998-07-30 20:54:47 +00:00
@here=`pwd`; testdir=""; \
1997-08-18 18:11:04 +00:00
case "$(MAKE_TEST)" in "") \
for d1 in $$here $(srcdir); do \
1997-08-18 20:14:30 +00:00
for d2 in ../.. .. .; do \
1997-08-27 20:30:54 +00:00
all=`echo $$d1/$$d2/make-test-[0-9]*/run_make_tests`; \
case "$$all" in \
"$$d1/$$d2/make-test-[0-9]*/run_make_tests") : ;; \
*) try=`for x in $$all; do echo $$x; done | sort | tail -1`;\
testdir=`dirname $$try` ;; esac; \
1997-08-18 18:11:04 +00:00
done; done ;; \
1997-08-18 20:14:30 +00:00
*) testdir="$(MAKE_TEST)" ;; \
1997-08-18 18:11:04 +00:00
esac; \
1997-08-18 20:14:30 +00:00
case "$$testdir" in \
1998-07-30 20:54:47 +00:00
"") echo "Couldn't find make-test-* regression test suite."; exit 0;; \
1997-08-18 18:11:04 +00:00
esac; \
1998-07-30 20:54:47 +00:00
echo "cd $$testdir && ./run_make_tests -make $$here/make $(MAKETESTFLAGS)"; \
cd $$testdir && ./run_make_tests -make $$here/make $(MAKETESTFLAGS)
1997-08-18 18:11:04 +00:00
1997-08-27 20:30:54 +00:00
# --------------- Local CLEAN section
maintainer-clean-local:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
1997-08-27 20:30:54 +00:00
# --------------- Maintainer's Section
1997-08-18 18:11:04 +00:00
@MAINT_MAKEFILE@