summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Clerc <xavier.clerc@inria.fr>2010-05-03 15:00:11 +0000
committerXavier Clerc <xavier.clerc@inria.fr>2010-05-03 15:00:11 +0000
commit7325d7c1f19e11ee1c2a9804446a03438aff5ff5 (patch)
treee757a91b2b7737826283d19876b4f7a8286e55d9
parentfa650516686576fc94c9d987123893a1a6ad353f (diff)
downloadocaml-7325d7c1f19e11ee1c2a9804446a03438aff5ff5.tar.gz
Makefile conditionals replaced with shell conditionals for improved portability
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10354 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--testsuite/makefiles/Makefile.one4
-rw-r--r--testsuite/makefiles/Makefile.several10
2 files changed, 4 insertions, 10 deletions
diff --git a/testsuite/makefiles/Makefile.one b/testsuite/makefiles/Makefile.one
index 081b36916b..deffb37cb6 100644
--- a/testsuite/makefiles/Makefile.one
+++ b/testsuite/makefiles/Makefile.one
@@ -10,9 +10,7 @@ O_FILES=$(patsubst %,%.$(O),$(C_FILES))
GENERATED_SOURCES=$(patsubst %,%.ml,$(LEX_MODULES)) $(patsubst %,%.ml,$(YACC_MODULES)) $(patsubst %,%.mli,$(YACC_MODULES))
-ifdef C_FILES
-ADD_CFLAGS+=-custom
-endif
+ADD_CFLAGS+=`if [ -z $(C_FILES) ]; then true; else echo '-custom'; fi`
default: compile run
diff --git a/testsuite/makefiles/Makefile.several b/testsuite/makefiles/Makefile.several
index 2e29822619..9e81cbe13b 100644
--- a/testsuite/makefiles/Makefile.several
+++ b/testsuite/makefiles/Makefile.several
@@ -7,13 +7,9 @@ CMX_FILES=$(patsubst %,%.cmx,$(MODULES))
CMA_FILES=$(patsubst %,%.cma,$(LIBRARIES))
CMXA_FILES=$(patsubst %,%.cmxa,$(LIBRARIES))
O_FILES=$(patsubst %,%.$(O),$(C_FILES) $(F_FILES))
-ifdef C_FILES
-ADD_CFLAGS+=-custom
-endif
-ifdef F_FILES
-ADD_CFLAGS+=$(FORTRAN_LIBRARY)
-ADD_OPTFLAGS+=$(FORTRAN_LIBRARY)
-endif
+ADD_CFLAGS+=`if [ -z $(C_FILES) ]; then true; else echo '-custom'; fi`
+ADD_CFLAGS+=`if [ -z $(F_FILES) ]; then true; else echo '$(FORTRAN_LIBRARY)'; fi`
+ADD_OPTFLAGS+=`if [ -z $(F_FILES) ]; then true; else echo '$(FORTRAN_LIBRARY)'; fi`
run-all:
@for file in $(C_FILES); do \