Skip to content

Commit f202227

Browse files
committed
build: simplify working with template deps
* Makefile.am: Use text_tpl_deps instead of c_s for automatic dependency everywhere. * lib/rpm/Makefile.inc, tests/Makefile.am: Likewise. * share/postgresql-setup/Makefile.inc: Likewise. * configure.ac: Don't define c_s as it is not needed now. * m4/_ax_text_tpl.m4: Add Makefile into auto deps for templates, that's needed because we don't need to reconfigure to adjust template outputs, it is enough to define Makefile.am variable.
1 parent 67db493 commit f202227

File tree

6 files changed

+12
-13
lines changed

6 files changed

+12
-13
lines changed

Makefile.am

+8-8
Original file line numberDiff line numberDiff line change
@@ -51,36 +51,36 @@ pgdoc_DATA = $(readme_dist)
5151

5252
noinst_DATA += $(TEST_GEN_FILES_LIST)
5353

54-
$(ctl): $(ctl_in) $(c_s)
54+
$(ctl): $(ctl_in) $(text_tpl_deps)
5555
$(text_tpl_gen_script)
5656

57-
$(setup): $(setup_in) $(c_s)
57+
$(setup): $(setup_in) $(text_tpl_deps)
5858
$(text_tpl_gen_script)
5959

60-
$(checkdb): $(check) $(checkdb_in) $(c_s)
60+
$(checkdb): $(check) $(checkdb_in) $(text_tpl_deps)
6161
$(text_tpl_gen_script)
6262

63-
$(initscript): $(initscript_in) $(c_s)
63+
$(initscript): $(initscript_in) $(text_tpl_deps)
6464
$(text_tpl_gen_script)
6565

66-
initdb upgrade: legacy-sysv-script.in $(c_s)
66+
initdb upgrade: legacy-sysv-script.in $(text_tpl_deps)
6767
$(text_tpl_gen_script)
6868

6969
# In ideal world, [email protected] would be hardlink to postgresql.service.
7070
# That would require, however, the rhbz#1141824 resolved so we could install
7171
# system-default drop-in file. Make a "almost" duplicate files now.
7272

73-
$(serviceat): $(serviceat_in) $(c_s)
73+
$(serviceat): $(serviceat_in) $(text_tpl_deps)
7474
$(AM_V_GEN)\
7575
ax_text_add_sed_substs="-e /@PGDATA_ENVIRONMENT[@]/d" ; \
7676
$(text_tpl_gen_verbose)
7777

78-
$(service): $(service_in) $(c_s)
78+
$(service): $(service_in) $(text_tpl_deps)
7979
$(AM_V_GEN)\
8080
ax_text_add_sed_substs="-e s|@PGDATA_ENVIRONMENT[@]|Environment=PGDATA=$(PGDATADIR)|" ; \
8181
$(text_tpl_gen_verbose)
8282

83-
$(readme_dist_sed): $(readme_template) $(c_s)
83+
$(readme_dist_sed): $(readme_template) $(text_tpl_deps)
8484
$(text_tpl_gen)
8585

8686
$(readme_dist_m4): $(readme_dist_sed)

configure.ac

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ conf_dir([pgcontribdocdir], ['${datarootdir}/doc/${NAME_PACKAGE}-contri
6363
INSTANTIATE_CONV="\$(AM_V_GEN)rm -rf \$@; \$(MKDIR_P) \$(@D)"
6464
INSTANTIATE="\$(INSTANTIATE_CONV) && \$(SED_CALL) \$< > \$@ && chmod -w \$@"
6565
INSTANTIATE_SCRIPT="\$(INSTANTIATE) && chmod +x \$@"
66-
c_s='$(top_builddir)/config.status'
6766

6867
AC_PATH_PROG([SED], [sed])
6968
test -z "$ac_cv_path_SED" &&

lib/rpm/Makefile.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ rpmmacros_DATA = $(rpm_macros)
66
GENERATED_FILES += $(rpmmacros_DATA)
77
EXTRA_DIST += $(rpm_macros_in)
88

9-
$(rpm_macros): $(rpm_macros_in) $(c_s)
9+
$(rpm_macros): $(rpm_macros_in) $(text_tpl_deps)
1010
$(text_tpl_gen)

m4/_ax_text_tpl.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ text_tpl_gen_script_verbose="\$(text_tpl_gen_verbose) && chmod +x \@S|@@"
123123
text_tpl_gen_script="\$(AM_V_GEN)\$(text_tpl_gen_script_verbose) && chmod +x \@S|@@"
124124
125125
# Make dependencies for targets of $(text_tpl_gen) and $(text_tpl_gen_script)
126-
text_tpl_deps='$(top_builddir)/config.status'
126+
text_tpl_deps='$(top_builddir)/config.status Makefile'
127127
128128
AC_PATH_PROG([SED], [sed])
129129
test -z "$ac_cv_path_SED" &&

share/postgresql-setup/Makefile.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ rawpkgdata_DATA = \
2323
GENERATED_FILES += $(rawdata_generated_files)
2424
EXTRA_DIST += $(rawdata_static_files) $(rawdata_template_files)
2525

26-
$(lib): $(lib_in) $(c_s)
26+
$(lib): $(lib_in) $(text_tpl_deps)
2727
$(text_tpl_gen)
2828

2929
# vim: ft=automake noet

tests/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
2323
TESTSUITE = $(srcdir)/testsuite
2424
CHECK_DEPS = atconfig atlocal $(TESTSUITE) $(top_builddir)/$(TEST_GEN_FILES_LIST)
2525

26-
atlocal: atlocal.in $(c_s)
26+
atlocal: atlocal.in $(text_tpl_deps)
2727
$(text_tpl_gen)
2828

2929
check-local: $(CHECK_DEPS)

0 commit comments

Comments
 (0)