Commit abf4fba2 authored by Pietro Abate's avatar Pietro Abate
Browse files

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

Original author: afrisch
Date: 2004-06-28 10:20:28+00:00
parent 220b5c21
...@@ -92,7 +92,13 @@ INSTALL := $(shell which install) ...@@ -92,7 +92,13 @@ INSTALL := $(shell which install)
all: cduce dtd2cduce validate cdo2ml all: cduce dtd2cduce validate cdo2ml
ifneq ($(ML_INTERFACE), false) 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 endif
install: all install_lib install: all install_lib
...@@ -106,10 +112,16 @@ install: all install_lib ...@@ -106,10 +112,16 @@ install: all install_lib
install_lib: install_lib:
ifneq ($(ML_INTERFACE), false) ifneq ($(ML_INTERFACE), false)
$(OCAMLFIND) install cduce META \ @echo "--> Build META"
cDuce_all.cmi cDuce_all.$(EXTENSION_LIB) \ @echo 'version="$(VERSION)"' > META
oCaml_all.cmi oCaml_all.$(EXTENSION_LIB) \ @echo 'requires="$(PACKAGES) camlp4.gramlib"' >> META
$(wildcard *.a) @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 endif
uninstall: uninstall:
...@@ -135,8 +147,8 @@ help: ...@@ -135,8 +147,8 @@ help:
# Source directories # Source directories
DIRS = misc parser schema typing types compile runtime driver query cdo2cmo ocamliface DIRS = misc parser schema typing types compile runtime driver query ocamliface
CLEAN_DIRS = $(DIRS) tools tests CLEAN_DIRS = $(DIRS) cdo2cmo tools tests
# Objects to build # Objects to build
...@@ -213,14 +225,10 @@ cduce_packed: cduce_packed.$(EXTENSION) ...@@ -213,14 +225,10 @@ cduce_packed: cduce_packed.$(EXTENSION)
cDuce_all.$(EXTENSION_LIB): $(OBJECTS:.cmo=.$(EXTENSION)) cDuce_all.$(EXTENSION_LIB): $(OBJECTS:.cmo=.$(EXTENSION))
echo 'version="$(VERSION)"' > META @echo "--> Build $@"
echo 'requires="$(PACKAGES) camlp4.gramlib"' >> META @$(COMPILE) -o cDuce_all.$(EXTENSION) -pack $^
echo 'description="Runtime support for CDuce"' >> META @$(COMPILE) -a -o $@ cDuce_all.$(EXTENSION)
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)
oCaml_all.$(EXTENSION_LIB): oCaml_all.$(EXTENSION_LIB):
cd cdo2cmo; $(MAKE) PREFIX=$(ML_MODULES) MODEL=$(ML_INTERFACE) $@ cd cdo2cmo; $(MAKE) PREFIX=$(ML_MODULES) MODEL=$(ML_INTERFACE) $@
......
# Do "make install_cdml" before running this test # Do "make install_cdml" before running this test
STATIC=-static STATIC=-static
CAML=ocamlopt
run: run:
ocamlc -c a.mli ocamlc -c a.mli
...@@ -8,11 +9,11 @@ run: ...@@ -8,11 +9,11 @@ run:
../../cduce --compile a.cd ../../cduce --compile a.cd
../../cdo2ml $(STATIC) c.cdo > c.ml ../../cdo2ml $(STATIC) c.cdo > c.ml
../../cdo2ml $(STATIC) a.cdo > a.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) ifeq ($(STATIC),-static)
rm *.cdo rm *.cdo
endif endif
./a ./a
clean: 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