Skip to content

Commit 1eb1dde

Browse files
committed
Have make never delete intermediate files automatically
Several hacks in certain modes already thought this was a bad idea, so just disable it globally.
1 parent 2f1692d commit 1eb1dde

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/Makefile.global.in

+3-13
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ all:
3131
# started to update the file.
3232
.DELETE_ON_ERROR:
3333

34+
# Never delete any intermediate files automatically.
35+
.SECONDARY:
36+
3437
# PostgreSQL version number
3538
VERSION = @PACKAGE_VERSION@
3639
MAJORVERSION = @PG_MAJORVERSION@
@@ -329,8 +332,6 @@ GENHTML = @GENHTML@
329332
ifeq ($(enable_coverage),yes)
330333
# ccache loses .gcno files
331334
export CCACHE_DISABLE = 1
332-
# preserve intermediate .c files for genhtml
333-
.PRECIOUS: %.c
334335
endif
335336

336337
# Feature settings
@@ -685,17 +686,6 @@ clean distclean maintainer-clean: clean-deps
685686
clean-deps:
686687
@rm -rf $(DEPDIR)
687688

688-
# When in automatic dependency mode, never delete any intermediate
689-
# files automatically. Otherwise, the following could happen: When
690-
# starting from a clean source tree, the first build would delete the
691-
# intermediate file, but also create the dependency file, which
692-
# mentions the intermediate file, thus making it non-intermediate.
693-
# The second build will then need to rebuild the now non-intermediate
694-
# missing file. So the second build will do work even though nothing
695-
# had changed. One place where this happens is the .c -> .o -> .so
696-
# chain for some contrib modules.
697-
.SECONDARY:
698-
699689
endif # autodepend
700690

701691

0 commit comments

Comments
 (0)