make/maintMakefile
1997-08-27 20:30:54 +00:00

52 lines
1.4 KiB
Plaintext

# Maintainer-only makefile segment. This contains things that are relevant
# only if you have the full copy of the GNU make sources, not a dist copy.
#
# Find the glob source files... this might be dangerous, but we're maintainers!
#
globsrc := $(wildcard glob/*.c)
globhdr := $(wildcard glob/*.h)
TEMPLATES = README config.ami configh.dos config.h.W32 config.h-vms
# General rule for turning a .template into a regular file.
#
$(TEMPLATES) : % : %.template configure.in
rm -f $@
sed -e 's@%VERSION%@$(VERSION)@' \
-e 's@%PACKAGE%@$(PACKAGE)@' \
$< > $@
chmod a-w $@
# Construct Makefile.DOS
#
Makefile.DOS: Makefile.DOS.template Makefile.am configure.in
rm -f $@
sed -e 's@%VERSION%@$(VERSION)@' \
-e 's@%PROGRAMS%@$(bin_PROGRAMS)@' \
-e 's@%SOURCES%@$(filter-out remote-%,$(make_SOURCES)) remote-$$(REMOTE).c@' \
-e 's@%OBJECTS%@$(filter-out remote-%,$(make_OBJECTS)) remote-$$(REMOTE).o@' \
-e 's@%GLOB_SOURCES%@$(globsrc) $(globhdr)@' \
-e 's@%GLOB_OBJECTS%@$(globsrc:glob/%.c=%.o)@' \
$< > $@
chmod a-w $@
# Construct build.sh.in
#
build.sh.in: build.template Makefile.am
rm -f $@
sed -e 's@%objs%@$(filter-out remote-%, $(make_OBJECTS)\
$(patsubst %.c,%.o,$(globsrc)))@' \
$< > $@
chmod a-w+x $@
# 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)