Skip to content

Commit 5dd41f3

Browse files
committed
Remove maintainer-check target, fold into normal build
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.
1 parent 3dc543b commit 5dd41f3

File tree

11 files changed

+32
-23
lines changed

11 files changed

+32
-23
lines changed

GNUmakefile.in

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ $(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib,check)
7070

7171
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
7272

73-
$(call recurse,maintainer-check,doc src config contrib)
74-
7573
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
7674
./config.status $@
7775

config/programs.m4

+5
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
197197
if test -z "$MSGFMT"; then
198198
AC_MSG_ERROR([msgfmt is required for NLS])
199199
fi
200+
AC_CACHE_CHECK([for msgfmt flags], pgac_cv_msgfmt_flags,
201+
[if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
202+
pgac_cv_msgfmt_flags=-c
203+
fi])
204+
AC_SUBST(MSGFMT_FLAGS, $pgac_cv_msgfmt_flags)
200205
AC_CHECK_PROGS(MSGMERGE, msgmerge)
201206
AC_CHECK_PROGS(XGETTEXT, xgettext)
202207
])# PGAC_CHECK_GETTEXT

configure

+14
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ TCL_CONFIG_SH
659659
TCLSH
660660
XGETTEXT
661661
MSGMERGE
662+
MSGFMT_FLAGS
662663
MSGFMT
663664
HAVE_POSIX_SIGNALS
664665
LDAP_LIBS_BE
@@ -29346,6 +29347,19 @@ done
2934629347
$as_echo "$as_me: error: msgfmt is required for NLS" >&2;}
2934729348
{ (exit 1); exit 1; }; }
2934829349
fi
29350+
{ $as_echo "$as_me:$LINENO: checking for msgfmt flags" >&5
29351+
$as_echo_n "checking for msgfmt flags... " >&6; }
29352+
if test "${pgac_cv_msgfmt_flags+set}" = set; then
29353+
$as_echo_n "(cached) " >&6
29354+
else
29355+
if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
29356+
pgac_cv_msgfmt_flags=-c
29357+
fi
29358+
fi
29359+
{ $as_echo "$as_me:$LINENO: result: $pgac_cv_msgfmt_flags" >&5
29360+
$as_echo "$pgac_cv_msgfmt_flags" >&6; }
29361+
MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
29362+
2934929363
for ac_prog in msgmerge
2935029364
do
2935129365
# Extract the first word of "$ac_prog", so it can be a program name with args.

doc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ subdir = doc
1212
top_builddir = ..
1313
include $(top_builddir)/src/Makefile.global
1414

15-
all distprep html man install installdirs uninstall clean distclean maintainer-clean maintainer-check:
15+
all distprep html man install installdirs uninstall clean distclean maintainer-clean:
1616
$(MAKE) -C src $@

doc/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ subdir = doc/src
44
top_builddir = ../..
55
include $(top_builddir)/src/Makefile.global
66

7-
all distprep html man install installdirs uninstall clean distclean maintainer-clean maintainer-check:
7+
all distprep html man install installdirs uninstall clean distclean maintainer-clean:
88
$(MAKE) -C sgml $@

doc/src/sgml/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ top_builddir = ../../..
2222
include $(top_builddir)/src/Makefile.global
2323

2424

25-
all: html man
25+
all: check-tabs html man
2626

27-
distprep: html distprep-man
27+
distprep: check-tabs html distprep-man
2828

2929

3030
ifndef JADE
@@ -301,7 +301,7 @@ MAKEINFO = makeinfo
301301
##
302302

303303
# Quick syntax check without style processing
304-
check maintainer-check: postgres.sgml $(ALMOSTALLSGML) check-tabs
304+
check: postgres.sgml $(ALMOSTALLSGML) check-tabs
305305
$(NSGMLS) $(SPFLAGS) $(SGMLINCLUDE) -s $<
306306

307307

src/Makefile.global.in

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
#
1919
# Meta configuration
2020

21-
standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck maintainer-check init-po update-po
21+
standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck init-po update-po
2222
# these targets should recurse even into subdirectories not being built:
2323
standard_always_targets = distprep clean distclean maintainer-clean
2424

25-
.PHONY: $(standard_targets) install-strip html man installcheck-parallel
25+
.PHONY: $(standard_targets) install-strip html man installcheck-parallel maintainer-check
2626

2727
# make `all' the default target
2828
all:
@@ -283,6 +283,7 @@ perl_embed_ldflags = @perl_embed_ldflags@
283283
AWK = @AWK@
284284
LN_S = @LN_S@
285285
MSGFMT = @MSGFMT@
286+
MSGFMT_FLAGS = @MSGFMT_FLAGS@
286287
MSGMERGE = @MSGMERGE@
287288
PYTHON = @PYTHON@
288289
TAR = @TAR@

src/backend/catalog/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ schemapg.h: postgres.bki ;
6262
# even in distribution tarballs. So this is cheating a bit, but it
6363
# will achieve the goal of updating the version number when it
6464
# changes.
65-
postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(top_srcdir)/configure
65+
postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(top_srcdir)/configure $(top_srcdir)/src/include/catalog/duplicate_oids
66+
cd $(top_srcdir)/src/include/catalog && ./duplicate_oids
6667
$(PERL) -I $(catalogdir) $< $(pg_includes) --set-version=$(MAJORVERSION) $(POSTGRES_BKI_SRCS)
6768

6869
.PHONY: install-data

src/backend/common.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ clean: clean-local
4545
clean-local:
4646
rm -f $(subsysfilename) $(OBJS)
4747

48-
$(call recurse,coverage maintainer-check)
48+
$(call recurse,coverage)

src/include/Makefile

-3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,3 @@ clean:
7575

7676
distclean maintainer-clean: clean
7777
rm -f pg_config.h pg_config_ext.h pg_config_os.h dynloader.h stamp-h stamp-ext-h
78-
79-
maintainer-check:
80-
cd catalog && ./duplicate_oids

src/nls-global.mk

+2-9
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ BACKEND_COMMON_GETTEXT_FLAGS = \
6868
all-po: $(MO_FILES)
6969

7070
%.mo: %.po
71-
$(MSGFMT) -o $@ $<
71+
$(MSGFMT) $(MSGFMT_FLAGS) -o $@ $<
7272

7373
ifeq ($(word 1,$(GETTEXT_FILES)),+)
7474
po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(MAKEFILE_LIST)
@@ -113,12 +113,6 @@ clean-po:
113113
rm -f po/$(CATALOG_NAME).pot
114114

115115

116-
maintainer-check-po: $(ALL_PO_FILES)
117-
for file in $^; do \
118-
$(MSGFMT) -c -v -o /dev/null $$file || exit 1; \
119-
done
120-
121-
122116
init-po: po/$(CATALOG_NAME).pot
123117

124118

@@ -155,7 +149,6 @@ install: install-po
155149
installdirs: installdirs-po
156150
uninstall: uninstall-po
157151
clean distclean maintainer-clean: clean-po
158-
maintainer-check: maintainer-check-po
159152

160153
.PHONY: all-po install-po installdirs-po uninstall-po clean-po \
161-
maintainer-check-po init-po update-po
154+
init-po update-po

0 commit comments

Comments
 (0)