maint: use gnulib's maintainer-makefile module.

* bootstrap.conf (gnulib_modules): Add maintainer-makefile.
(gnulib_tool_options): Add --avoid=dummy now that we have a real
module to import.
* cfg.mk: New file. Customize maint.mk for Libtool.
* Makefile.am (EXTRA_DIST): Add GNUmakefile, cfg.mk and maint.mk.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
Gary V. Vaughan 2011-10-19 11:48:56 +07:00
parent d4afacc29c
commit adb7abda11
7 changed files with 159 additions and 4 deletions

3
.gitignore vendored
View File

@ -32,11 +32,14 @@
.gitmodules
.libs
/.pc
/.sc-start*
/COPYING
/GNUmakefile
/INSTALL
/gnulib-local
/libtoolize
/libtoolize.in
/maint.mk
/patches
/release
Makefile

View File

@ -1,3 +1,12 @@
2011-10-19 Gary V. Vaughan <gary@gnu.org>
maint: use gnulib's maintainer-makefile module.
* bootstrap.conf (gnulib_modules): Add maintainer-makefile.
(gnulib_tool_options): Add --avoid=dummy now that we have a real
module to import.
* cfg.mk: New file. Customize maint.mk for Libtool.
* Makefile.am (EXTRA_DIST): Add GNUmakefile, cfg.mk and maint.mk.
2011-10-19 Gary V. Vaughan <gary@gnu.org>
maint: use gnulib's canonical fdl.texi.

View File

@ -73,11 +73,12 @@ libtoolize_m4sh = $(srcdir)/libtoolize.m4sh
ltmain_m4sh = $(m4sh_dir)/ltmain.m4sh
sh_files = $(general_m4sh) $(getopt_m4sh)
EXTRA_DIST += bootstrap bootstrap.conf $(aux_dir)/mkstamp \
EXTRA_DIST += bootstrap bootstrap.conf cfg.mk maint.mk $(aux_dir)/mkstamp \
$(sh_files) ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \
ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 ChangeLog.2002 \
ChangeLog.2003 ChangeLog.2004 ChangeLog.2005 ChangeLog.2006 \
ChangeLog.2007 ChangeLog.2008 ChangeLog.2009 ChangeLog.2010
ChangeLog.2007 ChangeLog.2008 ChangeLog.2009 ChangeLog.2010 \
GNUmakefile
CLEANFILES += libtool libtoolize
## If a file is named several times below, and especially if it

View File

@ -50,17 +50,17 @@ buildreq_readme=HACKING
# Non-default gnulib directory options.
local_gl_dir=gl
source_base=libltdl/libgnu
# Additional gnulib-tool options to use.
gnulib_tool_options=$gnulib_tool_options"
--avoid=dummy
--libtool
--macro-prefix=GL
"
# gnulib modules used by this package.
gnulib_modules='
dummy
maintainer-makefile
'
# Extra gnulib files that are not in modules, which override files of

72
cfg.mk Normal file
View File

@ -0,0 +1,72 @@
# cfg.mk -- Configuration for maintainer-makefile
#
# Copyright (c) 2011 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2011
#
# This file is part of GNU Libtool.
#
# GNU Libtool 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 2 of the License, or
# (at your option) any later version.
#
# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
# can be downlodad from http://www.gnu.org/licenses/gpl.html,
# or obtained by writing to the Free Software Foundation, Inc.,
# 51 Franklin Street, Boston, # MA 02111-1301, USA.
gnulib_dir = $(srcdir)/gnulib
_build-aux = libltdl/config
# Set format of NEWS
old_NEWS_hash := d41d8cd98f00b204e9800998ecf8427e
# Don't syntax check the mail subdirectory.
VC_LIST_ALWAYS_EXCLUDE_REGEX = /mail/
local-checks-to-fix = \
sc_file_system \
sc_m4_quote_check \
sc_makefile_TAB_only_indentation \
sc_makefile_at_at_check \
sc_prohibit_always-defined_macros \
sc_prohibit_always_true_header_tests \
sc_prohibit_cvs_keyword \
sc_prohibit_doubled_word \
sc_prohibit_empty_lines_at_EOF \
sc_prohibit_have_config_h \
sc_prohibit_magic_number_exit \
sc_prohibit_stddef_without_use \
sc_prohibit_strcmp \
sc_prohibit_test_minus_ao \
sc_prohibit_undesirable_word_seq \
sc_require_config_h \
sc_require_config_h_first \
sc_space_tab \
sc_trailing_blank \
sc_unmarked_diagnostics \
sc_useless_cpp_parens
local-checks-to-skip = \
$(local-checks-to-fix) \
sc_GPL_version \
sc_avoid_if_before_free \
sc_bindtextdomain \
sc_cast_of_argument_to_free \
sc_cast_of_x_alloc_return_value \
sc_error_message_uppercase \
sc_program_name
# GPL_version: checks for GPLv3, which we don't use
# avoid_if_before_free: we don't use the gnulib malloc modules
# bindtextdomain: libtool isn't internationalized
# cast_of_argument_to_free: ditto
# cast_of_x_alloc_return_value: ditto
# error_message_uppercase: we like our error messages
# program_name: libtool has no programs!

68
gl/top/maint.mk.diff Normal file
View File

@ -0,0 +1,68 @@
diff --git a/top/maint.mk b/top/maint.mk
index d51fec6..f6ad4f0 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -21,9 +21,6 @@
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
ME := maint.mk
-# Override this in cfg.mk if you use a non-standard build-aux directory.
-build_aux ?= $(srcdir)/build-aux
-
# Do not save the original name or timestamp in the .tar.gz file.
# Use --rsyncable if available.
gzip_rsyncable := \
@@ -34,7 +31,7 @@ GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
GIT = git
VC = $(GIT)
-VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)
+VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
# You can override this variable in cfg.mk to set your own regexp
# matching files to ignore.
@@ -274,7 +271,7 @@ define _sc_search_regexp
endef
sc_avoid_if_before_free:
- @$(build_aux)/useless-if-before-free \
+ @$(srcdir)/$(_build-aux)/useless-if-before-free \
$(useless_free_options) \
$$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \
{ echo '$(ME): found useless "if" before "free" above' 1>&2; \
@@ -1208,7 +1205,7 @@ else
endif
announcement: NEWS ChangeLog $(rel-files)
- @$(build_aux)/announce-gen \
+ @$(srcdir)/$(_build-aux)/announce-gen \
--mail-headers='$(announcement_mail_headers_)' \
--release-type=$(RELEASE_TYPE) \
--package=$(PACKAGE) \
@@ -1232,7 +1229,7 @@ upload_dest_dir_ ?= $(PACKAGE)
emit_upload_commands:
@echo =====================================
@echo =====================================
- @echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\"
+ @echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\"
@echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\"
@echo " $(rel-files)"
@echo '# send the ~/announce-$(my_distdir) e-mail'
@@ -1327,7 +1324,7 @@ web-manual:
@test -z "$(manual_title)" \
&& { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
@cd '$(srcdir)/doc'; \
- $(SHELL) ../$(build_aux)/gendocs.sh $(gendocs_options_) \
+ $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \
-o '$(abs_builddir)/doc/manual' \
--email $(PACKAGE_BUGREPORT) $(PACKAGE) \
"$(PACKAGE_NAME) - $(manual_title)"
@@ -1392,7 +1389,7 @@ update-copyright-env ?=
update-copyright:
grep -l -w Copyright \
$$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
- | $(update-copyright-env) xargs $(build_aux)/$@
+ | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@
# This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not
# overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS.

View File

@ -8,3 +8,5 @@
/missing
/mkinstalldirs
/texinfo.tex
/useless-if-before-free
/vc-list-files