1997-08-19 02:11:04 +08:00
|
|
|
# Maintainer-only makefile segment. This contains things that are relevant
|
1999-03-30 14:19:17 +08:00
|
|
|
# only if you have the full copy of the GNU make sources from the CVS
|
|
|
|
# tree, not a dist copy.
|
1997-08-19 02:11:04 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
# Find the glob source files... this might be dangerous, but we're maintainers!
|
|
|
|
#
|
|
|
|
globsrc := $(wildcard glob/*.c)
|
1997-08-28 04:30:54 +08:00
|
|
|
globhdr := $(wildcard glob/*.h)
|
|
|
|
|
1999-09-01 01:02:31 +08:00
|
|
|
TEMPLATES = README README.DOS README.W32 \
|
|
|
|
config.ami configh.dos config.h.W32 config.h-vms
|
1998-07-31 04:54:47 +08:00
|
|
|
MTEMPLATES = Makefile.DOS SMakefile
|
1997-08-19 02:11:04 +08:00
|
|
|
|
1999-07-24 12:55:08 +08:00
|
|
|
# We need this to ensure that README and build.sh.in are created on time to
|
|
|
|
# avoid errors by automake.
|
1999-03-30 14:19:17 +08:00
|
|
|
#
|
1999-07-24 12:55:08 +08:00
|
|
|
#Makefile.in: README build.sh.in
|
1999-03-30 14:19:17 +08:00
|
|
|
|
1997-08-19 02:11:04 +08:00
|
|
|
# General rule for turning a .template into a regular file.
|
|
|
|
#
|
1999-08-23 01:50:57 +08:00
|
|
|
$(TEMPLATES) : % : %.template Makefile
|
1997-08-28 04:30:54 +08:00
|
|
|
rm -f $@
|
1999-08-13 07:16:42 +08:00
|
|
|
sed -e 's@%VERSION%@$(VERSION)@g' \
|
|
|
|
-e 's@%PACKAGE%@$(PACKAGE)@g' \
|
1997-08-28 04:30:54 +08:00
|
|
|
$< > $@
|
|
|
|
chmod a-w $@
|
|
|
|
|
1998-07-31 04:54:47 +08:00
|
|
|
# Construct Makefiles by adding on dependencies, etc.
|
1997-08-28 04:30:54 +08:00
|
|
|
#
|
1999-08-23 01:50:57 +08:00
|
|
|
$(MTEMPLATES) : % : %.template .dep_segment Makefile
|
1997-08-19 02:11:04 +08:00
|
|
|
rm -f $@
|
1999-08-13 07:16:42 +08: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-28 04:30:54 +08:00
|
|
|
$< > $@
|
1998-07-31 04:54:47 +08:00
|
|
|
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
|
|
|
cat $(word 2,$^) >>$@
|
|
|
|
chmod a-w $@
|
|
|
|
|
1999-08-23 01:50:57 +08:00
|
|
|
NMakefile: NMakefile.template .dep_segment Makefile
|
1998-07-31 04:54:47 +08:00
|
|
|
rm -f $@
|
|
|
|
cp $< $@
|
|
|
|
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
|
|
|
sed 's/^\([^ ]*\)\.o:/$$(OUTDIR)\/\1.obj:/' $(word 2,$^) >>$@
|
1997-08-19 02:11:04 +08:00
|
|
|
chmod a-w $@
|
|
|
|
|
|
|
|
# Construct build.sh.in
|
|
|
|
#
|
1999-08-23 01:50:57 +08:00
|
|
|
build.sh.in: build.template Makefile
|
1997-08-19 02:11:04 +08:00
|
|
|
rm -f $@
|
1999-09-16 13:58:44 +08:00
|
|
|
sed -e 's@%objs%@$(filter-out remote-%,$(make_OBJECTS)@g' \
|
1999-08-13 07:16:42 +08:00
|
|
|
-e 's@%globobjs%@$(patsubst %.c,%.o,$(globsrc)))@g' \
|
1999-03-26 15:08:57 +08:00
|
|
|
$< > $@
|
1997-08-19 02:11:04 +08:00
|
|
|
chmod a-w+x $@
|
|
|
|
|
1998-07-31 04:54:47 +08: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=.
|
|
|
|
|
2002-04-22 07:57:24 +08:00
|
|
|
# Get rid of everything "else".
|
1997-09-20 03:47:55 +08:00
|
|
|
#
|
1999-03-30 14:19:17 +08:00
|
|
|
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
|
1997-09-20 03:47:55 +08:00
|
|
|
|
2002-04-22 07:57:24 +08:00
|
|
|
MAINTAINERCLEANFILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
|
1998-07-31 04:54:47 +08:00
|
|
|
missing build.sh.in .dep_segment
|
1997-09-16 22:17:23 +08:00
|
|
|
|
1997-08-19 02:11:04 +08: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)
|