[llvm-commits] [llvm] r125202 - in /llvm/trunk: bindings/ocaml/Makefile.ocaml examples/OCaml-Kaleidoscope/Chapter6/Makefile examples/OCaml-Kaleidoscope/Chapter7/Makefile

Erick Tryzelaar idadesub at users.sourceforge.net
Wed Feb 9 10:32:02 PST 2011


Author: erickt
Date: Wed Feb  9 12:32:02 2011
New Revision: 125202

URL: http://llvm.org/viewvc/llvm-project?rev=125202&view=rev
Log:
Fix compiling the ocaml kaleidoscope tutorials

Modified:
    llvm/trunk/bindings/ocaml/Makefile.ocaml
    llvm/trunk/examples/OCaml-Kaleidoscope/Chapter6/Makefile
    llvm/trunk/examples/OCaml-Kaleidoscope/Chapter7/Makefile

Modified: llvm/trunk/bindings/ocaml/Makefile.ocaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/Makefile.ocaml?rev=125202&r1=125201&r2=125202&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/Makefile.ocaml (original)
+++ llvm/trunk/bindings/ocaml/Makefile.ocaml Wed Feb  9 12:32:02 2011
@@ -73,8 +73,13 @@
 endif
 
 # Source files
+ifndef OcamlSources1
 OcamlSources1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.ml))
+endif
+
+ifndef OcamlHeaders1
 OcamlHeaders1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.mli))
+endif
 
 OcamlSources2 := $(filter-out $(ExcludeSources),$(OcamlSources1))
 OcamlHeaders2 := $(filter-out $(ExcludeHeaders),$(OcamlHeaders1))
@@ -352,11 +357,11 @@
 ifndef OCAMLOPT
 $(ToolEXE): $(ObjectsCMO) $(OcamlDir)/.dir
 	$(Echo) "Archiving $(notdir $@) for $(BuildMode) build"
-	$(Verb) $(Archive.EXE) $@ $<
+	$(Verb) $(Archive.EXE) $@ $(ObjectsCMO)
 else
 $(ToolEXE): $(ObjectsCMX) $(OcamlDir)/.dir
 	$(Echo) "Archiving $(notdir $@) for $(BuildMode) build"
-	$(Verb) $(Archive.EXE) $@ $<
+	$(Verb) $(Archive.EXE) $@ $(ObjectsCMX)
 endif
 endif
 

Modified: llvm/trunk/examples/OCaml-Kaleidoscope/Chapter6/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/OCaml-Kaleidoscope/Chapter6/Makefile?rev=125202&r1=125201&r2=125202&view=diff
==============================================================================
--- llvm/trunk/examples/OCaml-Kaleidoscope/Chapter6/Makefile (original)
+++ llvm/trunk/examples/OCaml-Kaleidoscope/Chapter6/Makefile Wed Feb  9 12:32:02 2011
@@ -20,6 +20,15 @@
 
 OCAMLCFLAGS += -pp camlp4of
 
+OcamlSources1 = \
+	$(PROJ_SRC_DIR)/ast.ml \
+	$(PROJ_SRC_DIR)/parser.ml \
+	$(PROJ_SRC_DIR)/codegen.ml \
+	$(PROJ_SRC_DIR)/lexer.ml \
+	$(PROJ_SRC_DIR)/token.ml \
+	$(PROJ_SRC_DIR)/toplevel.ml \
+	$(PROJ_SRC_DIR)/toy.ml
+
 ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml
 
 include $(LEVEL)/bindings/ocaml/Makefile.ocaml

Modified: llvm/trunk/examples/OCaml-Kaleidoscope/Chapter7/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/OCaml-Kaleidoscope/Chapter7/Makefile?rev=125202&r1=125201&r2=125202&view=diff
==============================================================================
--- llvm/trunk/examples/OCaml-Kaleidoscope/Chapter7/Makefile (original)
+++ llvm/trunk/examples/OCaml-Kaleidoscope/Chapter7/Makefile Wed Feb  9 12:32:02 2011
@@ -20,6 +20,15 @@
 
 OCAMLCFLAGS += -pp camlp4of
 
+OcamlSources1 = \
+	$(PROJ_SRC_DIR)/ast.ml \
+	$(PROJ_SRC_DIR)/parser.ml \
+	$(PROJ_SRC_DIR)/codegen.ml \
+	$(PROJ_SRC_DIR)/lexer.ml \
+	$(PROJ_SRC_DIR)/token.ml \
+	$(PROJ_SRC_DIR)/toplevel.ml \
+	$(PROJ_SRC_DIR)/toy.ml
+
 ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml
 
 include $(LEVEL)/bindings/ocaml/Makefile.ocaml





More information about the llvm-commits mailing list