]> granicus.if.org Git - postgresql/commitdiff
pg_regress: Use target-specific variable instead of overriding make rule
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 7 Feb 2012 20:42:19 +0000 (22:42 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 7 Feb 2012 20:42:19 +0000 (22:42 +0200)
Use a target-specific variable to add to CPPFLAGS instead of writing a
custom .c -> .o rule.  This will ensure that dependency tracking is
used when enabled.

src/test/regress/GNUmakefile

index 27b86da3f849e7ecb5298d2a8f9c1455218dd3f2..0239b6ff70bbb2fb7344f7ed3bddd46264fabd48 100644 (file)
@@ -48,7 +48,7 @@ pg_regress$(X): pg_regress.o pg_regress_main.o | submake-libpgport
 
 # dependencies ensure that path changes propagate
 pg_regress.o: pg_regress.c $(top_builddir)/src/port/pg_config_paths.h
-       $(CC) $(CFLAGS) $(CPPFLAGS) -I$(top_builddir)/src/port $(EXTRADEFS) -c -o $@ $<
+pg_regress.o: override CPPFLAGS += -I$(top_builddir)/src/port $(EXTRADEFS)
 
 $(top_builddir)/src/port/pg_config_paths.h: $(top_builddir)/src/Makefile.global
        $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h