[Pkg-ocaml-maint-commits] [SCM] sexplib310 packaging branch, master, updated. debian/3.7.4-3-6-g6d3dd12
Stefano Zacchiroli
zack at upsilon.cc
Mon Feb 2 18:13:35 UTC 2009
The following commit has been merged in the master branch:
commit 0cde1f398a4bb7b495b1f67934ab3e7753a194ce
Merge: 66c235dbb10871fca1f45501713413238398b872 9cbfeee45882f4cee8a03f1a06b8b15bcc07a8ec
Author: Stefano Zacchiroli <zack at upsilon.cc>
Date: Mon Feb 2 18:30:55 2009 +0100
Merge commit 'upstream/4.2.6'
Conflicts:
lib/Makefile
diff --combined OCamlMakefile
index 16500f8,e9e0753..a21696b
--- a/OCamlMakefile
+++ b/OCamlMakefile
@@@ -588,6 -588,10 +588,10 @@@ els
OBJS_LIBS := $(CLIBS_OPTS) $(MAYBE_IDL)
endif
+ ifdef LIB_PACK_NAME
+ FOR_PACK_NAME := $(shell echo $(LIB_PACK_NAME) | sed -e 's/^\(.\)/\U\1/')
+ endif
+
# If we have to make byte-code
ifndef REAL_OCAMLC
BYTE_OCAML := y
@@@ -598,7 -602,13 +602,13 @@@
# the path since I don't know the paths built into the compiler, so
# just include the ones with slashes in their names.
EXTRADEPS := $(addsuffix .cma,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
- SPECIAL_OCAMLFLAGS := $(OCAMLBCFLAGS)
+
+
+ ifndef LIB_PACK_NAME
+ SPECIAL_OCAMLFLAGS := $(OCAMLBCFLAGS)
+ else
+ SPECIAL_OCAMLFLAGS := -for-pack $(FOR_PACK_NAME) $(OCAMLBCFLAGS)
+ endif
REAL_OCAMLC := $(INTF_OCAMLC)
@@@ -655,6 -665,11 +665,11 @@@ els
PLDFLAGS := -p
endif
+ ifndef LIB_PACK_NAME
+ SPECIAL_OCAMLFLAGS := $(OCAMLNCFLAGS)
+ else
+ SPECIAL_OCAMLFLAGS := -for-pack $(FOR_PACK_NAME) $(OCAMLNCFLAGS)
+ endif
REAL_IMPL := $(IMPL_CMX)
REAL_IMPL_INTF := $(IMPLX_INTF)
IMPL_SUF := .cmx
@@@ -791,6 -806,23 +806,23 @@@ debug-code-nolink: $(PRE_TARGETS
OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
dcnl: debug-code-nolink
+ # generates byte-code with debugging information (native code)
+ debug-native-code: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
+ REAL_RESULT="$(NCRESULT)" make_deps=yes \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ OCAMLFLAGS="-g $(OCAMLFLAGS)" \
+ OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
+ dnc: debug-native-code
+
+ debug-native-code-nolink: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
+ REAL_RESULT="$(NCRESULT)" make_deps=yes \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ OCAMLFLAGS="-g $(OCAMLFLAGS)" \
+ OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
+ dncnl: debug-native-code-nolink
+
# generates byte-code libraries with debugging information
debug-code-library: $(PRE_TARGETS)
$(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
@@@ -801,6 -833,17 +833,17 @@@
OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
dcl: debug-code-library
+ # generates byte-code libraries with debugging information (native code)
+ debug-native-code-library: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(RES_CLIB) $(NCRESULT).cma \
+ REAL_RESULT="$(NCRESULT)" make_deps=yes \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ CREATE_LIB=yes \
+ OCAMLFLAGS="-g $(OCAMLFLAGS)" \
+ OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
+ dncl: debug-native-code-library
+
# generates byte-code for profiling
profiling-byte-code: $(PRE_TARGETS)
$(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
@@@ -926,19 -969,22 +969,22 @@@ $(RESULT).cma: $(REAL_IMPL_INTF) $(MAK
$(RESULT).cmxa $(RESULT).$(EXT_LIB): $(REAL_IMPL_INTF) $(EXTRADEPS) $(RESULTDEPS)
$(REAL_OCAMLFIND) $(OCAMLOPT) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(REAL_IMPL)
else
+ # Packing a bytecode library
ifdef BYTE_OCAML
$(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo: $(REAL_IMPL_INTF)
$(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack -o $(LIB_PACK_NAME).cmo $(OCAMLLDFLAGS) $(REAL_IMPL)
+ # Packing into a unit which can be transformed into a library
+ # Remember the .ml's must have been compiled with -for-pack $(LIB_PACK_NAME)
else
$(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx: $(REAL_IMPL_INTF)
- $(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack -o $(LIB_PACK_NAME).cmx $(OCAMLLDFLAGS) $(REAL_IMPL)
+ $(REAL_OCAMLFIND) $(OCAMLOPT) -pack -o $(LIB_PACK_NAME).cmx $(OCAMLLDFLAGS) $(REAL_IMPL)
endif
$(RESULT).cma: $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
$(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmo
$(RESULT).cmxa $(RESULT).$(EXT_LIB): $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx $(EXTRADEPS) $(RESULTDEPS)
- $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmx
+ $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(filter-out -custom, $(ALL_LDFLAGS)) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmx
endif
$(RES_CLIB): $(OBJ_LINK)
@@@ -984,12 -1030,6 +1030,6 @@@ endi
-c -pp "$$pp $(PPFLAGS)" $(ALL_OCAMLCFLAGS) $<; \
fi
- ifdef PACK_LIB
- $(REAL_RESULT).cmo $(REAL_RESULT).cmx $(REAL_RESULT).o: $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS)
- $(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack $(ALL_LDFLAGS) \
- $(OBJS_LIBS) -o $@ $(REAL_IMPL)
- endif
-
.PRECIOUS: %.ml
%.ml: %.mll
$(OCAMLLEX) $(LFLAGS) $<
@@@ -1142,7 -1182,7 +1182,7 @@@ libinstall: al
$(QUIET)printf "\nInstallation successful.\n"
.PHONY: libinstall-byte-code
-libinstall-byte-code: all
+libinstall-byte-code: byte-code
$(QUIET)printf "\nInstalling byte-code library with ocamlfind\n"
$(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
$(filter-out $(RESULT).$(EXT_LIB) $(RESULT).cmxa, $(LIBINSTALL_FILES))
diff --combined lib/Makefile
index df635f7,40037a3..9ac1321
--- a/lib/Makefile
+++ b/lib/Makefile
@@@ -12,26 -12,27 +12,32 @@@ SOURCES =
conv_error.ml
LIB_PACK_NAME = sexplib
INCDIRS = +camlp4
- OCAMLFLAGS = -for-pack Sexplib
-PACKS = type-conv
+PACKS = type-conv bigarray num
RESULT = sexplib
- TRASH = pa_sexp_conv.cmi pa_sexp_conv.cmo pa_sexp_conv.annot
+ TRASH = \
+ pa_sexp_conv.cmi pa_sexp_conv.cmo pa_sexp_conv.annot \
+ install_printers.cmi install_printers.cmo \
+ install_printers.annot sexplib_top.cma
all: \
- pack-byte-code pack-native-code \
+ pack-byte-code pack-native-code toplevel-library \
sexplib.cma sexplib.cmxa \
pa_sexp_conv.cmi pa_sexp_conv.cmo
+byte: \
+ pack-byte-code \
+ sexplib.cma \
+ pa_sexp_conv.cmi pa_sexp_conv.cmo
+
+ toplevel-library: byte-code-library \
+ install_printers.cmi install_printers.cmo
+ $(OCAMLC) -a -o sexplib_top.cma sexplib.cma install_printers.cmo
+
LIBINSTALL_FILES = \
- sexp.mli path.mli conv.mli \
+ sexp_intf.ml sexp.mli path.mli conv.mli \
sexplib.cmi sexplib.cma sexplib.cmxa sexplib.a \
- pa_sexp_conv.cmi pa_sexp_conv.cmo
+ pa_sexp_conv.cmi pa_sexp_conv.cmo sexplib_top.cma
install: libinstall
uninstall: libuninstall
--
sexplib310 packaging
More information about the Pkg-ocaml-maint-commits
mailing list