1997-08-18 18:11:04 +00:00
|
|
|
# Maintainer-only makefile segment. This contains things that are relevant
|
1999-03-30 06:19:17 +00:00
|
|
|
# only if you have the full copy of the GNU make sources from the CVS
|
|
|
|
# tree, not a dist copy.
|
1997-08-18 18:11:04 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# Find the glob source files... this might be dangerous, but we're maintainers!
|
|
|
|
#
|
|
|
|
globsrc := $(wildcard glob/*.c)
|
1997-08-27 20:30:54 +00:00
|
|
|
globhdr := $(wildcard glob/*.h)
|
|
|
|
|
1999-08-31 17:02:31 +00:00
|
|
|
TEMPLATES = README README.DOS README.W32 \
|
|
|
|
config.ami configh.dos config.h.W32 config.h-vms
|
1998-07-30 20:54:47 +00:00
|
|
|
MTEMPLATES = Makefile.DOS SMakefile
|
1997-08-18 18:11:04 +00:00
|
|
|
|
1999-07-24 04:55:08 +00:00
|
|
|
# We need this to ensure that README and build.sh.in are created on time to
|
|
|
|
# avoid errors by automake.
|
1999-03-30 06:19:17 +00:00
|
|
|
#
|
1999-07-24 04:55:08 +00:00
|
|
|
#Makefile.in: README build.sh.in
|
1999-03-30 06:19:17 +00:00
|
|
|
|
1997-08-18 18:11:04 +00:00
|
|
|
# General rule for turning a .template into a regular file.
|
|
|
|
#
|
1999-08-22 17:50:57 +00:00
|
|
|
$(TEMPLATES) : % : %.template Makefile
|
1997-08-27 20:30:54 +00:00
|
|
|
rm -f $@
|
1999-08-12 23:16:42 +00:00
|
|
|
sed -e 's@%VERSION%@$(VERSION)@g' \
|
|
|
|
-e 's@%PACKAGE%@$(PACKAGE)@g' \
|
1997-08-27 20:30:54 +00:00
|
|
|
$< > $@
|
|
|
|
chmod a-w $@
|
|
|
|
|
1998-07-30 20:54:47 +00:00
|
|
|
# Construct Makefiles by adding on dependencies, etc.
|
1997-08-27 20:30:54 +00:00
|
|
|
#
|
1999-08-22 17:50:57 +00:00
|
|
|
$(MTEMPLATES) : % : %.template .dep_segment Makefile
|
1997-08-18 18:11:04 +00:00
|
|
|
rm -f $@
|
1999-08-12 23:16:42 +00:00
|
|
|
sed -e 's@%VERSION%@$(VERSION)@g' \
|
|
|
|
-e 's@%PROGRAMS%@$(bin_PROGRAMS)@g' \
|
|
|
|
-e 's@%SOURCES%@$(filter-out remote-%,$(make_SOURCES)) remote-$$(REMOTE).c@g' \
|
|
|
|
-e 's@%OBJECTS%@$(filter-out remote-%,$(make_OBJECTS)) remote-$$(REMOTE).o@g' \
|
|
|
|
-e 's@%GLOB_SOURCES%@$(globsrc) $(globhdr)@g' \
|
|
|
|
-e 's@%GLOB_OBJECTS%@$(globsrc:glob/%.c=%.o)@g' \
|
1997-08-27 20:30:54 +00:00
|
|
|
$< > $@
|
1998-07-30 20:54:47 +00:00
|
|
|
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
|
|
|
cat $(word 2,$^) >>$@
|
|
|
|
chmod a-w $@
|
|
|
|
|
1999-08-22 17:50:57 +00:00
|
|
|
NMakefile: NMakefile.template .dep_segment Makefile
|
1998-07-30 20:54:47 +00:00
|
|
|
rm -f $@
|
|
|
|
cp $< $@
|
|
|
|
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
|
|
|
sed 's/^\([^ ]*\)\.o:/$$(OUTDIR)\/\1.obj:/' $(word 2,$^) >>$@
|
1997-08-18 18:11:04 +00:00
|
|
|
chmod a-w $@
|
|
|
|
|
|
|
|
# Construct build.sh.in
|
|
|
|
#
|
1999-08-22 17:50:57 +00:00
|
|
|
build.sh.in: build.template Makefile
|
1997-08-18 18:11:04 +00:00
|
|
|
rm -f $@
|
1999-09-16 05:58:44 +00:00
|
|
|
sed -e 's@%objs%@$(filter-out remote-%,$(make_OBJECTS)@g' \
|
1999-08-12 23:16:42 +00:00
|
|
|
-e 's@%globobjs%@$(patsubst %.c,%.o,$(globsrc)))@g' \
|
1999-03-26 07:08:57 +00:00
|
|
|
$< > $@
|
1997-08-18 18:11:04 +00:00
|
|
|
chmod a-w+x $@
|
|
|
|
|
1998-07-30 20:54:47 +00:00
|
|
|
# Use automake to build a dependency list file, for "foreign" makefiles like
|
|
|
|
# Makefile.DOS.
|
|
|
|
#
|
|
|
|
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
|
|
|
$(AUTOMAKE) --generate-deps --build-dir=. --srcdir-name=.
|
|
|
|
|
1997-09-16 14:17:23 +00:00
|
|
|
# We clean everything here. The GNU standards for makefile conventions say
|
|
|
|
# you shouldn't remove configure, etc., but this makefile is only available
|
|
|
|
# in a full development distribution, so they'll only be removed then.
|
|
|
|
#
|
1997-09-19 19:47:55 +00:00
|
|
|
# And _I_ want them to be removed ;)
|
|
|
|
#
|
1999-03-30 06:19:17 +00:00
|
|
|
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
|
1997-09-19 19:47:55 +00:00
|
|
|
|
1998-07-30 20:54:47 +00:00
|
|
|
MAINTAINERCLEANFILES = $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
|
|
|
|
missing build.sh.in .dep_segment
|
1997-09-16 14:17:23 +00:00
|
|
|
|
1997-08-18 18:11:04 +00:00
|
|
|
# Put the alpha distribution files up for anonymous FTP.
|
|
|
|
#
|
|
|
|
ALPHA := ~ftp/gnu
|
|
|
|
TARFILE := $(distdir).tar.gz
|
|
|
|
|
|
|
|
.PHONY: alpha
|
|
|
|
alpha: $(ALPHA) $(TARFILE)
|
|
|
|
@rm -f $(ALPHA)/$(TARFILE)
|
|
|
|
cp -p $(TARFILE) $(ALPHA)
|
1998-07-30 20:54:47 +00:00
|
|
|
|
|
|
|
# This is needed because normal builds with GCC don't compile alloca.c, so
|
|
|
|
# alloca.P doesn't get built :-/.
|
|
|
|
#
|
|
|
|
.deps/alloca.P: alloca.c
|
|
|
|
$(COMPILE) -M -o $@ $<
|