Commit f119be97 authored by Pietro Abate's avatar Pietro Abate

[r2004-06-28 10:20:27 by afrisch] Cosmetique

Original author: afrisch
Date: 2004-06-28 10:20:28+00:00
parent 2d92c704
......@@ -92,7 +92,13 @@ INSTALL := $(shell which install)
all: cduce dtd2cduce validate cdo2ml
ifneq ($(ML_INTERFACE), false)
all: cDuce_all.$(EXTENSION_LIB)
all: cDuce_all.cma
endif
ifeq ($(NATIVE),true)
all: cDuce_all.cmxa
cDuce_all.cma:
$(MAKE) NATIVE=false $@
endif
install: all install_lib
......@@ -106,10 +112,16 @@ install: all install_lib
install_lib:
ifneq ($(ML_INTERFACE), false)
$(OCAMLFIND) install cduce META \
cDuce_all.cmi cDuce_all.$(EXTENSION_LIB) \
oCaml_all.cmi oCaml_all.$(EXTENSION_LIB) \
$(wildcard *.a)
@echo "--> Build META"
@echo 'version="$(VERSION)"' > META
@echo 'requires="$(PACKAGES) camlp4.gramlib"' >> META
@echo 'description="Runtime support for CDuce"' >> META
@echo 'archive(byte)="oCaml_all.cma,cDuce_all.cma"' >> META
@echo 'archive(native)="oCaml_all.cmxa,cDuce_all.cmxa"' >> META
-$(OCAMLFIND) remove cduce
-$(OCAMLFIND) install cduce META \
cDuce_all.cmi oCaml_all.cmi \
$(wildcard *.cma) $(wildcard *.cmxa) $(wildcard *.a)
endif
uninstall:
......@@ -135,8 +147,8 @@ help:
# Source directories
DIRS = misc parser schema typing types compile runtime driver query cdo2cmo ocamliface
CLEAN_DIRS = $(DIRS) tools tests
DIRS = misc parser schema typing types compile runtime driver query ocamliface
CLEAN_DIRS = $(DIRS) cdo2cmo tools tests
# Objects to build
......@@ -213,14 +225,10 @@ cduce_packed: cduce_packed.$(EXTENSION)
cDuce_all.$(EXTENSION_LIB): $(OBJECTS:.cmo=.$(EXTENSION))
echo 'version="$(VERSION)"' > META
echo 'requires="$(PACKAGES) camlp4.gramlib"' >> META
echo 'description="Runtime support for CDuce"' >> META
echo 'archive(byte)="oCaml_all.cma,cDuce_all.cma"' >> META
echo 'archive(native)="oCaml_all.cmxa,cDuce_all.cmxa"' >> META
$(COMPILE) -o cDuce_all.$(EXTENSION) -pack $^
$(COMPILE) -a -o cDuce_all.$(EXTENSION_LIB) \
cDuce_all.$(EXTENSION)
@echo "--> Build $@"
@$(COMPILE) -o cDuce_all.$(EXTENSION) -pack $^
@$(COMPILE) -a -o $@ cDuce_all.$(EXTENSION)
oCaml_all.$(EXTENSION_LIB):
cd cdo2cmo; $(MAKE) PREFIX=$(ML_MODULES) MODEL=$(ML_INTERFACE) $@
......
# Do "make install_cdml" before running this test
STATIC=-static
CAML=ocamlopt
run:
ocamlc -c a.mli
......@@ -8,11 +9,11 @@ run:
../../cduce --compile a.cd
../../cdo2ml $(STATIC) c.cdo > c.ml
../../cdo2ml $(STATIC) a.cdo > a.ml
ocamlfind ocamlc -package cduce -linkpkg -o a c.ml a.ml b.ml
ocamlfind $(CAML) -package cduce -linkpkg -o a c.ml a.ml b.ml
ifeq ($(STATIC),-static)
rm *.cdo
endif
./a
clean:
rm -f *.cmo *.cdo *.cmi a.ml *~ a
rm -f *.cmo *.cmx *.o *.cdo *.cmi a.ml *~ a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment