diff options
author | glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-09-22 11:42:48 +0000 |
---|---|---|
committer | glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-09-22 11:42:48 +0000 |
commit | c3867731157bac7bf95d6e2ae14e8ac7bbde563f (patch) | |
tree | 986f10f75d9a9957b72115c76eca9cb35c5904da | |
parent | 907c5df7bad31404e9f4a8384e4cc43236e4ba9a (diff) |
Fix use of $(HASNATDYNLINK) in coq_makefile output
Generated makefiles were broken because
$(if ifeq '$(HASNATDYNLINK)' 'true',X)
always returns X.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15826 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | tools/coq_makefile.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml index 0cca88540..5329352c2 100644 --- a/tools/coq_makefile.ml +++ b/tools/coq_makefile.ml @@ -244,7 +244,7 @@ let install (vfiles,(mlifiles,ml4files,mlfiles,mllibfiles,mlpackfiles),_,sds) in print "\n"; end; print "install:"; - if (not_empty cmxsfiles) then print "$(if ifeq '$(HASNATDYNLINK)' 'true',install-natdynlink)"; + if (not_empty cmxsfiles) then print "$(if $(HASNATDYNLINK_OR_EMPTY),install-natdynlink)"; print "\n"; install_include_by_root where_what_oth; List.iter @@ -587,14 +587,18 @@ let main_targets vfiles (mlifiles,ml4files,mlfiles,mllibfiles,mlpackfiles) other print "CMXSFILES=$(CMXFILES:.cmx=.cmxs) $(CMXAFILES:.cmxa=.cmxs)\n"; classify_files_by_root "CMXSFILES" (l1@l2) inc; end; - print "\n"; + print "ifeq '$(HASNATDYNLINK)' 'true'\n"; + print "HASNATDYNLINK_OR_EMPTY := yes\n"; + print "else\n"; + print "HASNATDYNLINK_OR_EMPTY :=\n"; + print "endif\n\n"; section "Definition of the toplevel targets."; print "all: "; if !some_vfile then print "$(VOFILES) "; if !some_mlfile || !some_ml4file || !some_mlpackfile then print "$(CMOFILES) "; if !some_mllibfile then print "$(CMAFILES) "; if !some_mlfile || !some_ml4file || !some_mllibfile || !some_mlpackfile - then print "$(if ifeq '$(HASNATDYNLINK)' 'true',$(CMXSFILES)) "; + then print "$(if $(HASNATDYNLINK_OR_EMPTY),$(CMXSFILES)) "; print_list "\\\n " other_targets; print "\n\n"; if !some_mlifile then begin |