OSDN Git Service

Remove silent_mode. You get the same functionality with "pg_ctl -l
[pg-rex/syncrep.git] / src / Makefile.global.in
index 69512ac..3bf658d 100644 (file)
@@ -19,6 +19,8 @@
 # Meta configuration
 
 standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck maintainer-check
+# 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
 
@@ -263,7 +265,7 @@ X = @EXEEXT@
 
 ifneq (@PERL@,)
     # quoted to protect pathname with spaces
-    PERL               = "@PERL@"
+    PERL               = '@PERL@'
 else
     PERL               = $(missing) perl
 endif
@@ -430,8 +432,14 @@ submake-libpgport:
 PL_TESTDB = pl_regression
 CONTRIB_TESTDB = contrib_regression
 
-pg_regress_check = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-install=./tmp_check --top-builddir=$(top_builddir)
-pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR)
+ifdef NO_LOCALE
+NOLOCALE += --no-locale
+endif
+
+pg_regress_locale_flags = $(if $(ENCODING),--encoding=$(ENCODING)) $(NOLOCALE)
+
+pg_regress_check = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-install=./tmp_check --top-builddir=$(top_builddir) $(pg_regress_locale_flags)
+pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir='$(PSQLDIR)' $(pg_regress_locale_flags)
 
 pg_regress_clean_files = results/ regression.diffs regression.out tmp_check/ log/
 
@@ -597,6 +605,16 @@ endef
 # $3: target to run in subdir (defaults to current element of $1)
 recurse = $(foreach target,$(if $1,$1,$(standard_targets)),$(foreach subdir,$(if $2,$2,$(SUBDIRS)),$(eval $(call _create_recursive_target,$(target),$(subdir),$(if $3,$3,$(target))))))
 
+# If a makefile's list of SUBDIRS varies depending on configuration, then
+# any subdirectories excluded from SUBDIRS should instead be added to
+# ALWAYS_SUBDIRS, and then it must call recurse_always as well as recurse.
+# This ensures that distprep, distclean, etc will apply to all subdirectories.
+# In the normal case all arguments will be defaulted.
+# $1: targets to make recursive (defaults to standard_always_targets)
+# $2: list of subdirs (defaults to ALWAYS_SUBDIRS variable)
+# $3: target to run in subdir (defaults to current element of $1)
+recurse_always = $(foreach target,$(if $1,$1,$(standard_always_targets)),$(foreach subdir,$(if $2,$2,$(ALWAYS_SUBDIRS)),$(eval $(call _create_recursive_target,$(target),$(subdir),$(if $3,$3,$(target))))))
+
 
 ##########################################################################
 #