[Pkg-ocaml-maint-commits] [SCM] bin-prot packaging branch, master, updated. debian/1.0.5-5-8-g021edea
Stefano Zacchiroli
zack at upsilon.cc
Mon Mar 16 14:46:59 UTC 2009
The following commit has been merged in the master branch:
commit eda47bacac0433a59694424850fe0e527a70a1ba
Merge: 69037cebd1dcb2ddd7ba07d1a1e8ca6c99b681a4 c5377d5bb9a91e500058c9735d35f6853d22dd5a
Author: Stefano Zacchiroli <zack at upsilon.cc>
Date: Mon Mar 16 15:42:22 2009 +0100
Merge commit 'upstream/1.2.10'
diff --combined OCamlMakefile
index 6ad15a9,830f56e..94e0c4f
--- 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) | awk '{print toupper(substr($$0,1,1))substr($$0,2)}')
+ 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
@@@ -954,9 -969,12 +969,12 @@@ $(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) $(OCAMLOPT) -pack -o $(LIB_PACK_NAME).cmx $(OCAMLLDFLAGS) $(REAL_IMPL)
@@@ -1012,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) $<
@@@ -1062,7 -1074,6 +1074,7 @@@
.c.$(EXT_OBJ):
$(OCAMLC) -c -cc "$(CC)" -ccopt "$(CFLAGS) \
+ -fPIC \
$(CPPFLAGS) $(CPPFLAGS_WIN32) \
$(CFLAGS_WIN32) $(CINCFLAGS) $(CFLAG_O)$@ " $<
@@@ -1171,7 -1182,7 +1183,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 3f1c2d0,b0f7fb0..581d62f
--- a/lib/Makefile
+++ b/lib/Makefile
@@@ -10,25 -10,31 +10,31 @@@ SOURCES =
unsafe_write_c.mli unsafe_write_c.ml \
write_ml.mli write_ml.ml \
unsafe_read_c.mli unsafe_read_c.ml \
- read_c.mli read_c.ml \
+ size.mli size.ml \
read_ml.mli read_ml.ml \
write_c.mli write_c.ml \
- size.mli size.ml \
- sw_arg.mli sw_arg.ml \
- utils.mli utils.ml \
- map_to_safe.ml
+ read_c.mli read_c.ml \
+ type_class.mli type_class.ml \
+ map_to_safe.ml \
+ binable.ml \
+ utils.mli utils.ml
- ifeq ($(shell uname -p), x86_64)
+ ifeq ($(shell uname -m), x86_64)
export ARCH_FLAGS = -DARCH_SIXTYFOUR
endif
+ ifeq ($(shell uname -s), Darwin)
+ export SEXPLIB_CPP = cc -E -no-cpp-precomp -x c
+ else
+ export SEXPLIB_CPP = cpp
+ endif
+
LIB_PACK_NAME = bin_prot
INCDIRS = +camlp4
CFLAGS = \
-pipe -g -fPIC -O2 -fomit-frame-pointer \
-Wall -pedantic -Wextra -Wunused -Werror -Wno-long-long
-PACKS = type-conv
+PACKS = type-conv bigarray
RESULT = bin_prot
TRASH = pa_bin_prot.cmi pa_bin_prot.cmo pa_bin_prot.annot
@@@ -38,11 -44,6 +44,11 @@@ all:
byte-code-library native-code-library \
pa_bin_prot.cmi pa_bin_prot.cmo
+byte: \
+ pack-byte-code \
+ byte-code-library \
+ pa_bin_prot.cmi pa_bin_prot.cmo
+
LIBINSTALL_FILES = \
common.mli nat0.mli read_c.mli read_ml.mli size.mli \
unsafe_common.mli unsafe_read_c.mli unsafe_write_c.mli \
--
bin-prot packaging
More information about the Pkg-ocaml-maint-commits
mailing list