aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-01-20 10:56:01 +0100
committerBjörn Gustavsson <[email protected]>2010-01-20 12:14:41 +0100
commit862e0ebe4fbc08ade2ebaf08b8ad218ac705d8b6 (patch)
tree47762c02fe339ae8a3846147e66658230e2e1216
parente7433c73df70ff0cb20e64548cd9c74021ac0c68 (diff)
downloadotp-862e0ebe4fbc08ade2ebaf08b8ad218ac705d8b6.tar.gz
otp-862e0ebe4fbc08ade2ebaf08b8ad218ac705d8b6.tar.bz2
otp-862e0ebe4fbc08ade2ebaf08b8ad218ac705d8b6.zip
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).
-rw-r--r--erts/epmd/test/Makefile14
1 files changed, 9 insertions, 5 deletions
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: