make/maintMakefile

486 lines
15 KiB
Text
Raw Normal View History

1997-08-18 18:11:04 +00:00
# Maintainer-only makefile segment. This contains things that are relevant
# only if you have the full copy of the GNU make sources from the Git
# tree, not a dist copy.
BUGLIST := bug-make@gnu.org
# These are related to my personal setup.
GPG_KEYID := 80CB727A20C79BB2
# SRCROOTDIR is just a handy location to keep source files in
SRCROOTDIR ?= $(HOME)/src
# Where the gnulib project has been locally cloned
GNULIBDIR ?= $(SRCROOTDIR)/gnulib
# Where to put the CVS checkout of the GNU web repository
GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
# Where to put the CVS checkout of the GNU make web repository
MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
2013-10-09 05:54:24 +00:00
# We like mondo-warnings!
AM_CFLAGS += -Wall -Wextra -Werror -Wwrite-strings -Wshadow -Wpointer-arith \
-Wdeclaration-after-statement -Wbad-function-cast -Wformat-security \
-Wtype-limits -Wunused-but-set-parameter -Wlogical-op \
-Wignored-qualifiers -Wformat-signedness -Wduplicated-cond
# Unfortunately the Guile headers are sometimes broken. Convince GCC
# to treat them as system headers so warnings are ignored.
GUILE_CFLAGS := $(patsubst -I%,-isystem %,$(GUILE_CFLAGS))
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
# I want this one but I have to wait for the const cleanup!
# -Wwrite-strings
1997-08-18 18:11:04 +00:00
TEMPLATES = README README.DOS README.W32 README.OS2 \
src/config.ami src/configh.dos src/config.h.W32 src/config.h-vms
2002-07-14 02:57:04 +00:00
# Create preprocessor output files--GCC specific!
%.i : %.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $<
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
#
srccvt = $(patsubst src/%,$$(src)%,$(filter %.c,$1))
Remove unsupported build facilities. Over time the non-standard build and install systems (nmake files, smake files, Visual Studio project files, etc.) have atrophied and maintaining them is not worth the effort, for such a simple utility as make. Remove all the non-standard build tool support and unify OS-specific build rules under a basic set of (GNU make) makefiles. Preserve the existing bootstrapping scripts (for POSIX, Windows, and MS-DOS). Also the existing VMS build scripts are left unchanged: I don't have enough experience with VMS to venture into this area. Perhaps one of the VMS maintainers might like to determine whether conversion would be appropriate. Rather than create libraries for w32 and glob (non-POSIX), simply link the object files directly to remove the complexity. * NEWS: Update with user-facing notes. * Makefile.am: Clean up to use the latest automake best practices. Build Windows code directly from the root makefile to avoid recursion. * README.Amiga, README.DOS.template, README.W32.template: Updated. * INSTALL: Point readers at the README.git file. * maintMakefile: Remove obsolete files. Create Basic.mk file. * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. * build_w32.bat: Copy Basic.mk to Makefile * configure.ac: We no longer need AM_PROG_AR. * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. * Makefile.DOS.template: Remove. * NMakefile.template, w32/subproc/NMakefile: Remove. * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. * configure.bat, glob/configure.bat: Remove. * w32/Makefile.am: Remove. * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
2017-11-12 22:44:38 +00:00
Basic.mk: Basic.mk.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@%make_SOURCES%@$(call srccvt,$(make_SRCS))@g' \
-e 's@%glob_SOURCES%@$(patsubst glob/%,$$(glob)%,$(filter %.c,$(glob_SRCS)))@g' \
-e 's@%loadavg_SOURCES%@$(call srccvt,$(loadavg_SRCS))@g' \
-e 's@%alloca_SOURCES%@$(call srccvt,$(alloca_SRCS))@g' \
-e 's@%w32_SOURCES%@$(call srccvt,$(w32_SRCS))@g' \
-e 's@%vms_SOURCES%@$(call srccvt,$(vms_SRCS))@g' \
-e 's@%amiga_SOURCES%@$(call srccvt,$(amiga_SRCS))@g' \
1997-08-27 20:30:54 +00:00
$< > $@
1998-07-30 20:54:47 +00:00
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
sed -e 's@^\([^ ]*\)\.o:@$$(OUTDIR)\1.$$(OBJEXT):@' \
Remove unsupported build facilities. Over time the non-standard build and install systems (nmake files, smake files, Visual Studio project files, etc.) have atrophied and maintaining them is not worth the effort, for such a simple utility as make. Remove all the non-standard build tool support and unify OS-specific build rules under a basic set of (GNU make) makefiles. Preserve the existing bootstrapping scripts (for POSIX, Windows, and MS-DOS). Also the existing VMS build scripts are left unchanged: I don't have enough experience with VMS to venture into this area. Perhaps one of the VMS maintainers might like to determine whether conversion would be appropriate. Rather than create libraries for w32 and glob (non-POSIX), simply link the object files directly to remove the complexity. * NEWS: Update with user-facing notes. * Makefile.am: Clean up to use the latest automake best practices. Build Windows code directly from the root makefile to avoid recursion. * README.Amiga, README.DOS.template, README.W32.template: Updated. * INSTALL: Point readers at the README.git file. * maintMakefile: Remove obsolete files. Create Basic.mk file. * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. * build_w32.bat: Copy Basic.mk to Makefile * configure.ac: We no longer need AM_PROG_AR. * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. * Makefile.DOS.template: Remove. * NMakefile.template, w32/subproc/NMakefile: Remove. * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. * configure.bat, glob/configure.bat: Remove. * w32/Makefile.am: Remove. * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
2017-11-12 22:44:38 +00:00
-e 's@\([^ ]*\.[ch]\)@$$(SRCDIR)/\1@g' \
-e 's@$$(SRCDIR)/src/config.h@$$(OUTDIR)src/config.h@g' \
Remove unsupported build facilities. Over time the non-standard build and install systems (nmake files, smake files, Visual Studio project files, etc.) have atrophied and maintaining them is not worth the effort, for such a simple utility as make. Remove all the non-standard build tool support and unify OS-specific build rules under a basic set of (GNU make) makefiles. Preserve the existing bootstrapping scripts (for POSIX, Windows, and MS-DOS). Also the existing VMS build scripts are left unchanged: I don't have enough experience with VMS to venture into this area. Perhaps one of the VMS maintainers might like to determine whether conversion would be appropriate. Rather than create libraries for w32 and glob (non-POSIX), simply link the object files directly to remove the complexity. * NEWS: Update with user-facing notes. * Makefile.am: Clean up to use the latest automake best practices. Build Windows code directly from the root makefile to avoid recursion. * README.Amiga, README.DOS.template, README.W32.template: Updated. * INSTALL: Point readers at the README.git file. * maintMakefile: Remove obsolete files. Create Basic.mk file. * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. * build_w32.bat: Copy Basic.mk to Makefile * configure.ac: We no longer need AM_PROG_AR. * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. * Makefile.DOS.template: Remove. * NMakefile.template, w32/subproc/NMakefile: Remove. * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. * configure.bat, glob/configure.bat: Remove. * w32/Makefile.am: Remove. * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
2017-11-12 22:44:38 +00:00
$(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 $@
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out src/remote-%,$(make_OBJECTS)))@g' \
Remove unsupported build facilities. Over time the non-standard build and install systems (nmake files, smake files, Visual Studio project files, etc.) have atrophied and maintaining them is not worth the effort, for such a simple utility as make. Remove all the non-standard build tool support and unify OS-specific build rules under a basic set of (GNU make) makefiles. Preserve the existing bootstrapping scripts (for POSIX, Windows, and MS-DOS). Also the existing VMS build scripts are left unchanged: I don't have enough experience with VMS to venture into this area. Perhaps one of the VMS maintainers might like to determine whether conversion would be appropriate. Rather than create libraries for w32 and glob (non-POSIX), simply link the object files directly to remove the complexity. * NEWS: Update with user-facing notes. * Makefile.am: Clean up to use the latest automake best practices. Build Windows code directly from the root makefile to avoid recursion. * README.Amiga, README.DOS.template, README.W32.template: Updated. * INSTALL: Point readers at the README.git file. * maintMakefile: Remove obsolete files. Create Basic.mk file. * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. * build_w32.bat: Copy Basic.mk to Makefile * configure.ac: We no longer need AM_PROG_AR. * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. * Makefile.DOS.template: Remove. * NMakefile.template, w32/subproc/NMakefile: Remove. * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. * configure.bat, glob/configure.bat: Remove. * w32/Makefile.am: Remove. * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
2017-11-12 22:44:38 +00:00
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(filter %.c,$(glob_SRCS)))@g' \
$< > $@
1997-08-18 18:11:04 +00:00
chmod a-w+x $@
Remove unsupported build facilities. Over time the non-standard build and install systems (nmake files, smake files, Visual Studio project files, etc.) have atrophied and maintaining them is not worth the effort, for such a simple utility as make. Remove all the non-standard build tool support and unify OS-specific build rules under a basic set of (GNU make) makefiles. Preserve the existing bootstrapping scripts (for POSIX, Windows, and MS-DOS). Also the existing VMS build scripts are left unchanged: I don't have enough experience with VMS to venture into this area. Perhaps one of the VMS maintainers might like to determine whether conversion would be appropriate. Rather than create libraries for w32 and glob (non-POSIX), simply link the object files directly to remove the complexity. * NEWS: Update with user-facing notes. * Makefile.am: Clean up to use the latest automake best practices. Build Windows code directly from the root makefile to avoid recursion. * README.Amiga, README.DOS.template, README.W32.template: Updated. * INSTALL: Point readers at the README.git file. * maintMakefile: Remove obsolete files. Create Basic.mk file. * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. * build_w32.bat: Copy Basic.mk to Makefile * configure.ac: We no longer need AM_PROG_AR. * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. * Makefile.DOS.template: Remove. * NMakefile.template, w32/subproc/NMakefile: Remove. * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. * configure.bat, glob/configure.bat: Remove. * w32/Makefile.am: Remove. * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
2017-11-12 22:44:38 +00:00
# Use automake to build a dependency list file, for Makebase.mk.
1998-07-30 20:54:47 +00:00
#
Remove unsupported build facilities. Over time the non-standard build and install systems (nmake files, smake files, Visual Studio project files, etc.) have atrophied and maintaining them is not worth the effort, for such a simple utility as make. Remove all the non-standard build tool support and unify OS-specific build rules under a basic set of (GNU make) makefiles. Preserve the existing bootstrapping scripts (for POSIX, Windows, and MS-DOS). Also the existing VMS build scripts are left unchanged: I don't have enough experience with VMS to venture into this area. Perhaps one of the VMS maintainers might like to determine whether conversion would be appropriate. Rather than create libraries for w32 and glob (non-POSIX), simply link the object files directly to remove the complexity. * NEWS: Update with user-facing notes. * Makefile.am: Clean up to use the latest automake best practices. Build Windows code directly from the root makefile to avoid recursion. * README.Amiga, README.DOS.template, README.W32.template: Updated. * INSTALL: Point readers at the README.git file. * maintMakefile: Remove obsolete files. Create Basic.mk file. * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. * build_w32.bat: Copy Basic.mk to Makefile * configure.ac: We no longer need AM_PROG_AR. * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. * Makefile.DOS.template: Remove. * NMakefile.template, w32/subproc/NMakefile: Remove. * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. * configure.bat, glob/configure.bat: Remove. * w32/Makefile.am: Remove. * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
2017-11-12 22:44:38 +00:00
# Automake used to have a --generate-deps flag but it's gone now, so we have
# to do it ourselves.
#
DEP_FILES := $(wildcard src/$(DEPDIR)/*.Po)
1998-07-30 20:54:47 +00:00
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
rm -f $@
(for f in src/$(DEPDIR)/*.Po; do \
echo ""; \
echo "# $$f"; \
sed -e '/^[^:]*\.[ch] *:/d' \
-e 's, /usr/[^ ]*,,g' \
-e 's, $(srcdir)/, ,g' \
-e '/^ *\\$$/d' \
-e '/^ *$$/d' \
< $$f; \
done) > $@
1998-07-30 20:54:47 +00:00
# Cleaning
GIT := git
2013-01-13 02:53:15 +00:00
# git-clean: Clean all "ignored" files. Leave untracked files.
# git-very-clean: Clean all files that aren't stored in source control.
2013-01-13 02:53:15 +00:00
.PHONY: git-clean git-very-clean
git-clean:
-$(GIT) clean -fdX
2013-01-13 02:53:15 +00:00
git-very-clean: git-clean
-$(GIT) clean -fd
## ---------------------- ##
## Generating ChangeLog. ##
## ---------------------- ##
gl2cl-date := 2013-10-10
gl2cl := $(GNULIBDIR)/build-aux/gitlog-to-changelog
# Rebuild the changelog whenever a new commit is added
ChangeLog: .check-git-HEAD
if test -f '$(gl2cl)'; then \
'$(gl2cl)' --since='$(gl2cl-date)' > '$@'; \
else \
echo "WARNING: $(gl2cl) is not available. No $@ generated."; \
fi
.PHONY: .check-git-HEAD
.check-git-HEAD:
sha="`git rev-parse HEAD`"; \
[ -f '$@' ] && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \
|| echo "$$sha" > '$@'
## ---------------- ##
## Updating files. ##
## ---------------- ##
RSYNC = rsync -Lrtvz
WGET = wget --passive-ftp -np -nv
ftp-gnu = ftp://ftp.gnu.org/gnu
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
echo $(target) is unchanged; rm -f $(target).t; \
else \
mv -f $(target).t $(target); \
fi
# ------------------- #
# Updating PO files. #
# ------------------- #
# PO archive mirrors --- Be careful; some might not be fully populated!
# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
# http://translation.sf.net/maint/
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
po_repo = https://translationproject.org/latest/$(PACKAGE)
po_sync = translationproject.org::tp/latest/$(PACKAGE)/
.PHONY: do-po-update po-update
do-po-update:
2006-03-17 18:55:26 +00:00
tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
&& rm -rf "$$tmppo" \
&& mkdir "$$tmppo" \
&& $(RSYNC) $(po_sync) "$$tmppo" \
&& cp "$$tmppo"/*.po $(top_srcdir)/po \
&& rm -rf "$$tmppo"
cd po && $(MAKE) update-po
$(MAKE) po-check
po-update:
[ -d "po" ] && $(MAKE) do-po-update
# -------------------------- #
# Updating GNU build files. #
# -------------------------- #
# The following pseudo table associates a local directory and a URL
# with each of the files that belongs to some other package and is
# regularly updated from the specified URL.
cvs-url = https://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
git-url = https://git.savannah.gnu.org/cgit
target = $(patsubst get-%,%,$@)
config-url = $(git-url)/config.git/plain/$(patsubst get-config/%,%,$@)
get-config/config.guess get-config/config.sub:
@echo $(WGET) $(config-url) -O $(target) \
&& $(WGET) $(config-url) -O $(target).t \
&& $(move_if_change)
gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-config/%,%,$@)
get-config/texinfo.tex:
@echo $(WGET) $(gnulib-url) -O $(target) \
&& $(WGET) $(gnulib-url) -O $(target).t \
&& $(move_if_change)
gnustandards-url = $(cvs-url)/gnustandards/gnustandards/$(patsubst get-doc/%,%,$@)
get-doc/make-stds.texi get-doc/fdl.texi:
@echo $(WGET) $(gnustandards-url) -O $(target) \
&& $(WGET) $(gnustandards-url) -O $(target).t \
&& $(move_if_change)
.PHONY: scm-update
scm-update: get-config/texinfo.tex get-config/config.guess get-config/config.sub get-doc/make-stds.texi get-doc/fdl.texi
# --------------------- #
# Updating everything. #
# --------------------- #
.PHONY: update
update: po-update scm-update
# ---------------------------------- #
# Alternative configuration checks. #
# ---------------------------------- #
.PHONY: check-alt-config
check-alt-config: \
checkcfg.--disable-job-server \
checkcfg.--disable-load \
checkcfg.--without-guile \
checkcfg.CPPFLAGS^-DNO_OUTPUT_SYNC \
checkcfg.CPPFLAGS^-DNO_ARCHIVES
# Trick GNU make so it doesn't run the submake as a recursive make.
NR_MAKE = $(MAKE)
# Check builds both with build.sh and with make and with Basic.mk
checkcfg.%: distdir
@echo "Building $@ (output in checkcfg.$*.log)"
exec >'checkcfg.$*.log' 2>&1; \
rm -rf $(distdir)/_build \
&& mkdir $(distdir)/_build \
&& cd $(distdir)/_build \
&& echo "Testing configure with $(subst ^,=,$*)" \
&& ../configure --srcdir=.. $(subst ^,=,$*) \
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
exec >>'checkcfg.$*.log' 2>&1; \
cd $(distdir)/_build \
&& ./build.sh \
&& ./make $(AM_MAKEFLAGS) check \
&& ./make $(AM_MAKEFLAGS) clean
exec >>'checkcfg.$*.log' 2>&1; \
cd $(distdir)/_build \
&& $(NR_MAKE) $(AM_MAKEFLAGS) CFLAGS='$(AM_CFLAGS)' \
&& ./make $(AM_MAKEFLAGS) check \
&& ./make $(AM_MAKEFLAGS) clean
# Try the different build methods
checkcfg.basicmk: checkcfg.% : distdir
@echo "Building $@ (output in checkcfg.$*.log)"
exec >'checkcfg.$*.log' 2>&1; \
rm -rf $(distdir)/_build \
&& mkdir $(distdir)/_build \
&& cd $(distdir)/_build \
&& echo "Testing Basic.mk SRCDIR=.." \
&& ../configure --srcdir=.. \
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
exec >>'checkcfg.$*.log' 2>&1; \
cd $(distdir)/_build \
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f ../Basic.mk CFLAGS='$(AM_CFLAGS)' SRCDIR=.. \
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. check \
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. clean
exec >>'checkcfg.$*.log' 2>&1; \
echo "Testing Basic.mk SRCDIR=." \
&& rm -rf $(distdir)/_build \
&& cd $(distdir) \
&& ./configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f Basic.mk CFLAGS='$(AM_CFLAGS)' \
&& ./make $(AM_MAKEFLAGS) -f Basic.mk check \
&& ./make $(AM_MAKEFLAGS) -f Basic.mk clean
## --------------- ##
## Sanity checks. ##
## --------------- ##
# Before we build a distribution be sure we run our local checks
#distdir: local-check
.PHONY: local-check po-check changelog-check
# Checks that don't require Git. Run 'changelog-check' last as
# previous test may reveal problems requiring new ChangeLog entries.
local-check: po-check changelog-check
# copyright-check writable-files
changelog-check:
if head $(top_srcdir)/ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
:; \
else \
echo "$(VERSION) not in ChangeLog" 1>&2; \
exit 1; \
fi
# Verify that all source files using _() are listed in po/POTFILES.in.
# Ignore src/makeint.h; it defines _().
po-check:
if test -f po/POTFILES.in; then \
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "./src/makeint.h" || print "$$ARGV\n" and close ARGV }' `find . -name '*.[ch]'` | sed 's,^\./,,' | sort > $@-2; \
diff -u $@-1 $@-2 || exit 1; \
rm -f $@-1 $@-2; \
fi
## --------------- ##
## Generate docs. ##
## --------------- ##
2014-10-05 16:18:08 +00:00
.PHONY: update-makeweb gendocs
CVS = cvs
makeweb-repo = $(USER)@cvs.sv.gnu.org:/web/make
gnuweb-repo = :pserver:anonymous@cvs.sv.gnu.org:/web/www
gnuweb-dir = www/server/standards
# Get the GNU make web page boilerplate etc.
update-makeweb:
[ -d '$(MAKEWEBDIR)' ] || mkdir -p '$(MAKEWEBDIR)'
[ -d '$(MAKEWEBDIR)'/CVS ] \
&& { cd '$(MAKEWEBDIR)' && $(CVS) update; } \
|| { mkdir -p '$(dir $(MAKEWEBDIR))' && cd '$(dir $(MAKEWEBDIR))' \
&& $(CVS) -d $(makeweb-repo) co -d '$(notdir $(MAKEWEBDIR))' make; }
# Get the GNU web page boilerplate etc.
update-gnuweb:
[ -d '$(GNUWEBDIR)' ] || mkdir -p '$(GNUWEBDIR)'
[ -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS ] \
&& { cd '$(GNUWEBDIR)/$(gnuweb-dir)' && $(CVS) update; } \
|| { cd '$(GNUWEBDIR)' && $(CVS) -d $(gnuweb-repo) co '$(gnuweb-dir)'; }
gendocs: update-gnuweb update-makeweb
cp $(GNULIBDIR)/doc/gendocs_template doc
cd doc \
&& rm -rf doc/manual \
&& $(GNULIBDIR)/build-aux/gendocs.sh --email '$(BUGLIST)' \
make 'GNU Make Manual'
find '$(MAKEWEBDIR)'/manual \( -name CVS -prune \) -o \( -name '[!.]*' -type f -exec rm -f '{}' \; \)
cp -r doc/manual '$(MAKEWEBDIR)'
@echo 'Status of $(MAKEWEBDIR) repo:' && cd '$(MAKEWEBDIR)' \
2014-10-05 16:18:08 +00:00
&& cvs -q -n update | grep -v '^M ' \
&& echo '- cvs add <new files>' \
&& echo '- cvs remove <deleted files>' \
&& echo '- cvs commit' \
&& echo '- cvs tag make-$(subst .,-,$(VERSION))'
## --------------------------------------------- ##
## Submitting Coverity cov-build results to Scan ##
## --------------------------------------------- ##
# Note you must have set COVERITY_TOKEN and COVERITY_EMAIL properly
# to submit results. COVERITY_PATH can be set to the root of the
# cov-build tools if it's not already on your PATH.
COV_BUILD_FILE := cov-build.tgz
.PHONY: cov-build cov-submit
cov-build: $(COV_BUILD_FILE)
$(COV_BUILD_FILE): $(filter %.c %.h,$(DISTFILES))
$(MAKE) distdir
@echo "Running Coverity cov-build"
rm -rf '$(distdir)'/_build
mkdir '$(distdir)'/_build
cd '$(distdir)'/_build \
&& ../configure --srcdir=.. \
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
CFLAGS='$(AM_CFLAGS)'
PATH="$${COVERITY_PATH:+$$COVERITY_PATH/bin:}$$PATH"; \
cd '$(distdir)'/_build \
&& cov-build --dir cov-int ./build.sh
rm -f '$@'
(cd '$(distdir)'/_build && tar czf - cov-int) > '$@'
cov-submit: $(COV_BUILD_FILE)-submitted
$(COV_BUILD_FILE)-submitted: $(COV_BUILD_FILE)
@[ -n "$(COVERITY_TOKEN)" ] || { echo 'COVERITY_TOKEN not set'; exit 1; }
@[ -n "$(COVERITY_EMAIL)" ] || { echo 'COVERITY_EMAIL not set'; exit 1; }
rm -f '$@'
case '$(VERSION)' in \
(*.*.9*) type="daily build"; ext=".$$(date +%Y%m%d)" ;; \
(*) type="release"; ext= ;; \
esac; \
curl --form token='$(COVERITY_TOKEN)' \
--form email='$(COVERITY_EMAIL)' \
--form file='@$<' \
--form version="$(VERSION)$$ext" \
--form description="GNU make $$type" \
'https://scan.coverity.com/builds?project=gmake'
cp '$<' '$@'
2013-10-09 05:54:24 +00:00
## ------------------------- ##
## Make release targets. ##
## ------------------------- ##
.PHONY: tag-release
2013-10-09 05:54:24 +00:00
tag-release:
case '$(VERSION)' in \
(*.*.9*) message=" candidate" ;; \
(*) message= ;; \
esac; \
$(GIT) tag -m "GNU Make release$$message $(VERSION)" -u '$(GPG_KEYID)' '$(VERSION)'
2013-10-09 05:54:24 +00:00
## ------------------------- ##
## GNU FTP upload artifacts. ##
## ------------------------- ##
# This target creates the upload artifacts.
# Sign it with my key. If you don't have my key/passphrase then sorry,
# you're SOL! :)
GPG = gpg
GPGFLAGS = -u $(GPG_KEYID)
DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES))
DIST_ARCHIVES_DIRECTIVE = $(addsuffix .directive.asc,$(DIST_ARCHIVES))
# A simple rule to test signing, etc.
2004-03-06 08:00:17 +00:00
.PHONY: distsign
distsign: $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
%.sig : %
@echo "Signing file '$<':"
$(GPG) $(GPGFLAGS) -o "$@" -b "$<"
%.directive.asc: %
@echo "Creating signed directive file '$@':"
@( \
echo 'version: 1.2'; \
echo 'directory: make'; \
echo 'filename: $*'; \
echo 'comment: Official upload of GNU make version $(VERSION)'; \
) > "$*.directive"
$(GPG) $(GPGFLAGS) -o "$@" --clearsign "$*.directive"
@rm -f "$*.directive"
2004-03-06 08:00:17 +00:00
# Upload the artifacts
FTPPUT = ncftpput
2010-07-07 02:06:48 +00:00
gnu-upload-host = ftp-upload.gnu.org
gnu-upload-dir = /incoming
2004-03-06 08:00:17 +00:00
UPLOADS = upload-alpha upload-ftp
.PHONY: $(UPLOADS)
$(UPLOADS): $(DIST_ARCHIVES) $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
2010-07-07 02:06:48 +00:00
$(FTPPUT) "$(gnu-upload-host)" "$(gnu-upload-dir)/$(@:upload-%=%)" $^
# Rebuild Makefile.in if this file is modifed.
Makefile.in: maintMakefile
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.