]> granicus.if.org Git - postgresql/commitdiff
Remove maintainer-check target, fold into normal build
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 11 Sep 2013 18:34:28 +0000 (14:34 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 11 Oct 2013 00:11:56 +0000 (20:11 -0400)
make maintainer-check was obscure and rarely called in practice, and
many breakages were missed.  Fold everything that make maintainer-check
used to do into the normal build.  Specifically:

- Call duplicate_oids when genbki.pl is called.

- Check for tabs in SGML files when the documentation is built.

- Run msgfmt with the -c option during the regular build.  Add an
  additional configure check to see whether we are using the GNU
  version.  (make maintainer-check probably used to fail with non-GNU
  msgfmt.)

Keep maintainer-check as around as phony target for the time being in
case anyone is calling it.  But it won't do anything anymore.

GNUmakefile.in
config/programs.m4
configure
doc/Makefile
doc/src/Makefile
doc/src/sgml/Makefile
src/Makefile.global.in
src/backend/catalog/Makefile
src/backend/common.mk
src/include/Makefile
src/nls-global.mk

index 17b1b3b5a4080821b308ad6f0e813a246cfa2296..80116a1fbf93356579f780947cebf79a04c6e504 100644 (file)
@@ -70,8 +70,6 @@ $(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib,check)
 
 $(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
 
-$(call recurse,maintainer-check,doc src config contrib)
-
 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
        ./config.status $@
 
index c70a0c2f7be4b30840d817a2dc8684baab61b515..fd3a9a4791a013406ea1e058e871a28d43fb2109 100644 (file)
@@ -197,6 +197,11 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
   if test -z "$MSGFMT"; then
     AC_MSG_ERROR([msgfmt is required for NLS])
   fi
+  AC_CACHE_CHECK([for msgfmt flags], pgac_cv_msgfmt_flags,
+[if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
+    pgac_cv_msgfmt_flags=-c
+fi])
+  AC_SUBST(MSGFMT_FLAGS, $pgac_cv_msgfmt_flags)
   AC_CHECK_PROGS(MSGMERGE, msgmerge)
   AC_CHECK_PROGS(XGETTEXT, xgettext)
 ])# PGAC_CHECK_GETTEXT
index 97d2f68956af39edf017726be968674ad01a34e9..cd72545141779d42d23cd3ffc2f62b8d24822eb8 100755 (executable)
--- a/configure
+++ b/configure
@@ -659,6 +659,7 @@ TCL_CONFIG_SH
 TCLSH
 XGETTEXT
 MSGMERGE
+MSGFMT_FLAGS
 MSGFMT
 HAVE_POSIX_SIGNALS
 LDAP_LIBS_BE
@@ -29346,6 +29347,19 @@ done
 $as_echo "$as_me: error: msgfmt is required for NLS" >&2;}
    { (exit 1); exit 1; }; }
   fi
+  { $as_echo "$as_me:$LINENO: checking for msgfmt flags" >&5
+$as_echo_n "checking for msgfmt flags... " >&6; }
+if test "${pgac_cv_msgfmt_flags+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
+    pgac_cv_msgfmt_flags=-c
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_msgfmt_flags" >&5
+$as_echo "$pgac_cv_msgfmt_flags" >&6; }
+  MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
+
   for ac_prog in msgmerge
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
index 2e5e09ef88a8dcd488d6b44574090f71b097a348..aee3cc09654d792944c8ecffc308e626ce88e886 100644 (file)
@@ -12,5 +12,5 @@ subdir = doc
 top_builddir = ..
 include $(top_builddir)/src/Makefile.global
 
-all distprep html man install installdirs uninstall clean distclean maintainer-clean maintainer-check:
+all distprep html man install installdirs uninstall clean distclean maintainer-clean:
        $(MAKE) -C src $@
index b0d4f1f5063a12c227dac86e786c5f4f0e88d8d7..30d883815aa47cf28c0f8b11d3eea64120a1ffb7 100644 (file)
@@ -4,5 +4,5 @@ subdir = doc/src
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-all distprep html man install installdirs uninstall clean distclean maintainer-clean maintainer-check:
+all distprep html man install installdirs uninstall clean distclean maintainer-clean:
        $(MAKE) -C sgml $@
index aeade13dff38b928908fdb16ac2dca80791cdb58..50d9203bbe2553f0fb62327ca551371b7702ffc5 100644 (file)
@@ -22,9 +22,9 @@ top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
 
-all: html man
+all: check-tabs html man
 
-distprep: html distprep-man
+distprep: check-tabs html distprep-man
 
 
 ifndef JADE
@@ -301,7 +301,7 @@ MAKEINFO = makeinfo
 ##
 
 # Quick syntax check without style processing
-check maintainer-check: postgres.sgml $(ALMOSTALLSGML) check-tabs
+check: postgres.sgml $(ALMOSTALLSGML) check-tabs
        $(NSGMLS) $(SPFLAGS) $(SGMLINCLUDE) -s $<
 
 
index bb732bbb7cfa12bca62635e8b7fd6a498ce2ab04..96ef16396c839071d608cd0edaa27e50db742f94 100644 (file)
 #
 # Meta configuration
 
-standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck maintainer-check init-po update-po
+standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck init-po update-po
 # these targets should recurse even into subdirectories not being built:
 standard_always_targets = distprep clean distclean maintainer-clean
 
-.PHONY: $(standard_targets) install-strip html man installcheck-parallel
+.PHONY: $(standard_targets) install-strip html man installcheck-parallel maintainer-check
 
 # make `all' the default target
 all:
@@ -283,6 +283,7 @@ perl_embed_ldflags  = @perl_embed_ldflags@
 AWK    = @AWK@
 LN_S   = @LN_S@
 MSGFMT  = @MSGFMT@
+MSGFMT_FLAGS = @MSGFMT_FLAGS@
 MSGMERGE = @MSGMERGE@
 PYTHON = @PYTHON@
 TAR    = @TAR@
index c4d3f3c1dcc11a5d3fa87297b60199b5b082d16e..eca15af42f1f838e3a2a3e3d073d43bc43c81b9b 100644 (file)
@@ -62,7 +62,8 @@ schemapg.h: postgres.bki ;
 # even in distribution tarballs.  So this is cheating a bit, but it
 # will achieve the goal of updating the version number when it
 # changes.
-postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(top_srcdir)/configure
+postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(top_srcdir)/configure $(top_srcdir)/src/include/catalog/duplicate_oids
+       cd $(top_srcdir)/src/include/catalog && ./duplicate_oids
        $(PERL) -I $(catalogdir) $< $(pg_includes) --set-version=$(MAJORVERSION) $(POSTGRES_BKI_SRCS)
 
 .PHONY: install-data
index 2e56151e2b48faa7a279cb9dbd8c10f59ed91126..5d599dbd0ca2519436702a934e2fb666aa53aaf3 100644 (file)
@@ -45,4 +45,4 @@ clean: clean-local
 clean-local:
        rm -f $(subsysfilename) $(OBJS)
 
-$(call recurse,coverage maintainer-check)
+$(call recurse,coverage)
index c553e74890975ca25b5332fc07e44f5f9a758d78..578a778461615c27adc0941282c8487fce750270 100644 (file)
@@ -75,6 +75,3 @@ clean:
 
 distclean maintainer-clean: clean
        rm -f pg_config.h pg_config_ext.h pg_config_os.h dynloader.h stamp-h stamp-ext-h
-
-maintainer-check:
-       cd catalog && ./duplicate_oids
index 8f06e2d24fd85dd5c317a99a7ec8c87e42525d23..da91c9032e5f02f4e897b2d8b593b27c874bd86b 100644 (file)
@@ -68,7 +68,7 @@ BACKEND_COMMON_GETTEXT_FLAGS = \
 all-po: $(MO_FILES)
 
 %.mo: %.po
-       $(MSGFMT) -o $@ $<
+       $(MSGFMT) $(MSGFMT_FLAGS) -o $@ $<
 
 ifeq ($(word 1,$(GETTEXT_FILES)),+)
 po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(MAKEFILE_LIST)
@@ -113,12 +113,6 @@ clean-po:
        rm -f po/$(CATALOG_NAME).pot
 
 
-maintainer-check-po: $(ALL_PO_FILES)
-       for file in $^; do \
-         $(MSGFMT) -c -v -o /dev/null $$file || exit 1; \
-       done
-
-
 init-po: po/$(CATALOG_NAME).pot
 
 
@@ -155,7 +149,6 @@ install: install-po
 installdirs: installdirs-po
 uninstall: uninstall-po
 clean distclean maintainer-clean: clean-po
-maintainer-check: maintainer-check-po
 
 .PHONY: all-po install-po installdirs-po uninstall-po clean-po \
-        maintainer-check-po init-po update-po
+        init-po update-po