From a67673641038944fc079edcdd0c3913f6448ebea Mon Sep 17 00:00:00 2001 From: John Whitington Date: Tue, 2 Aug 2022 19:24:05 +0200 Subject: [PATCH] Allow bytecode-only build --- Makefile | 17 ++++++++++++----- cpdfcommand.ml | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a08420d..ca8bedb 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,18 @@ OCAMLNCFLAGS = -g -safe-string OCAMLBCFLAGS = -g -safe-string OCAMLLDFLAGS = -g -all : native-code native-code-library byte-code-library top htdoc +TARGETS := byte-code-library top htdoc + +LIBINSTALL_FILES = cpdf.cma \ +$(foreach x,$(MODS),$x.mli) $(foreach x,$(MODS),$x.cmi) \ +$(foreach x,$(MODS),$x.cmti) + +ifneq ($(shell ocamlopt -version),) + TARGETS += native-code native-code-library + LIBINSTALL_FILES += cpdf.a cpdf.cmxa $(foreach x,$(PDFMODS),$x.cmx) +endif + +all : $(TARGETS) clean :: rm -rf doc foo foo2 out.pdf out2.pdf foo.pdf decomp.pdf *.cmt *.cmti \ @@ -34,10 +45,6 @@ DOC_FILES = cpdfunicodedata.mli cpdferror.mli cpdfdebug.mli cpdfjson.mli \ cpdfspot.mli cpdfpagelabels.mli cpdfcreate.mli cpdfannot.mli \ cpdfxobject.mli cpdfimpose.mli cpdftweak.mli cpdfcommand.mli -LIBINSTALL_FILES = cpdf.a cpdf.cma cpdf.cmxa \ -$(foreach x,$(MODS),$x.mli) $(foreach x,$(MODS),$x.cmi) \ -$(foreach x,$(MODS),$x.cmx) $(foreach x,$(MODS),$x.cmti) - install : libinstall -include OCamlMakefile diff --git a/cpdfcommand.ml b/cpdfcommand.ml index b407d48..ed72d2c 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -3,7 +3,7 @@ let demo = false let noncomp = false let major_version = 2 let minor_version = 6 -let version_date = "(devel, 14 Jul 2022)" +let version_date = "(devel, 16th Jul 2022)" open Pdfutil open Pdfio