OSDN Git Service

Makefileをリファクタリングした
[pghintplan/pg_hint_plan.git] / Makefile
index c342956..1c07d40 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,24 +5,23 @@
 #
 
 MODULES = pg_hint_plan
-REGRESS = init base_plan pg_hint_plan prepare fdw
+REGRESS = init base_plan pg_hint_plan fdw ut-init ut-A ut-A2 ut-S ut-J ut-L ut-G ut-fini indexonly create_execute
 
-ifdef UNIT_TEST
-PG_CPPFLAGS = -O0
-endif
+REGRESSION_EXPECTED = expected/init.out expected/base_plan.out expected/pg_hint_plan.out expected/ut-A.out expected/ut-A2.out expected/ut-S.out expected/ut-J.out expected/ut-L.out expected/ut-G.out expected/indexonly.out expected/create_execute.out
 
-EXTRA_CLEAN = sql/fdw.sql expected/base_plan.out expected/prepare.out expected/fdw.out
+EXTRA_CLEAN = core.c sql/fdw.sql expected/fdw.out $(REGRESSION_EXPECTED)
 
 PG_CONFIG = pg_config
 PGXS := $(shell $(PG_CONFIG) --pgxs)
 include $(PGXS)
 
-expected/base_plan.out: expected/base_plan-$(MAJORVERSION).out
-       cp expected/base_plan-$(MAJORVERSION).out expected/base_plan.out
-expected/prepare.out: expected/prepare-$(MAJORVERSION).out
-       cp expected/prepare-$(MAJORVERSION).out expected/prepare.out
+core.c: core-$(MAJORVERSION).c
+       cp core-$(MAJORVERSION).c core.c
 
-installcheck: expected/base_plan.out expected/prepare.out
+$(REGRESSION_EXPECTED): %.out: %-$(MAJORVERSION).out
+       cp $< $@
+
+installcheck: $(REGRESSION_EXPECTED)
 
 # pg_hint_plan.c includes core.c and make_join_rel.c
 pg_hint_plan.o: core.c make_join_rel.c