Skip to content

Commit 5c788e7

Browse files
committed
When in automatic dependency mode, never delete any intermediate
files automatically. Otherwise, the following could happen: When starting from a clean source tree, the first build would delete the intermediate file, but also create the dependency file, which mentions the intermediate file, thus making it non-intermediate. The second build will then need to rebuild the now non-intermediate missing file. So the second build will do work even though nothing had changed. One place where this happens is the .c -> .o -> .so chain for some contrib modules.
1 parent b1e2e9c commit 5c788e7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Makefile.global.in

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.264 2010/07/06 22:03:05 tgl Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.265 2010/08/24 18:06:12 petere Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -580,6 +580,17 @@ clean distclean maintainer-clean: clean-deps
580580
clean-deps:
581581
@rm -rf $(DEPDIR)
582582

583+
# When in automatic dependency mode, never delete any intermediate
584+
# files automatically. Otherwise, the following could happen: When
585+
# starting from a clean source tree, the first build would delete the
586+
# intermediate file, but also create the dependency file, which
587+
# mentions the intermediate file, thus making it non-intermediate.
588+
# The second build will then need to rebuild the now non-intermediate
589+
# missing file. So the second build will do work even though nothing
590+
# had changed. One place where this happens is the .c -> .o -> .so
591+
# chain for some contrib modules.
592+
.SECONDARY:
593+
583594
endif # autodepend
584595

585596

0 commit comments

Comments
 (0)