From 862e0ebe4fbc08ade2ebaf08b8ad218ac705d8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 20 Jan 2010 10:56:01 +0100 Subject: epmd tests: fix build of test suites on Windows On Windows, the ERL_TOP environment variable contains a path that only is valid for cygwin-enabled programs, such as 'make'. It is not meaningful to pass the value of $ERL_TOP in the -I option to the Erlang compiler, because the Erlang emulator does not interpret cygwin paths correctly. Therefore, -include("test_server.hrl") will fail to find test_server.hrl. Work around the problem by creating an Emakefile and let ts:run() take care of the build (ts:run() will set up the include path so that test_server.hrl can be found). --- erts/epmd/test/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'erts/epmd') diff --git a/erts/epmd/test/Makefile b/erts/epmd/test/Makefile index c1d62f0f93..c2b5200c38 100644 --- a/erts/epmd/test/Makefile +++ b/erts/epmd/test/Makefile @@ -34,6 +34,8 @@ ERL_FILES= $(MODULES:%=%.erl) TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) +EMAKEFILE=Emakefile + # ---------------------------------------------------- # Release directory specification # ---------------------------------------------------- @@ -43,15 +45,17 @@ RELEPMDDIR = $(RELEASE_PATH)/epmd_test # FLAGS # ---------------------------------------------------- -ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include \ - -I$(ERL_TOP)/lib/kernel/src/ \ - $(EPMD_FLAGS) +ERL_COMPILE_FLAGS += $(EPMD_FLAGS) # ---------------------------------------------------- # Targets # ---------------------------------------------------- -tests debug opt: $(TARGET_FILES) +tests debug opt: $(EMAKEFILE) + +$(EMAKEFILE): Makefile $(ERL_FILES) + $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) \ + -o$(EBIN) $(MODULES) > $(EMAKEFILE) clean: rm -f $(TARGET_FILES) @@ -69,7 +73,7 @@ release_spec: release_tests_spec: opt $(INSTALL_DIR) $(RELEPMDDIR) $(INSTALL_DATA) epmd.spec epmd.spec.vxworks $(ERL_FILES) \ - $(TARGET_FILES) $(RELEPMDDIR) + $(EMAKEFILE) $(RELEPMDDIR) chmod -f -R u+w $(RELEPMDDIR) release_docs_spec: -- cgit v1.2.3