Peter Eisentraut  committed d66b31c

pg_regress: Use target-specific variable instead of overriding make rule

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.

  • Participants
  • Parent commits 5ece8ec
  • Branches jsonapi

Comments (0)

Files changed (1)

File src/test/regress/GNUmakefile

 # 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/
 	$(MAKE) -C $(top_builddir)/src/port pg_config_paths.h