1997-08-18 18:11:04 +00:00
|
|
|
# Maintainer-only makefile segment. This contains things that are relevant
|
2023-01-01 21:25:39 +00:00
|
|
|
# only if you have the full copy of the GNU Make sources from the Git
|
1999-03-30 06:19:17 +00:00
|
|
|
# tree, not a dist copy.
|
2004-01-21 06:32:59 +00:00
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
# --------------------- #
|
|
|
|
# Updating everything. #
|
|
|
|
# --------------------- #
|
|
|
|
|
|
|
|
.PHONY: update
|
|
|
|
update:
|
|
|
|
|
2013-10-13 14:54:32 +00:00
|
|
|
BUGLIST := bug-make@gnu.org
|
|
|
|
|
|
|
|
# These are related to my personal setup.
|
2016-10-23 20:34:55 +00:00
|
|
|
GPG_KEYID := 80CB727A20C79BB2
|
2013-10-19 16:09:13 +00:00
|
|
|
|
|
|
|
# SRCROOTDIR is just a handy location to keep source files in
|
|
|
|
SRCROOTDIR ?= $(HOME)/src
|
|
|
|
|
|
|
|
# Where to put the CVS checkout of the GNU web repository
|
|
|
|
GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
|
|
|
|
|
2023-01-01 21:25:39 +00:00
|
|
|
# Where to put the CVS checkout of the GNU Make web repository
|
2013-10-19 16:09:13 +00:00
|
|
|
MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
|
2013-10-09 05:54:24 +00:00
|
|
|
|
2019-10-05 19:14:32 +00:00
|
|
|
# Enable Perl warnings for the test suite
|
|
|
|
PERLFLAGS := -w
|
|
|
|
|
2004-01-21 06:32:59 +00:00
|
|
|
# We like mondo-warnings!
|
2018-07-01 19:45:46 +00:00
|
|
|
# Also force comments to be preserved. This helps when using ccache, in
|
|
|
|
# combination with GCC 7's implicit-fallthrough warning.
|
2019-09-03 16:24:54 +00:00
|
|
|
MAKE_CFLAGS := -C -Wall -Wextra -Werror -Wwrite-strings -Wshadow \
|
2016-12-18 02:50:50 +00:00
|
|
|
-Wdeclaration-after-statement -Wbad-function-cast -Wformat-security \
|
2018-07-01 19:45:46 +00:00
|
|
|
-Wtype-limits -Wunused-but-set-parameter -Wlogical-op -Wpointer-arith \
|
2016-12-18 02:50:50 +00:00
|
|
|
-Wignored-qualifiers -Wformat-signedness -Wduplicated-cond
|
|
|
|
|
2019-09-03 16:24:54 +00:00
|
|
|
AM_CFLAGS += $(MAKE_CFLAGS)
|
|
|
|
|
2016-12-18 02:50:50 +00:00
|
|
|
# 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))
|
2006-04-09 22:09:24 +00:00
|
|
|
|
2011-02-21 07:30:11 +00:00
|
|
|
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
|
|
|
|
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
|
|
|
|
|
2016-04-10 00:06:06 +00:00
|
|
|
# Create preprocessor output files--GCC specific!
|
|
|
|
%.i : %.c
|
|
|
|
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $<
|
|
|
|
|
2022-10-16 19:13:41 +00:00
|
|
|
# Create the mkconfig.h file for non-POSIX config headers
|
|
|
|
|
|
|
|
all: src/mkconfig.h
|
|
|
|
src/mkconfig.h: src/mkconfig.h.in config.status
|
|
|
|
./config.status --header=$@
|
|
|
|
|
|
|
|
# Build the README
|
|
|
|
|
|
|
|
all: README
|
|
|
|
README : README.in config.status
|
|
|
|
./config.status --file=$@
|
1997-08-27 20:30:54 +00:00
|
|
|
|
1998-07-30 20:54:47 +00:00
|
|
|
# Construct Makefiles by adding on dependencies, etc.
|
1997-08-27 20:30:54 +00:00
|
|
|
#
|
2018-07-01 16:28:25 +00:00
|
|
|
cvt = $(patsubst $1/%,$$($1)%,$(filter %.c,$2))
|
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 $@
|
2022-10-16 19:13:41 +00:00
|
|
|
sed -e 's@%make_SOURCES%@$(call cvt,src,$(make_SRCS))@g' \
|
2018-07-01 16:28:25 +00:00
|
|
|
-e 's@%w32_SOURCES%@$(call cvt,src,$(w32_SRCS))@g' \
|
|
|
|
-e 's@%vms_SOURCES%@$(call cvt,src,$(vms_SRCS))@g' \
|
|
|
|
-e 's@%amiga_SOURCES%@$(call cvt,src,$(amiga_SRCS))@g' \
|
|
|
|
-e 's@%loadavg_SOURCES%@$(call cvt,lib,$(loadavg_SRCS))@g' \
|
|
|
|
-e 's@%alloca_SOURCES%@$(call cvt,lib,$(alloca_SRCS))@g' \
|
|
|
|
-e 's@%glob_SOURCES%@$(call cvt,lib,$(glob_SRCS))@g' \
|
1997-08-27 20:30:54 +00:00
|
|
|
$< > $@
|
1998-07-30 20:54:47 +00:00
|
|
|
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
2022-10-16 19:13:41 +00:00
|
|
|
echo >>$@; echo '$$(OBJECTS): $$(SRCDIR)/src/mkconfig.h' >>$@; \
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
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' \
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
-e 's@$$(SRCDIR)/src/config.h@$$(OUTDIR)src/config.h@g' \
|
2022-08-30 17:41:37 +00:00
|
|
|
-e 's@$$(SRCDIR)/lib/alloca.h@@g' \
|
|
|
|
-e 's@$$(SRCDIR)/lib/stdbool.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 $@
|
|
|
|
|
2002-04-22 04:35:19 +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
|
|
|
# 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
|
2002-04-22 04:35:19 +00:00
|
|
|
# to do it ourselves.
|
|
|
|
#
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
DEP_FILES := $(wildcard src/$(DEPDIR)/*.Po)
|
1998-07-30 20:54:47 +00:00
|
|
|
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
2005-07-12 04:35:13 +00:00
|
|
|
rm -f $@
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
(for f in src/$(DEPDIR)/*.Po; do \
|
2004-11-30 20:58:52 +00:00
|
|
|
echo ""; \
|
|
|
|
echo "# $$f"; \
|
2005-07-12 04:35:13 +00:00
|
|
|
sed -e '/^[^:]*\.[ch] *:/d' \
|
|
|
|
-e 's, /usr/[^ ]*,,g' \
|
|
|
|
-e 's, $(srcdir)/, ,g' \
|
|
|
|
-e '/^ *\\$$/d' \
|
|
|
|
-e '/^ *$$/d' \
|
|
|
|
< $$f; \
|
2004-11-30 20:58:52 +00:00
|
|
|
done) > $@
|
1998-07-30 20:54:47 +00:00
|
|
|
|
2013-01-13 00:31:13 +00:00
|
|
|
# Cleaning
|
2002-08-10 01:27:16 +00:00
|
|
|
|
2013-01-13 00:31:13 +00:00
|
|
|
GIT := git
|
2006-10-01 05:38:38 +00:00
|
|
|
|
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.
|
2004-02-23 06:25:54 +00:00
|
|
|
|
2013-01-13 02:53:15 +00:00
|
|
|
.PHONY: git-clean git-very-clean
|
2013-01-13 00:31:13 +00:00
|
|
|
git-clean:
|
|
|
|
-$(GIT) clean -fdX
|
2013-01-13 02:53:15 +00:00
|
|
|
git-very-clean: git-clean
|
2022-09-10 22:27:37 +00:00
|
|
|
-$(GIT) clean -fdx
|
2002-07-08 02:26:47 +00:00
|
|
|
|
|
|
|
|
2013-10-13 14:54:32 +00:00
|
|
|
## ---------------------- ##
|
|
|
|
## Generating ChangeLog. ##
|
|
|
|
## ---------------------- ##
|
|
|
|
|
2022-09-10 22:27:37 +00:00
|
|
|
# Where the gnulib project has been locally cloned
|
|
|
|
GNULIBDIR ?= $(or $(wildcard $(GNULIB_SRCDIR)),./gnulib)
|
|
|
|
|
2013-10-13 14:54:32 +00:00
|
|
|
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
|
|
|
|
|
2021-03-14 19:53:45 +00:00
|
|
|
.check-git-HEAD: FORCE
|
2013-10-13 14:54:32 +00:00
|
|
|
sha="`git rev-parse HEAD`"; \
|
2020-05-03 17:39:55 +00:00
|
|
|
test -f '$@' && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \
|
2013-10-13 14:54:32 +00:00
|
|
|
|| echo "$$sha" > '$@'
|
2002-07-08 02:26:47 +00:00
|
|
|
|
2021-03-14 19:53:45 +00:00
|
|
|
.PHONY: FORCE
|
|
|
|
FORCE:;@:
|
2002-07-08 02:26:47 +00:00
|
|
|
|
|
|
|
## ---------------- ##
|
|
|
|
## Updating files. ##
|
|
|
|
## ---------------- ##
|
2016-06-06 12:32:00 +00:00
|
|
|
RSYNC = rsync -Lrtvz
|
2014-09-07 20:54:36 +00:00
|
|
|
WGET = wget --passive-ftp -np -nv
|
2002-07-08 02:26:47 +00:00
|
|
|
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 \
|
2014-09-07 20:54:36 +00:00
|
|
|
mv -f $(target).t $(target); \
|
2002-07-08 02:26:47 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# ------------------- #
|
|
|
|
# Updating PO files. #
|
|
|
|
# ------------------- #
|
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
# NOTE: This is handled by the bootstrap script now
|
|
|
|
|
|
|
|
#update: po-update
|
|
|
|
update: po-check
|
|
|
|
|
2005-07-04 03:50:59 +00:00
|
|
|
# PO archive mirrors --- Be careful; some might not be fully populated!
|
|
|
|
# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
|
|
|
|
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
|
|
|
|
2021-12-18 23:23:16 +00:00
|
|
|
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
po_repo = https://translationproject.org/latest/$(PACKAGE)
|
2016-06-06 12:32:00 +00:00
|
|
|
po_sync = translationproject.org::tp/latest/$(PACKAGE)/
|
|
|
|
|
2002-07-08 02:26:47 +00:00
|
|
|
.PHONY: do-po-update po-update
|
|
|
|
do-po-update:
|
2022-10-16 19:13:41 +00:00
|
|
|
tmppo="/tmp/po-$(PACKAGE)-$(PACKAGE_VERSION).$$$$" \
|
2006-03-17 18:55:26 +00:00
|
|
|
&& rm -rf "$$tmppo" \
|
|
|
|
&& mkdir "$$tmppo" \
|
2016-06-06 12:32:00 +00:00
|
|
|
&& $(RSYNC) $(po_sync) "$$tmppo" \
|
2014-09-07 20:54:36 +00:00
|
|
|
&& cp "$$tmppo"/*.po $(top_srcdir)/po \
|
|
|
|
&& rm -rf "$$tmppo"
|
2002-07-08 02:26:47 +00:00
|
|
|
cd po && $(MAKE) update-po
|
|
|
|
$(MAKE) po-check
|
|
|
|
|
|
|
|
po-update:
|
2020-05-03 17:39:55 +00:00
|
|
|
test -d "po" && $(MAKE) do-po-update
|
2002-07-08 02:26:47 +00:00
|
|
|
|
|
|
|
# -------------------------- #
|
2005-02-09 21:28:00 +00:00
|
|
|
# Updating GNU build files. #
|
2002-07-08 02:26:47 +00:00
|
|
|
# -------------------------- #
|
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
# Note: this is handled by the bootstrap script now
|
|
|
|
#update: scm-update
|
|
|
|
|
|
|
|
.PHONY: scm-update
|
|
|
|
scm-update: get-build-aux/texinfo.tex get-build-aux/config.guess \
|
|
|
|
get-build-aux/config.sub get-doc/make-stds.texi get-doc/fdl.texi
|
|
|
|
|
2002-07-08 02:26:47 +00:00
|
|
|
# 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.
|
|
|
|
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
cvs-url = https://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
|
|
|
git-url = https://git.savannah.gnu.org/cgit
|
2002-07-08 02:26:47 +00:00
|
|
|
target = $(patsubst get-%,%,$@)
|
2004-02-23 06:25:54 +00:00
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
config-url = $(git-url)/config.git/plain/$(patsubst get-build-aux/%,%,$@)
|
|
|
|
get-build-aux/config.guess get-build-aux/config.sub:
|
2020-05-03 17:23:41 +00:00
|
|
|
@echo Retrieving $(target) from $(config-url)
|
|
|
|
$(WGET) $(config-url) -O $(target).t \
|
2003-10-22 04:35:27 +00:00
|
|
|
&& $(move_if_change)
|
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-build-aux/%,%,$@)
|
|
|
|
get-build-aux/texinfo.tex:
|
2020-05-03 17:23:41 +00:00
|
|
|
@echo Retrieving $(target) from $(gnulib-url)
|
|
|
|
$(WGET) $(gnulib-url) -O $(target).t \
|
2004-02-23 06:25:54 +00:00
|
|
|
&& $(move_if_change)
|
|
|
|
|
2009-06-04 06:30:27 +00:00
|
|
|
gnustandards-url = $(cvs-url)/gnustandards/gnustandards/$(patsubst get-doc/%,%,$@)
|
2005-02-09 21:28:00 +00:00
|
|
|
get-doc/make-stds.texi get-doc/fdl.texi:
|
2020-05-03 17:23:41 +00:00
|
|
|
@echo Retrieving $(target) from $(gnustandards-url)
|
|
|
|
$(WGET) $(gnustandards-url) -O $(target).t \
|
2005-02-09 21:28:00 +00:00
|
|
|
&& $(move_if_change)
|
2002-07-08 02:26:47 +00:00
|
|
|
|
2002-07-08 13:05:02 +00:00
|
|
|
|
2020-05-03 14:21:39 +00:00
|
|
|
# ---------------------------- #
|
|
|
|
# Extra configuration checks. #
|
|
|
|
# ---------------------------- #
|
|
|
|
|
2022-09-08 04:04:11 +00:00
|
|
|
# Make the dist file contents more regular, if we're using GNU tar.
|
|
|
|
# Suggested by Tzvetelin Katchov <katchov@gnu.org>
|
|
|
|
|
|
|
|
export TAR_OPTIONS := --mode=u+w,go-w --owner=0 --group=0 --numeric-owner --sort=name
|
|
|
|
|
2020-05-03 14:21:39 +00:00
|
|
|
# When I released 4.3 somehow the INSTALL file was missing.
|
|
|
|
# When I tried to build it again, it was there. I have no idea what happened
|
|
|
|
# but add a new check to be sure it doesn't happen again.
|
2022-10-16 19:13:41 +00:00
|
|
|
mk_dist_files = AUTHORS ChangeLog COPYING INSTALL README src/mkconfig.h
|
2020-05-03 14:21:39 +00:00
|
|
|
|
2023-01-02 05:52:32 +00:00
|
|
|
dist: mk-dist mk-distcheck
|
2020-05-03 14:21:39 +00:00
|
|
|
|
|
|
|
.PHONY: mk-distcheck
|
|
|
|
mk-distcheck: distdir
|
|
|
|
@echo "Checking for extra installed files..."
|
2023-01-02 05:52:32 +00:00
|
|
|
@for fn in $(mk_dist_files); do \
|
2020-05-03 14:21:39 +00:00
|
|
|
test -f '$(distdir)'/"$$fn" \
|
2020-11-29 22:40:34 +00:00
|
|
|
|| { echo "Missing dist file: $$fn"; exit 1; }; \
|
2020-05-03 14:21:39 +00:00
|
|
|
done; true
|
|
|
|
|
2023-01-02 05:52:32 +00:00
|
|
|
# Make sure that the files in lib/ have been updated from the files in gl/lib/
|
|
|
|
|
|
|
|
GL_LIB_FILES := $(wildcard gl/lib/*)
|
|
|
|
|
|
|
|
mk-dist:
|
|
|
|
@echo "Checking gl/lib files..."
|
|
|
|
@for fn in $(GL_LIB_FILES); do \
|
|
|
|
cmp $$fn $${fn##gl/} \
|
|
|
|
|| { echo "Run ./bootstrap --gen ?"; exit 1; }; \
|
|
|
|
done; true
|
2020-05-03 14:21:39 +00:00
|
|
|
|
2013-09-21 22:10:08 +00:00
|
|
|
# ---------------------------------- #
|
|
|
|
# Alternative configuration checks. #
|
|
|
|
# ---------------------------------- #
|
|
|
|
|
2020-01-03 23:19:33 +00:00
|
|
|
CFGCHECK_CONFIGFLAGS =
|
|
|
|
CFGCHECK_BUILDFLAGS =
|
2022-07-04 21:20:30 +00:00
|
|
|
# We can't use our mondo warnings as these are used to compile gnulib modules
|
|
|
|
# as well, and that will fail.
|
|
|
|
CFGCHECK_MAKEFLAGS = # CFLAGS='$(AM_CFLAGS)'
|
2020-01-03 23:19:33 +00:00
|
|
|
|
2022-10-28 17:03:18 +00:00
|
|
|
# We don't support C90 anymore, strictly, but this test still works (with lots
|
|
|
|
# of warnings) and it helps us avoid egregious incompatibilities.
|
2020-01-03 23:19:33 +00:00
|
|
|
checkcfg.strict-c90: CFGCHECK_CONFIGFLAGS = CFLAGS='-std=c90 -pedantic'
|
|
|
|
checkcfg.strict-c90: CFGCHECK_MAKEFLAGS =
|
|
|
|
|
2023-02-18 18:20:00 +00:00
|
|
|
checkcfg.job-pipe: CFGCHECK_CONFIGFLAGS = CPPFLAGS=-DJOBSERVER_USE_FIFO=0
|
2020-01-03 23:19:33 +00:00
|
|
|
checkcfg.no-jobserver:CFGCHECK_CONFIGFLAGS = --disable-job-server
|
|
|
|
checkcfg.no-load: CFGCHECK_CONFIGFLAGS = --disable-load
|
|
|
|
checkcfg.no-guile: CFGCHECK_CONFIGFLAGS = --without-guile
|
|
|
|
checkcfg.no-spawn: CFGCHECK_CONFIGFLAGS = --disable-posix-spawn
|
|
|
|
checkcfg.no-sysglob: CFGCHECK_CONFIGFLAGS = make_cv_sys_gnu_glob=no
|
|
|
|
checkcfg.no-loadavg: CFGCHECK_CONFIGFLAGS = ac_cv_func_getloadavg=no \
|
2020-11-29 22:40:34 +00:00
|
|
|
ac_cv_have_decl_getloadavg=no \
|
|
|
|
gl_cv_have_raw_decl_getloadavg=no \
|
|
|
|
ac_cv_lib_util_getloadavg=no \
|
|
|
|
ac_cv_lib_getloadavg_getloadavg=no
|
2020-01-03 23:19:33 +00:00
|
|
|
checkcfg.no-sync: CFGCHECK_CONFIGFLAGS = CPPFLAGS=-DNO_OUTPUT_SYNC
|
|
|
|
checkcfg.no-archives: CFGCHECK_CONFIGFLAGS = CPPFLAGS=-DNO_ARCHIVES
|
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
CONFIG_CHECKS := \
|
2022-10-28 17:03:18 +00:00
|
|
|
checkcfg.strict-c90 \
|
2023-02-18 18:20:00 +00:00
|
|
|
checkcfg.job-pipe \
|
2020-01-03 23:19:33 +00:00
|
|
|
checkcfg.no-jobserver \
|
|
|
|
checkcfg.no-load \
|
|
|
|
checkcfg.no-guile \
|
|
|
|
checkcfg.no-spawn \
|
|
|
|
checkcfg.no-sysglob \
|
|
|
|
checkcfg.no-loadavg \
|
|
|
|
checkcfg.no-sync \
|
|
|
|
checkcfg.no-archives
|
2013-09-21 22:10:08 +00:00
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
.PHONY: check-alt-config
|
|
|
|
check-alt-config: $(CONFIG_CHECKS)
|
2023-01-14 19:05:18 +00:00
|
|
|
@echo --- $@ SUCCESS
|
2018-07-01 16:28:25 +00:00
|
|
|
|
2023-01-01 21:25:39 +00:00
|
|
|
# Trick GNU Make so it doesn't run the submake as a recursive make.
|
2013-10-19 16:22:36 +00:00
|
|
|
NR_MAKE = $(MAKE)
|
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
# Check builds both with build.sh and with make
|
2022-07-04 21:20:30 +00:00
|
|
|
build.sh_SCRIPT = exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
|
|
|
cd $(distdir)/_build \
|
2022-10-28 21:10:28 +00:00
|
|
|
&& OUTDIR=_bld ../build.sh -k $(CFGCHECK_BUILD_FLAGS) \
|
2022-07-04 21:20:30 +00:00
|
|
|
&& _bld/make GMK_OUTDIR=../_bld $(AM_MAKEFLAGS) check-local \
|
|
|
|
&& _bld/make GMK_OUTDIR=../_bld $(AM_MAKEFLAGS) clean
|
|
|
|
|
|
|
|
nrmake_SCRIPT = exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
|
|
|
cd $(distdir)/_build \
|
|
|
|
&& $(NR_MAKE) $(AM_MAKEFLAGS) $(CFGCHECK_MAKEFLAGS) \
|
|
|
|
&& ./make $(AM_MAKEFLAGS) check \
|
|
|
|
&& ./make $(AM_MAKEFLAGS) clean
|
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
$(CONFIG_CHECKS): checkcfg.%: distdir
|
2016-04-04 05:15:17 +00:00
|
|
|
@echo "Building $@ (output in checkcfg.$*.log)"
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
exec >'checkcfg.$*.log' 2>&1; \
|
2020-01-03 23:19:33 +00:00
|
|
|
echo "Testing configure with $(CFGCHECK_CONFIGFLAGS)"; set -x; \
|
2016-04-04 05:15:17 +00:00
|
|
|
rm -rf $(distdir)/_build \
|
2013-09-21 22:10:08 +00:00
|
|
|
&& mkdir $(distdir)/_build \
|
|
|
|
&& cd $(distdir)/_build \
|
2020-01-03 23:19:33 +00:00
|
|
|
&& ../configure --srcdir=.. $(CFGCHECK_CONFIGFLAGS) \
|
2020-11-29 22:40:34 +00:00
|
|
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
|
2022-07-04 21:20:30 +00:00
|
|
|
$(build.sh_SCRIPT)
|
|
|
|
$(nrmake_SCRIPT)
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
|
2018-07-01 16:28:25 +00:00
|
|
|
# Try using Basic.mk. I can't test this on POSIX systems because it is only
|
|
|
|
# used for non-POSIX systems; POSIX systems can just use normal
|
|
|
|
# configure/Makefile.in etc.
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
checkcfg.basicmk: checkcfg.% : distdir
|
|
|
|
@echo "Building $@ (output in checkcfg.$*.log)"
|
|
|
|
exec >'checkcfg.$*.log' 2>&1; \
|
2018-07-01 16:28:25 +00:00
|
|
|
echo "Testing Basic.mk SRCDIR=.."; set -x; \
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
rm -rf $(distdir)/_build \
|
|
|
|
&& mkdir $(distdir)/_build \
|
|
|
|
&& cd $(distdir)/_build \
|
|
|
|
&& ../configure --srcdir=.. \
|
2020-11-29 22:40:34 +00:00
|
|
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
|
2018-07-01 16:28:25 +00:00
|
|
|
exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
cd $(distdir)/_build \
|
2022-07-04 21:20:30 +00:00
|
|
|
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. $(CFGCHECK_MAKEFLAGS)
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. check \
|
|
|
|
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. clean
|
|
|
|
exec >>'checkcfg.$*.log' 2>&1; \
|
2018-07-01 16:28:25 +00:00
|
|
|
echo "Testing Basic.mk SRCDIR=."; set -x; \
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
&& rm -rf $(distdir)/_build \
|
|
|
|
&& cd $(distdir) \
|
|
|
|
&& ./configure \
|
2020-11-29 22:40:34 +00:00
|
|
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
2023-01-01 14:55:24 +00:00
|
|
|
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f Basic.mk '$(CFGCHECK_MAKEFLAGS)' \
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
&& ./make $(AM_MAKEFLAGS) -f Basic.mk check \
|
|
|
|
&& ./make $(AM_MAKEFLAGS) -f Basic.mk clean
|
2013-09-21 22:10:08 +00:00
|
|
|
|
|
|
|
|
2002-07-08 13:05:02 +00:00
|
|
|
## --------------- ##
|
|
|
|
## Sanity checks. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
2013-09-21 22:10:08 +00:00
|
|
|
# Before we build a distribution be sure we run our local checks
|
|
|
|
#distdir: local-check
|
|
|
|
|
2013-10-13 14:54:32 +00:00
|
|
|
.PHONY: local-check po-check changelog-check
|
|
|
|
|
2013-01-13 00:31:13 +00:00
|
|
|
# Checks that don't require Git. Run 'changelog-check' last as
|
2002-07-08 13:05:02 +00:00
|
|
|
# previous test may reveal problems requiring new ChangeLog entries.
|
|
|
|
local-check: po-check changelog-check
|
|
|
|
|
|
|
|
# copyright-check writable-files
|
|
|
|
|
|
|
|
changelog-check:
|
2022-10-16 19:13:41 +00:00
|
|
|
if head $(top_srcdir)/ChangeLog | grep 'Version $(PACKAGE_VERSION)' >/dev/null; then \
|
2002-07-08 13:05:02 +00:00
|
|
|
:; \
|
|
|
|
else \
|
2022-10-16 19:13:41 +00:00
|
|
|
echo "$(PACKAGE_VERSION) not in ChangeLog" 1>&2; \
|
2002-07-08 13:05:02 +00:00
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Verify that all source files using _() are listed in po/POTFILES.in.
|
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.
* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 18:49:26 +00:00
|
|
|
# Ignore src/makeint.h; it defines _().
|
2002-07-08 13:05:02 +00:00
|
|
|
po-check:
|
|
|
|
if test -f po/POTFILES.in; then \
|
2006-10-01 05:38:38 +00:00
|
|
|
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
2019-05-11 14:30:26 +00:00
|
|
|
find [a-z]* -name '*.[ch]' | xargs grep -l '\b_(' | grep -v src/makeint.h | sort > $@-2; \
|
2002-07-08 13:05:02 +00:00
|
|
|
diff -u $@-1 $@-2 || exit 1; \
|
|
|
|
rm -f $@-1 $@-2; \
|
|
|
|
fi
|
2004-03-04 13:42:51 +00:00
|
|
|
|
2013-10-13 18:42:23 +00:00
|
|
|
|
|
|
|
## --------------- ##
|
|
|
|
## Generate docs. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
2014-10-05 16:18:08 +00:00
|
|
|
.PHONY: update-makeweb gendocs
|
2013-10-13 18:42:23 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-01-01 21:25:39 +00:00
|
|
|
# Get the GNU Make web page boilerplate etc.
|
2013-10-13 18:42:23 +00:00
|
|
|
update-makeweb:
|
2020-05-03 17:39:55 +00:00
|
|
|
test -d '$(MAKEWEBDIR)' || mkdir -p '$(MAKEWEBDIR)'
|
|
|
|
test -d '$(MAKEWEBDIR)'/CVS \
|
2013-10-13 18:42:23 +00:00
|
|
|
&& { 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:
|
2020-05-03 17:39:55 +00:00
|
|
|
test -d '$(GNUWEBDIR)' || mkdir -p '$(GNUWEBDIR)'
|
|
|
|
test -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS \
|
2013-10-13 18:42:23 +00:00
|
|
|
&& { 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)' \
|
2022-10-16 19:13:41 +00:00
|
|
|
make '$(PACKAGE_NAME) Manual'
|
2013-10-13 18:42:23 +00:00
|
|
|
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)' \
|
2019-05-11 14:30:26 +00:00
|
|
|
&& cvs -q -n update | grep -v '^M '
|
|
|
|
@echo '- cvs add <new files>' \
|
2013-10-13 18:42:23 +00:00
|
|
|
&& echo '- cvs remove <deleted files>' \
|
|
|
|
&& echo '- cvs commit' \
|
2022-10-16 19:13:41 +00:00
|
|
|
&& echo '- cvs tag make-$(subst .,-,$(PACKAGE_VERSION))'
|
2013-10-13 18:42:23 +00:00
|
|
|
|
2016-09-25 23:06:56 +00:00
|
|
|
|
|
|
|
## --------------------------------------------- ##
|
|
|
|
## 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) \
|
2022-07-04 21:20:30 +00:00
|
|
|
$(CFGCHECK_MAKEFLAGS)
|
2016-09-25 23:06:56 +00:00
|
|
|
PATH="$${COVERITY_PATH:+$$COVERITY_PATH/bin:}$$PATH"; \
|
|
|
|
cd '$(distdir)'/_build \
|
2019-09-08 19:41:20 +00:00
|
|
|
&& cov-build --dir cov-int ../build.sh
|
2016-09-25 23:06:56 +00:00
|
|
|
rm -f '$@'
|
|
|
|
(cd '$(distdir)'/_build && tar czf - cov-int) > '$@'
|
|
|
|
|
|
|
|
cov-submit: $(COV_BUILD_FILE)-submitted
|
|
|
|
|
|
|
|
$(COV_BUILD_FILE)-submitted: $(COV_BUILD_FILE)
|
2020-05-03 17:39:55 +00:00
|
|
|
@test -n "$(COVERITY_TOKEN)" || { echo 'COVERITY_TOKEN not set'; exit 1; }
|
|
|
|
@test -n "$(COVERITY_EMAIL)" || { echo 'COVERITY_EMAIL not set'; exit 1; }
|
2016-09-25 23:06:56 +00:00
|
|
|
rm -f '$@'
|
2022-10-16 19:13:41 +00:00
|
|
|
case '$(PACKAGE_VERSION)' in \
|
2016-09-25 23:06:56 +00:00
|
|
|
(*.*.9*) type="daily build"; ext=".$$(date +%Y%m%d)" ;; \
|
|
|
|
(*) type="release"; ext= ;; \
|
|
|
|
esac; \
|
|
|
|
curl --form token='$(COVERITY_TOKEN)' \
|
|
|
|
--form email='$(COVERITY_EMAIL)' \
|
|
|
|
--form file='@$<' \
|
2022-10-16 19:13:41 +00:00
|
|
|
--form version="$(PACKAGE_VERSION)$$ext" \
|
|
|
|
--form description="$(PACKAGE_NAME) $$type" \
|
2016-09-25 23:06:56 +00:00
|
|
|
'https://scan.coverity.com/builds?project=gmake'
|
|
|
|
cp '$<' '$@'
|
|
|
|
|
|
|
|
|
2013-10-09 05:54:24 +00:00
|
|
|
## ------------------------- ##
|
|
|
|
## Make release targets. ##
|
|
|
|
## ------------------------- ##
|
|
|
|
|
2013-10-13 18:42:23 +00:00
|
|
|
.PHONY: tag-release
|
2013-10-09 05:54:24 +00:00
|
|
|
tag-release:
|
2022-10-16 19:13:41 +00:00
|
|
|
case '$(PACKAGE_VERSION)' in \
|
2013-10-09 05:54:24 +00:00
|
|
|
(*.*.9*) message=" candidate" ;; \
|
|
|
|
(*) message= ;; \
|
|
|
|
esac; \
|
2022-10-16 19:13:41 +00:00
|
|
|
$(GIT) tag -m "$(PACKAGE_NAME) release$$message $(PACKAGE_VERSION)" -u '$(GPG_KEYID)' '$(PACKAGE_VERSION)'
|
2013-10-09 05:54:24 +00:00
|
|
|
|
2016-09-25 23:06:56 +00:00
|
|
|
|
2004-03-04 13:42:51 +00:00
|
|
|
## ------------------------- ##
|
|
|
|
## GNU FTP upload artifacts. ##
|
|
|
|
## ------------------------- ##
|
|
|
|
|
|
|
|
# This target creates the upload artifacts.
|
2007-03-20 03:02:26 +00:00
|
|
|
# Sign it with my key. If you don't have my key/passphrase then sorry,
|
|
|
|
# you're SOL! :)
|
2004-03-04 13:42:51 +00:00
|
|
|
|
2023-01-14 19:05:18 +00:00
|
|
|
GNUPLOAD := $(GNULIBDIR)/build-aux/gnupload
|
2004-03-06 08:00:17 +00:00
|
|
|
|
|
|
|
UPLOADS = upload-alpha upload-ftp
|
|
|
|
.PHONY: $(UPLOADS)
|
2023-01-14 19:05:18 +00:00
|
|
|
$(UPLOADS): upload-%: $(DIST_ARCHIVES)
|
|
|
|
$(GNUPLOAD) --user "$(GPG_KEYID)" --to "$*.gnu.org:make" -- $^
|
2006-02-11 19:02:21 +00:00
|
|
|
|
|
|
|
|
2022-12-31 18:21:09 +00:00
|
|
|
# Rebuild Makefile.in if this file is modified.
|
2016-04-04 05:15:17 +00:00
|
|
|
Makefile.in: maintMakefile
|
|
|
|
|
2023-01-01 15:04:37 +00:00
|
|
|
# Copyright (C) 1997-2023 Free Software Foundation, Inc.
|
2006-02-11 19:02:21 +00:00
|
|
|
# This file is part of GNU Make.
|
|
|
|
#
|
2007-07-04 19:35:15 +00:00
|
|
|
# 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.
|
2006-02-11 19:02:21 +00:00
|
|
|
#
|
|
|
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
2007-07-04 19:35:15 +00:00
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
# details.
|
2006-02-11 19:02:21 +00:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along with
|
2022-10-18 18:36:40 +00:00
|
|
|
# this program. If not, see <https://www.gnu.org/licenses/>.
|