diff options
author | Sébastien Hinderer <seb@tarides.com> | 2022-12-12 10:34:59 +0100 |
---|---|---|
committer | Sébastien Hinderer <seb@tarides.com> | 2022-12-12 10:34:59 +0100 |
commit | 2c4fd25c3857f13ccd08405ae6224f5381d23b48 (patch) | |
tree | 4937042e9d586ed688ce19eea7aa7c8360c2dbc0 | |
parent | ace983bfac114b1ccc438952fac28bc863300853 (diff) | |
download | ocaml-2c4fd25c3857f13ccd08405ae6224f5381d23b48.tar.gz |
Merge tools/Makefile into the root Makefile
-rw-r--r-- | .depend | 268 | ||||
-rw-r--r-- | Changes | 5 | ||||
-rw-r--r-- | Makefile | 233 | ||||
-rw-r--r-- | Makefile.common | 1 | ||||
-rw-r--r-- | tools/.depend | 268 | ||||
-rw-r--r-- | tools/Makefile | 274 |
6 files changed, 475 insertions, 574 deletions
@@ -6883,3 +6883,271 @@ lex/table.cmo : \ lex/table.cmx : \ lex/table.cmi lex/table.cmi : +tools/cmpbyt.cmo : \ + bytecomp/bytesections.cmi \ + tools/cmpbyt.cmi +tools/cmpbyt.cmx : \ + bytecomp/bytesections.cmx \ + tools/cmpbyt.cmi +tools/cmpbyt.cmi : +tools/cvt_emit.cmo : \ + tools/cvt_emit.cmi +tools/cvt_emit.cmx : \ + tools/cvt_emit.cmi +tools/cvt_emit.cmi : +tools/dumpobj.cmo : \ + bytecomp/symtable.cmi \ + tools/opnames.cmi \ + bytecomp/opcodes.cmi \ + parsing/location.cmi \ + lambda/lambda.cmi \ + bytecomp/instruct.cmi \ + typing/ident.cmi \ + utils/config.cmi \ + file_formats/cmo_format.cmi \ + bytecomp/bytesections.cmi \ + parsing/asttypes.cmi \ + tools/dumpobj.cmi +tools/dumpobj.cmx : \ + bytecomp/symtable.cmx \ + tools/opnames.cmx \ + bytecomp/opcodes.cmx \ + parsing/location.cmx \ + lambda/lambda.cmx \ + bytecomp/instruct.cmx \ + typing/ident.cmx \ + utils/config.cmx \ + file_formats/cmo_format.cmi \ + bytecomp/bytesections.cmx \ + parsing/asttypes.cmi \ + tools/dumpobj.cmi +tools/dumpobj.cmi : +tools/eqparsetree.cmo : \ + parsing/parsetree.cmi \ + parsing/longident.cmi \ + parsing/location.cmi \ + parsing/asttypes.cmi +tools/eqparsetree.cmx : \ + parsing/parsetree.cmi \ + parsing/longident.cmx \ + parsing/location.cmx \ + parsing/asttypes.cmi +tools/gen_sizeclasses.cmo : +tools/gen_sizeclasses.cmx : +tools/lintapidiff.cmo : \ + typing/printtyp.cmi \ + driver/pparse.cmi \ + typing/path.cmi \ + parsing/parsetree.cmi \ + parsing/parse.cmi \ + utils/misc.cmi \ + parsing/location.cmi \ + typing/ident.cmi \ + tools/lintapidiff.cmi +tools/lintapidiff.cmx : \ + typing/printtyp.cmx \ + driver/pparse.cmx \ + typing/path.cmx \ + parsing/parsetree.cmi \ + parsing/parse.cmx \ + utils/misc.cmx \ + parsing/location.cmx \ + typing/ident.cmx \ + tools/lintapidiff.cmi +tools/lintapidiff.cmi : +tools/make_opcodes.cmo : \ + tools/make_opcodes.cmi +tools/make_opcodes.cmx : \ + tools/make_opcodes.cmi +tools/make_opcodes.cmi : +tools/objinfo.cmo : \ + bytecomp/symtable.cmi \ + middle_end/symbol.cmi \ + typing/shape.cmi \ + middle_end/printclambda.cmi \ + utils/misc.cmi \ + middle_end/linkage_name.cmi \ + typing/ident.cmi \ + middle_end/flambda/export_info.cmi \ + middle_end/compilation_unit.cmi \ + file_formats/cmxs_format.cmi \ + file_formats/cmx_format.cmi \ + file_formats/cmt_format.cmi \ + file_formats/cmo_format.cmi \ + file_formats/cmi_format.cmi \ + bytecomp/bytesections.cmi \ + utils/binutils.cmi \ + tools/objinfo.cmi +tools/objinfo.cmx : \ + bytecomp/symtable.cmx \ + middle_end/symbol.cmx \ + typing/shape.cmx \ + middle_end/printclambda.cmx \ + utils/misc.cmx \ + middle_end/linkage_name.cmx \ + typing/ident.cmx \ + middle_end/flambda/export_info.cmx \ + middle_end/compilation_unit.cmx \ + file_formats/cmxs_format.cmi \ + file_formats/cmx_format.cmi \ + file_formats/cmt_format.cmx \ + file_formats/cmo_format.cmi \ + file_formats/cmi_format.cmx \ + bytecomp/bytesections.cmx \ + utils/binutils.cmx \ + tools/objinfo.cmi +tools/objinfo.cmi : +tools/ocamlcmt.cmo : \ + typing/untypeast.cmi \ + typing/stypes.cmi \ + parsing/pprintast.cmi \ + parsing/location.cmi \ + utils/load_path.cmi \ + typing/envaux.cmi \ + driver/compmisc.cmi \ + file_formats/cmt_format.cmi \ + typing/cmt2annot.cmi \ + utils/clflags.cmi \ + typing/annot.cmi \ + tools/ocamlcmt.cmi +tools/ocamlcmt.cmx : \ + typing/untypeast.cmx \ + typing/stypes.cmx \ + parsing/pprintast.cmx \ + parsing/location.cmx \ + utils/load_path.cmx \ + typing/envaux.cmx \ + driver/compmisc.cmx \ + file_formats/cmt_format.cmx \ + typing/cmt2annot.cmx \ + utils/clflags.cmx \ + typing/annot.cmi \ + tools/ocamlcmt.cmi +tools/ocamlcmt.cmi : +tools/ocamlcp.cmo : \ + tools/ocamlcp_common.cmi \ + driver/main_args.cmi \ + tools/ocamlcp.cmi +tools/ocamlcp.cmx : \ + tools/ocamlcp_common.cmx \ + driver/main_args.cmx \ + tools/ocamlcp.cmi +tools/ocamlcp.cmi : +tools/ocamlcp_common.cmo : \ + driver/main_args.cmi \ + driver/compenv.cmi \ + tools/ocamlcp_common.cmi +tools/ocamlcp_common.cmx : \ + driver/main_args.cmx \ + driver/compenv.cmx \ + tools/ocamlcp_common.cmi +tools/ocamlcp_common.cmi : \ + driver/main_args.cmi +tools/ocamldep.cmo : \ + driver/makedepend.cmi \ + tools/ocamldep.cmi +tools/ocamldep.cmx : \ + driver/makedepend.cmx \ + tools/ocamldep.cmi +tools/ocamldep.cmi : +tools/ocamlmklib.cmo : \ + utils/misc.cmi \ + utils/config.cmi \ + tools/ocamlmklib.cmi +tools/ocamlmklib.cmx : \ + utils/misc.cmx \ + utils/config.cmx \ + tools/ocamlmklib.cmi +tools/ocamlmklib.cmi : +tools/ocamlmktop.cmo : \ + utils/config.cmi \ + utils/ccomp.cmi \ + tools/ocamlmktop.cmi +tools/ocamlmktop.cmx : \ + utils/config.cmx \ + utils/ccomp.cmx \ + tools/ocamlmktop.cmi +tools/ocamlmktop.cmi : +tools/ocamloptp.cmo : \ + tools/ocamlcp_common.cmi \ + driver/main_args.cmi \ + tools/ocamloptp.cmi +tools/ocamloptp.cmx : \ + tools/ocamlcp_common.cmx \ + driver/main_args.cmx \ + tools/ocamloptp.cmi +tools/ocamloptp.cmi : +tools/ocamlprof.cmo : \ + utils/warnings.cmi \ + parsing/parsetree.cmi \ + parsing/parse.cmi \ + parsing/location.cmi \ + tools/ocamlprof.cmi +tools/ocamlprof.cmx : \ + utils/warnings.cmx \ + parsing/parsetree.cmi \ + parsing/parse.cmx \ + parsing/location.cmx \ + tools/ocamlprof.cmi +tools/ocamlprof.cmi : +tools/ocamltex.cmo : \ + toplevel/toploop.cmi \ + parsing/syntaxerr.cmi \ + parsing/parsetree.cmi \ + parsing/parse.cmi \ + utils/misc.cmi \ + parsing/location.cmi \ + utils/load_path.cmi \ + parsing/lexer.cmi \ + driver/compmisc.cmi \ + driver/compenv.cmi \ + utils/clflags.cmi \ + parsing/ast_iterator.cmi \ + parsing/ast_helper.cmi \ + tools/ocamltex.cmi +tools/ocamltex.cmx : \ + toplevel/toploop.cmx \ + parsing/syntaxerr.cmx \ + parsing/parsetree.cmi \ + parsing/parse.cmx \ + utils/misc.cmx \ + parsing/location.cmx \ + utils/load_path.cmx \ + parsing/lexer.cmx \ + driver/compmisc.cmx \ + driver/compenv.cmx \ + utils/clflags.cmx \ + parsing/ast_iterator.cmx \ + parsing/ast_helper.cmx \ + tools/ocamltex.cmi +tools/ocamltex.cmi : +tools/opnames.cmo : \ + tools/opnames.cmi +tools/opnames.cmx : \ + tools/opnames.cmi +tools/opnames.cmi : +tools/primreq.cmo : \ + utils/misc.cmi \ + utils/config.cmi \ + file_formats/cmo_format.cmi \ + tools/primreq.cmi +tools/primreq.cmx : \ + utils/misc.cmx \ + utils/config.cmx \ + file_formats/cmo_format.cmi \ + tools/primreq.cmi +tools/primreq.cmi : +tools/profiling.cmo : \ + tools/profiling.cmi +tools/profiling.cmx : \ + tools/profiling.cmi +tools/profiling.cmi : +tools/stripdebug.cmo : \ + utils/misc.cmi \ + bytecomp/bytesections.cmi \ + tools/stripdebug.cmi +tools/stripdebug.cmx : \ + utils/misc.cmx \ + bytecomp/bytesections.cmx \ + tools/stripdebug.cmi +tools/stripdebug.cmi : @@ -231,9 +231,14 @@ Working version Gabriel Scherer) ### Build system: + - #11590: Allow installing to a destination path containing spaces. (Élie Brami, review by Sébastien Hinderer and David Allsopp) +- #11243, #11248, #11268, #11420, #11675: merge the sub-makefiles into + the root Makefile. + (Sébastien Hinderer, review by David Allsopp and Florian Angeletti) + ### Bug fixes: - #10664, #11600: Unsoundness in the typing of polymorphic methods @@ -34,7 +34,7 @@ CAMLOPT=$(OCAMLRUN) ./ocamlopt$(EXE) $(STDLIBFLAGS) -I otherlibs/dynlink ARCHES=amd64 i386 arm arm64 power s390x riscv VPATH = utils parsing typing bytecomp file_formats lambda middle_end \ middle_end/closure middle_end/flambda middle_end/flambda/base_types \ - asmcomp driver toplevel + asmcomp driver toplevel tools INCLUDES = $(addprefix -I ,$(VPATH)) ifeq "$(strip $(NATDYNLINKOPTS))" "" @@ -90,8 +90,8 @@ utils/domainstate.ml: utils/domainstate.ml.c runtime/caml/domain_state.tbl utils/domainstate.mli: utils/domainstate.mli.c runtime/caml/domain_state.tbl $(CPP) -I runtime/caml $< > $@ -configure: configure.ac aclocal.m4 build-aux/ocaml_version.m4 tools/autogen - tools/autogen +configure: tools/autogen configure.ac aclocal.m4 build-aux/ocaml_version.m4 + $< .PHONY: partialclean partialclean:: @@ -109,6 +109,15 @@ ocamllex_PROGRAMS = $(addprefix lex/,ocamllex ocamllex.opt) ocamlyacc_PROGRAM = yacc/ocamlyacc +TOOLS_TO_INSTALL = \ + ocamldep ocamlprof ocamlcp ocamloptp ocamlmklib ocamlmktop ocamlobjinfo + +TOOLS = $(TOOLS_TO_INSTALL) ocamlcmt dumpobj primreq stripdebug cmpbyt + +TOOLS_PROGRAMS = $(addprefix tools/,$(TOOLS)) + +TOOLS_MODULES = tools/profiling + # C programs C_PROGRAMS = $(ocamlyacc_PROGRAM) @@ -118,7 +127,7 @@ $(foreach PROGRAM, $(C_PROGRAMS),\ # OCaml programs that are compiled in both bytecode and native code -OCAML_PROGRAMS = ocamlc ocamlopt lex/ocamllex +OCAML_PROGRAMS = ocamlc ocamlopt lex/ocamllex $(TOOLS_PROGRAMS) $(foreach PROGRAM, $(OCAML_PROGRAMS),\ $(eval $(call OCAML_PROGRAM,$(PROGRAM)))) @@ -129,18 +138,19 @@ $(foreach PROGRAM, $(OCAML_PROGRAMS),\ # cannot declare it as we do for other bytecode-only programs. # We have to use dedicated rules to build it -OCAML_BYTECODE_PROGRAMS = expunge +OCAML_BYTECODE_PROGRAMS = expunge \ + $(addprefix tools/,cvt_emit make_opcodes ocamltex) $(foreach PROGRAM, $(OCAML_BYTECODE_PROGRAMS),\ $(eval $(call OCAML_BYTECODE_PROGRAM,$(PROGRAM)))) # OCaml programs that are compiled only in native code -OCAML_NATIVE_PROGRAMS = ocamlnat +OCAML_NATIVE_PROGRAMS = ocamlnat tools/lintapidiff.opt $(foreach PROGRAM, $(OCAML_NATIVE_PROGRAMS),\ $(eval $(call OCAML_NATIVE_PROGRAM,$(PROGRAM)))) - + USE_RUNTIME_PRIMS = -use-prims ../runtime/primitives USE_STDLIB = -nostdlib -I ../stdlib @@ -551,8 +561,9 @@ asmcomp/scheduling.ml: asmcomp/$(ARCH)/scheduling.ml cd asmcomp; $(LN) $(ARCH)/scheduling.ml . # Preprocess the code emitters +cvt_emit = tools/cvt_emit$(EXE) -cvt_emit := tools/cvt_emit$(EXE) +beforedepend:: tools/cvt_emit.ml asmcomp/emit.ml: asmcomp/$(ARCH)/emit.mlp $(cvt_emit) echo \# 1 \"asmcomp/$(ARCH)/emit.mlp\" > $@ @@ -560,12 +571,12 @@ asmcomp/emit.ml: asmcomp/$(ARCH)/emit.mlp $(cvt_emit) || { rm -f $@; exit 2; } partialclean:: - rm -f asmcomp/emit.ml + rm -f asmcomp/emit.ml tools/cvt_emit.ml beforedepend:: asmcomp/emit.ml -$(cvt_emit): tools/cvt_emit.mll - $(MAKE) -C tools cvt_emit +cvt_emit_LIBRARIES = +cvt_emit_MODULES = tools/cvt_emit # The "expunge" utility @@ -1048,7 +1059,7 @@ clean:: # Dependencies subdirs = stdlib $(addprefix otherlibs/, $(ALL_OTHERLIBS)) \ - debugger ocamldoc ocamltest tools + debugger ocamldoc ocamltest .PHONY: alldepend alldepend: depend @@ -1272,36 +1283,166 @@ endif # Lint @since and @deprecated annotations +lintapidiff_LIBRARIES = \ + $(addprefix compilerlibs/ocaml,common bytecomp middleend) \ + otherlibs/str/str +lintapidiff_MODULES = tools/lintapidiff + +tools/lintapidiff.opt$(EXE): VPATH += otherlibs/str + VERSIONS=$(shell git tag|grep '^[0-9]*.[0-9]*.[0-9]*$$'|grep -v '^[12].') .PHONY: lintapidiff -lintapidiff: - $(MAKE) -C tools lintapidiff.opt +lintapidiff: tools/lintapidiff.opt$(EXE) git ls-files -- 'otherlibs/*/*.mli' 'stdlib/*.mli' |\ grep -Ev internal\|obj\|stdLabels\|moreLabels |\ tools/lintapidiff.opt $(VERSIONS) # Tools +TOOLS_BYTECODE_TARGETS = $(TOOLS_PROGRAMS) $(TOOLS_MODULES:=.cmo) + +TOOLS_NATIVE_TARGETS = $(TOOLS_PROGRAMS:=.opt) $(TOOLS_MODULES:=.cmx) + .PHONY: ocamltools ocamltools: ocamlc ocamllex compilerlibs/ocamlmiddleend.cma - $(MAKE) -C tools all + $(MAKE) tools-all + +.PHONY: tools-all +tools-all: $(TOOLS_BYTECODE_TARGETS) + +.PHONY: tools-allopt +tools-allopt: $(TOOLS_NATIVE_TARGETS) .PHONY: ocamltoolsopt ocamltoolsopt: ocamlopt - $(MAKE) -C tools opt + $(MAKE) tools-allopt .PHONY: ocamltoolsopt.opt ocamltoolsopt.opt: ocamlc.opt ocamllex.opt compilerlibs/ocamlmiddleend.cmxa - $(MAKE) -C tools opt.opt + $(MAKE) tools-allopt -# tools that require a full ocaml distribution: otherlibs and toplevel -.PHONY:othertools -othertools: - $(MAKE) -C tools othertools +# Tools that require a full ocaml distribution: otherlibs and toplevel + +OTHER_TOOLS = + +ocamltex = tools/ocamltex$(EXE) + +ifeq "$(build_ocamltex)" "true" +OTHER_TOOLS += $(ocamltex) +endif + +.PHONY: othertools +othertools: $(OTHER_TOOLS) partialclean:: - $(MAKE) -C tools clean + for prefix in cm* dll so lib a obj; do \ + rm -f tools/*.$$prefix; \ + done + +# The dependency generator + +ocamldep_LIBRARIES = $(addprefix compilerlibs/ocaml,common bytecomp) +ocamldep_MODULES = tools/ocamldep + +tools/ocamldep$(EXE): OC_BYTECODE_LDFLAGS += -compat-32 + +# The profiler + +ocamlprof_LIBRARIES = +ocamlprof_MODULES = \ + config build_path_prefix_map misc identifiable numbers arg_helper \ + local_store load_path clflags terminfo warnings location longident \ + docstrings syntaxerr ast_helper camlinternalMenhirLib parser pprintast \ + lexer parse ocamlprof + +ocamlcp_ocamloptp_MODULES = \ + config build_path_prefix_map misc profile warnings identifiable numbers \ + arg_helper local_store load_path clflags terminfo location ccomp compenv \ + main_args ocamlcp_common + +ocamlcp_LIBRARIES = +ocamlcp_MODULES = $(ocamlcp_ocamloptp_MODULES) ocamlcp + +ocamloptp_LIBRARIES = +ocamloptp_MODULES = $(ocamlcp_ocamloptp_MODULES) ocamloptp + +# To help building mixed-mode libraries (OCaml + C) +ocamlmklib_LIBRARIES = +ocamlmklib_MODULES = config build_path_prefix_map misc ocamlmklib + +# To make custom toplevels + +ocamlmktop_LIBRARIES = +ocamlmktop_MODULES = \ + config build_path_prefix_map misc identifiable numbers arg_helper \ + local_store load_path clflags profile ccomp ocamlmktop + +# Reading cmt files + +ocamlcmt_LIBRARIES = $(addprefix compilerlibs/ocaml,common bytecomp) +ocamlcmt_MODULES = tools/ocamlcmt +# The bytecode disassembler + +dumpobj_LIBRARIES = $(addprefix compilerlibs/ocaml,common bytecomp) +dumpobj_MODULES = $(addprefix tools/,opnames dumpobj) + +make_opcodes = tools/make_opcodes$(EXE) + +make_opcodes_LIBRARIES = +make_opcodes_MODULES = tools/make_opcodes + +tools/opnames.ml: runtime/caml/instruct.h $(make_opcodes) + $(NEW_OCAMLRUN) $(make_opcodes) -opnames < $< > $@ + +clean:: + rm -f $(addprefix tools/,opnames.ml make_opcodes.ml) + +beforedepend:: $(addprefix tools/,opnames.ml make_opcodes.ml) + +# Display info on compiled files + +ocamlobjinfo_LIBRARIES = \ + $(addprefix compilerlibs/ocaml,common bytecomp middleend) +ocamlobjinfo_MODULES = tools/objinfo + +# Scan object files for required primitives + +primreq_LIBRARIES = $(addprefix compilerlibs/ocaml,common bytecomp) +primreq_MODULES = tools/primreq + +# Copy a bytecode executable, stripping debug info + +stripdebug_LIBRARIES = \ + $(addprefix compilerlibs/ocaml,common bytecomp) +stripdebug_MODULES = tools/stripdebug + +# Compare two bytecode executables + +cmpbyt_LIBRARIES = $(addprefix compilerlibs/ocaml,common bytecomp) +cmpbyt_MODULES = tools/cmpbyt + +# Scan latex files, and run ocaml code examples + +ocamltex_LIBRARIES = \ + $(addprefix compilerlibs/ocaml,common bytecomp toplevel) \ + $(addprefix otherlibs/,str/str unix/unix) +ocamltex_MODULES = tools/ocamltex + +# ocamltex uses str.cma and unix.cma and so must be compiled with +# $(ROOTDIR)/ocamlc rather than with $(ROOTDIR)/boot/ocamlc since the boot +# compiler does not necessarily have the correct shared library +# configuration. +# Note: the following definitions apply to all the prerequisites +# of ocamltex. +$(ocamltex): CAMLC = $(OCAMLRUN) $(ROOTDIR)/ocamlc$(EXE) $(STDLIBFLAGS) +$(ocamltex): OC_COMMON_LDFLAGS += -linkall +$(ocamltex): VPATH += $(addprefix otherlibs/,str unix) + +tools/ocamltex.cmo: OC_COMMON_CFLAGS += -no-alias-deps + +# we need str and unix which depend on the bytecode version of other tools +# thus we use the othertools target ## Test compilation of backend-specific parts ARCH_SPECIFIC =\ @@ -1364,17 +1505,12 @@ toplevel/native/topeval.cmx: otherlibs/dynlink/dynlink.cmxa # The numeric opcodes -make_opcodes := tools/make_opcodes$(EXE) - bytecomp/opcodes.ml: runtime/caml/instruct.h $(make_opcodes) $(NEW_OCAMLRUN) $(make_opcodes) -opcodes < $< > $@ bytecomp/opcodes.mli: bytecomp/opcodes.ml $(CAMLC) -i $< > $@ -$(make_opcodes): tools/make_opcodes.mll - $(MAKE) -C tools make_opcodes - partialclean:: rm -f bytecomp/opcodes.ml rm -f bytecomp/opcodes.mli @@ -1410,7 +1546,7 @@ depend: beforedepend (for d in utils parsing typing bytecomp asmcomp middle_end \ lambda file_formats middle_end/closure middle_end/flambda \ middle_end/flambda/base_types \ - driver toplevel toplevel/byte toplevel/native lex; \ + driver toplevel toplevel/byte toplevel/native lex tools; \ do \ $(OCAMLDEP) $(OC_OCAMLDEPFLAGS) -I $$d $(INCLUDES) \ $(OCAMLDEPFLAGS) $$d/*.mli $$d/*.ml \ @@ -1427,7 +1563,7 @@ distclean: clean rm -f $(runtime_CONFIGURED_HEADERS) $(MAKE) -C stdlib distclean $(MAKE) -C testsuite distclean - $(MAKE) -C tools distclean + rm -f tools/eventlog_metadata tools/*.bak rm -f utils/config.generated.ml rm -f compilerlibs/META rm -f boot/ocamlrun boot/ocamlrun.exe boot/camlheader \ @@ -1448,6 +1584,7 @@ install: $(MKDIR) "$(INSTALL_COMPLIBDIR)" $(MKDIR) "$(INSTALL_DOCDIR)" $(MKDIR) "$(INSTALL_INCDIR)" + $(MKDIR) "$(INSTALL_LIBDIR_PROFILING)" $(INSTALL_PROG) $(runtime_PROGRAMS) "$(INSTALL_BINDIR)" $(INSTALL_DATA) $(runtime_BYTECODE_STATIC_LIBRARIES) \ "$(INSTALL_LIBDIR)" @@ -1465,8 +1602,32 @@ endif ifeq "$(INSTALL_BYTECODE_PROGRAMS)" "true" $(INSTALL_PROG) lex/ocamllex$(EXE) \ "$(INSTALL_BINDIR)/ocamllex.byte$(EXE)" + for i in $(TOOLS_TO_INSTALL); \ + do \ + $(INSTALL_PROG) "tools/$$i$(EXE)" "$(INSTALL_BINDIR)/$$i.byte$(EXE)";\ + if test -f "tools/$$i".opt$(EXE); then \ + $(INSTALL_PROG) "tools/$$i.opt$(EXE)" "$(INSTALL_BINDIR)" && \ + (cd "$(INSTALL_BINDIR)" && $(LN) "$$i.opt$(EXE)" "$$i$(EXE)"); \ + else \ + (cd "$(INSTALL_BINDIR)" && $(LN) "$$i.byte$(EXE)" "$$i$(EXE)"); \ + fi; \ + done +else + for i in $(TOOLS_TO_INSTALL); \ + do \ + if test -f "tools/$$i".opt$(EXE); then \ + $(INSTALL_PROG) "tools/$$i.opt$(EXE)" "$(INSTALL_BINDIR)"; \ + (cd "$(INSTALL_BINDIR)" && $(LN) "$$i.opt$(EXE)" "$$i$(EXE)"); \ + fi; \ + done endif $(INSTALL_PROG) $(ocamlyacc_PROGRAM)$(EXE) "$(INSTALL_BINDIR)" + if test -f tools/ocamlcmt.opt$(EXE); then \ + $(INSTALL_PROG)\ + tools/ocamlcmt.opt$(EXE) "$(INSTALL_BINDIR)/ocamlcmt$(EXE)"; \ + else \ + $(INSTALL_PROG) tools/ocamlcmt$(EXE) "$(INSTALL_BINDIR)"; \ + fi $(INSTALL_DATA) \ utils/*.cmi \ parsing/*.cmi \ @@ -1494,6 +1655,9 @@ ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true" $(INSTALL_DATA) \ toplevel/byte/*.cmt \ "$(INSTALL_COMPLIBDIR)" + $(INSTALL_DATA) \ + tools/profiling.cmt tools/profiling.cmti \ + "$(INSTALL_LIBDIR_PROFILING)" endif $(INSTALL_DATA) \ compilerlibs/*.cma compilerlibs/META \ @@ -1502,10 +1666,13 @@ endif $(ocamlc_MODULES:=.cmo) $(ocaml_MODULES:=.cmo) \ "$(INSTALL_COMPLIBDIR)" $(INSTALL_PROG) $(expunge) "$(INSTALL_LIBDIR)" -# If installing over a previous OCaml version, ensure the module is removed +# If installing over a previous OCaml version, ensure some modules are removed # from the previous installation. rm -f "$(INSTALL_LIBDIR)"/topdirs.cm* "$(INSTALL_LIBDIR)/topdirs.mli" - $(MAKE) -C tools install + rm -f "$(INSTALL_LIBDIR)"/profiling.cm* "$(INSTALL_LIBDIR)/profiling.$(O)" + $(INSTALL_DATA) \ + tools/profiling.cmi tools/profiling.cmo \ + "$(INSTALL_LIBDIR_PROFILING)" ifeq "$(UNIX_OR_WIN32)" "unix" # Install manual pages only on Unix $(MAKE) -C man install endif @@ -1618,7 +1785,9 @@ ifeq "$(INSTALL_BYTECODE_PROGRAMS)" "true" else if test -f ocamlopt.opt$(EXE); then $(MAKE) installoptopt; fi endif - $(MAKE) -C tools installopt + $(INSTALL_DATA) \ + tools/profiling.cmx tools/profiling.$(O) \ + "$(INSTALL_LIBDIR_PROFILING)" .PHONY: installoptopt installoptopt: diff --git a/Makefile.common b/Makefile.common index b97757d523..483a7a7a95 100644 --- a/Makefile.common +++ b/Makefile.common @@ -33,6 +33,7 @@ INSTALL_BINDIR := $(DESTDIR)$(BINDIR) INSTALL_LIBDIR := $(DESTDIR)$(LIBDIR) INSTALL_INCDIR=$(INSTALL_LIBDIR)/caml INSTALL_STUBLIBDIR := $(DESTDIR)$(STUBLIBDIR) +INSTALL_LIBDIR_PROFILING = $(INSTALL_LIBDIR)/profiling INSTALL_MANDIR := $(DESTDIR)$(MANDIR) INSTALL_PROGRAMS_MAN_DIR := $(DESTDIR)$(PROGRAMS_MAN_DIR) INSTALL_LIBRARIES_MAN_DIR := $(DESTDIR)$(LIBRARIES_MAN_DIR) diff --git a/tools/.depend b/tools/.depend deleted file mode 100644 index a6c2f3304b..0000000000 --- a/tools/.depend +++ /dev/null @@ -1,268 +0,0 @@ -cmpbyt.cmo : \ - ../bytecomp/bytesections.cmi \ - cmpbyt.cmi -cmpbyt.cmx : \ - ../bytecomp/bytesections.cmx \ - cmpbyt.cmi -cmpbyt.cmi : -cvt_emit.cmo : \ - cvt_emit.cmi -cvt_emit.cmx : \ - cvt_emit.cmi -cvt_emit.cmi : -dumpobj.cmo : \ - ../bytecomp/symtable.cmi \ - opnames.cmi \ - ../bytecomp/opcodes.cmi \ - ../parsing/location.cmi \ - ../lambda/lambda.cmi \ - ../bytecomp/instruct.cmi \ - ../typing/ident.cmi \ - ../utils/config.cmi \ - ../file_formats/cmo_format.cmi \ - ../bytecomp/bytesections.cmi \ - ../parsing/asttypes.cmi \ - dumpobj.cmi -dumpobj.cmx : \ - ../bytecomp/symtable.cmx \ - opnames.cmx \ - ../bytecomp/opcodes.cmx \ - ../parsing/location.cmx \ - ../lambda/lambda.cmx \ - ../bytecomp/instruct.cmx \ - ../typing/ident.cmx \ - ../utils/config.cmx \ - ../file_formats/cmo_format.cmi \ - ../bytecomp/bytesections.cmx \ - ../parsing/asttypes.cmi \ - dumpobj.cmi -dumpobj.cmi : -eqparsetree.cmo : \ - ../parsing/parsetree.cmi \ - ../parsing/longident.cmi \ - ../parsing/location.cmi \ - ../parsing/asttypes.cmi -eqparsetree.cmx : \ - ../parsing/parsetree.cmi \ - ../parsing/longident.cmx \ - ../parsing/location.cmx \ - ../parsing/asttypes.cmi -gen_sizeclasses.cmo : -gen_sizeclasses.cmx : -lintapidiff.cmo : \ - ../typing/printtyp.cmi \ - ../driver/pparse.cmi \ - ../typing/path.cmi \ - ../parsing/parsetree.cmi \ - ../parsing/parse.cmi \ - ../utils/misc.cmi \ - ../parsing/location.cmi \ - ../typing/ident.cmi \ - lintapidiff.cmi -lintapidiff.cmx : \ - ../typing/printtyp.cmx \ - ../driver/pparse.cmx \ - ../typing/path.cmx \ - ../parsing/parsetree.cmi \ - ../parsing/parse.cmx \ - ../utils/misc.cmx \ - ../parsing/location.cmx \ - ../typing/ident.cmx \ - lintapidiff.cmi -lintapidiff.cmi : -make_opcodes.cmo : \ - make_opcodes.cmi -make_opcodes.cmx : \ - make_opcodes.cmi -make_opcodes.cmi : -objinfo.cmo : \ - ../bytecomp/symtable.cmi \ - ../middle_end/symbol.cmi \ - ../typing/shape.cmi \ - ../middle_end/printclambda.cmi \ - ../utils/misc.cmi \ - ../middle_end/linkage_name.cmi \ - ../typing/ident.cmi \ - ../middle_end/flambda/export_info.cmi \ - ../middle_end/compilation_unit.cmi \ - ../file_formats/cmxs_format.cmi \ - ../file_formats/cmx_format.cmi \ - ../file_formats/cmt_format.cmi \ - ../file_formats/cmo_format.cmi \ - ../file_formats/cmi_format.cmi \ - ../bytecomp/bytesections.cmi \ - ../utils/binutils.cmi \ - objinfo.cmi -objinfo.cmx : \ - ../bytecomp/symtable.cmx \ - ../middle_end/symbol.cmx \ - ../typing/shape.cmx \ - ../middle_end/printclambda.cmx \ - ../utils/misc.cmx \ - ../middle_end/linkage_name.cmx \ - ../typing/ident.cmx \ - ../middle_end/flambda/export_info.cmx \ - ../middle_end/compilation_unit.cmx \ - ../file_formats/cmxs_format.cmi \ - ../file_formats/cmx_format.cmi \ - ../file_formats/cmt_format.cmx \ - ../file_formats/cmo_format.cmi \ - ../file_formats/cmi_format.cmx \ - ../bytecomp/bytesections.cmx \ - ../utils/binutils.cmx \ - objinfo.cmi -objinfo.cmi : -ocamlcmt.cmo : \ - ../typing/untypeast.cmi \ - ../typing/stypes.cmi \ - ../parsing/pprintast.cmi \ - ../parsing/location.cmi \ - ../utils/load_path.cmi \ - ../typing/envaux.cmi \ - ../driver/compmisc.cmi \ - ../file_formats/cmt_format.cmi \ - ../typing/cmt2annot.cmi \ - ../utils/clflags.cmi \ - ../typing/annot.cmi \ - ocamlcmt.cmi -ocamlcmt.cmx : \ - ../typing/untypeast.cmx \ - ../typing/stypes.cmx \ - ../parsing/pprintast.cmx \ - ../parsing/location.cmx \ - ../utils/load_path.cmx \ - ../typing/envaux.cmx \ - ../driver/compmisc.cmx \ - ../file_formats/cmt_format.cmx \ - ../typing/cmt2annot.cmx \ - ../utils/clflags.cmx \ - ../typing/annot.cmi \ - ocamlcmt.cmi -ocamlcmt.cmi : -ocamlcp.cmo : \ - ocamlcp_common.cmi \ - ../driver/main_args.cmi \ - ocamlcp.cmi -ocamlcp.cmx : \ - ocamlcp_common.cmx \ - ../driver/main_args.cmx \ - ocamlcp.cmi -ocamlcp.cmi : -ocamlcp_common.cmo : \ - ../driver/main_args.cmi \ - ../driver/compenv.cmi \ - ocamlcp_common.cmi -ocamlcp_common.cmx : \ - ../driver/main_args.cmx \ - ../driver/compenv.cmx \ - ocamlcp_common.cmi -ocamlcp_common.cmi : \ - ../driver/main_args.cmi -ocamldep.cmo : \ - ../driver/makedepend.cmi \ - ocamldep.cmi -ocamldep.cmx : \ - ../driver/makedepend.cmx \ - ocamldep.cmi -ocamldep.cmi : -ocamlmklib.cmo : \ - ../utils/misc.cmi \ - ../utils/config.cmi \ - ocamlmklib.cmi -ocamlmklib.cmx : \ - ../utils/misc.cmx \ - ../utils/config.cmx \ - ocamlmklib.cmi -ocamlmklib.cmi : -ocamlmktop.cmo : \ - ../utils/config.cmi \ - ../utils/ccomp.cmi \ - ocamlmktop.cmi -ocamlmktop.cmx : \ - ../utils/config.cmx \ - ../utils/ccomp.cmx \ - ocamlmktop.cmi -ocamlmktop.cmi : -ocamloptp.cmo : \ - ocamlcp_common.cmi \ - ../driver/main_args.cmi \ - ocamloptp.cmi -ocamloptp.cmx : \ - ocamlcp_common.cmx \ - ../driver/main_args.cmx \ - ocamloptp.cmi -ocamloptp.cmi : -ocamlprof.cmo : \ - ../utils/warnings.cmi \ - ../parsing/parsetree.cmi \ - ../parsing/parse.cmi \ - ../parsing/location.cmi \ - ocamlprof.cmi -ocamlprof.cmx : \ - ../utils/warnings.cmx \ - ../parsing/parsetree.cmi \ - ../parsing/parse.cmx \ - ../parsing/location.cmx \ - ocamlprof.cmi -ocamlprof.cmi : -ocamltex.cmo : \ - ../toplevel/toploop.cmi \ - ../parsing/syntaxerr.cmi \ - ../parsing/parsetree.cmi \ - ../parsing/parse.cmi \ - ../utils/misc.cmi \ - ../parsing/location.cmi \ - ../utils/load_path.cmi \ - ../parsing/lexer.cmi \ - ../driver/compmisc.cmi \ - ../driver/compenv.cmi \ - ../utils/clflags.cmi \ - ../parsing/ast_iterator.cmi \ - ../parsing/ast_helper.cmi \ - ocamltex.cmi -ocamltex.cmx : \ - ../toplevel/toploop.cmx \ - ../parsing/syntaxerr.cmx \ - ../parsing/parsetree.cmi \ - ../parsing/parse.cmx \ - ../utils/misc.cmx \ - ../parsing/location.cmx \ - ../utils/load_path.cmx \ - ../parsing/lexer.cmx \ - ../driver/compmisc.cmx \ - ../driver/compenv.cmx \ - ../utils/clflags.cmx \ - ../parsing/ast_iterator.cmx \ - ../parsing/ast_helper.cmx \ - ocamltex.cmi -ocamltex.cmi : -opnames.cmo : \ - opnames.cmi -opnames.cmx : \ - opnames.cmi -opnames.cmi : -primreq.cmo : \ - ../utils/misc.cmi \ - ../utils/config.cmi \ - ../file_formats/cmo_format.cmi \ - primreq.cmi -primreq.cmx : \ - ../utils/misc.cmx \ - ../utils/config.cmx \ - ../file_formats/cmo_format.cmi \ - primreq.cmi -primreq.cmi : -profiling.cmo : \ - profiling.cmi -profiling.cmx : \ - profiling.cmi -profiling.cmi : -stripdebug.cmo : \ - ../utils/misc.cmi \ - ../bytecomp/bytesections.cmi \ - stripdebug.cmi -stripdebug.cmx : \ - ../utils/misc.cmx \ - ../bytecomp/bytesections.cmx \ - stripdebug.cmi -stripdebug.cmi : diff --git a/tools/Makefile b/tools/Makefile deleted file mode 100644 index 7b1166b917..0000000000 --- a/tools/Makefile +++ /dev/null @@ -1,274 +0,0 @@ -#************************************************************************** -#* * -#* OCaml * -#* * -#* Xavier Leroy, projet Cristal, INRIA Rocquencourt * -#* * -#* Copyright 1999 Institut National de Recherche en Informatique et * -#* en Automatique. * -#* * -#* All rights reserved. This file is distributed under the terms of * -#* the GNU Lesser General Public License version 2.1, with the * -#* special exception on linking described in the file LICENSE. * -#* * -#************************************************************************** - -ROOTDIR = .. -# NOTE: it is important that OCAMLLEX is defined *before* Makefile.common -# gets included, so that its definition here takes precedence -# over the one there. -OCAMLLEX ?= $(BOOT_OCAMLLEX) -include $(ROOTDIR)/Makefile.common -include $(ROOTDIR)/Makefile.best_binaries - -TOOLS_BYTECODE_TARGETS = \ - ocamldep ocamlprof ocamlcp ocamloptp ocamlmklib \ - ocamlmktop ocamlcmt dumpobj ocamlobjinfo \ - primreq stripdebug cmpbyt -TOOLS_NATIVE_TARGETS = $(TOOLS_BYTECODE_TARGETS:=.opt) - -TOOLS_TO_INSTALL = \ - ocamldep ocamlprof ocamlcp ocamloptp ocamlmktop ocamlmklib ocamlobjinfo - -CAMLC = $(BOOT_OCAMLC) $(BOOT_STDLIBFLAGS) \ - -use-prims $(ROOTDIR)/runtime/primitives -I $(ROOTDIR) -CAMLOPT = $(OCAMLRUN) $(ROOTDIR)/ocamlopt$(EXE) $(STDLIBFLAGS) -VPATH = $(addprefix $(ROOTDIR)/,utils parsing typing bytecomp \ - middle_end middle_end/closure middle_end/flambda \ - middle_end/flambda/base_types driver toplevel \ - file_formats lambda) -INCLUDES = $(addprefix -I ,$(VPATH)) - -.PHONY: all allopt opt.opt othertools # allopt and opt.opt are synonyms -all: $(TOOLS_BYTECODE_TARGETS) -opt.opt: $(TOOLS_NATIVE_TARGETS) -allopt: opt.opt - -$(foreach TOOL, $(TOOLS_BYTECODE_TARGETS),\ - $(eval $(call OCAML_PROGRAM,$(TOOL)))) - -clean:: - rm -f $(TOOLS_BYTECODE_TARGETS) $(TOOLS_BYTECODE_TARGETS:=.exe) - rm -f $(TOOLS_NATIVE_TARGETS) $(TOOLS_NATIVE_TARGETS:=.exe) - -# The dependency generator - -ocamldep_LIBRARIES = $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp) -ocamldep_MODULES = ocamldep - -ocamldep$(EXE): OC_BYTECODE_LDFLAGS += -compat-32 - -# The profiler - -ocamlprof_LIBRARIES = -ocamlprof_MODULES = \ - config build_path_prefix_map misc identifiable numbers arg_helper \ - local_store load_path clflags terminfo warnings location longident \ - docstrings syntaxerr ast_helper camlinternalMenhirLib parser pprintast \ - lexer parse ocamlprof - -all: profiling.cmo -opt.opt: profiling.cmx - -ocamlcp_ocamloptp_MODULES = \ - config build_path_prefix_map misc profile warnings identifiable numbers \ - arg_helper local_store load_path clflags terminfo location ccomp compenv \ - main_args ocamlcp_common - -ocamlcp_LIBRARIES = -ocamlcp_MODULES = $(ocamlcp_ocamloptp_MODULES) ocamlcp - -ocamloptp_LIBRARIES = -ocamloptp_MODULES = $(ocamlcp_ocamloptp_MODULES) ocamloptp - -opt:: profiling.cmx - -INSTALL_LIBDIR_PROFILING = $(INSTALL_LIBDIR)/profiling - -install:: -# If installing over a previous OCaml version, ensure the module is removed -# from the previous installation. - rm -f "$(INSTALL_LIBDIR)"/profiling.cm* "$(INSTALL_LIBDIR)/profiling.$(O)" - $(MKDIR) "$(INSTALL_LIBDIR_PROFILING)" - $(INSTALL_DATA) \ - profiling.cmi profiling.cmo \ - "$(INSTALL_LIBDIR_PROFILING)" -ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true" - $(INSTALL_DATA) \ - profiling.cmt profiling.cmti \ - "$(INSTALL_LIBDIR_PROFILING)" -endif - -installopt:: - $(INSTALL_DATA) \ - profiling.cmx profiling.$(O) \ - "$(INSTALL_LIBDIR_PROFILING)" - -# To help building mixed-mode libraries (OCaml + C) -ocamlmklib_LIBRARIES = -ocamlmklib_MODULES = config build_path_prefix_map misc ocamlmklib - -# To make custom toplevels - -ocamlmktop_LIBRARIES = -ocamlmktop_MODULES = \ - config build_path_prefix_map misc identifiable numbers arg_helper \ - local_store load_path clflags profile ccomp ocamlmktop - -install:: -ifeq "$(INSTALL_BYTECODE_PROGRAMS)" "true" - for i in $(TOOLS_TO_INSTALL); \ - do \ - $(INSTALL_PROG) "$$i$(EXE)" "$(INSTALL_BINDIR)/$$i.byte$(EXE)"; \ - if test -f "$$i".opt$(EXE); then \ - $(INSTALL_PROG) "$$i.opt$(EXE)" "$(INSTALL_BINDIR)" && \ - (cd "$(INSTALL_BINDIR)" && $(LN) "$$i.opt$(EXE)" "$$i$(EXE)"); \ - else \ - (cd "$(INSTALL_BINDIR)" && $(LN) "$$i.byte$(EXE)" "$$i$(EXE)"); \ - fi; \ - done -else - for i in $(TOOLS_TO_INSTALL); \ - do \ - if test -f "$$i".opt$(EXE); then \ - $(INSTALL_PROG) "$$i.opt$(EXE)" "$(INSTALL_BINDIR)"; \ - (cd "$(INSTALL_BINDIR)" && $(LN) "$$i.opt$(EXE)" "$$i$(EXE)"); \ - fi; \ - done -endif - -# The preprocessor for asm generators - -cvt_emit = cvt_emit$(EXE) - -$(eval $(call OCAML_BYTECODE_PROGRAM,cvt_emit)) - -cvt_emit_LIBRARIES = -cvt_emit_MODULES = cvt_emit - -clean:: - rm -f cvt_emit.ml cvt_emit cvt_emit.exe - -beforedepend:: cvt_emit.ml - -# Reading cmt files - -ocamlcmt_LIBRARIES = $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp) -ocamlcmt_MODULES = ocamlcmt - -install:: - if test -f ocamlcmt.opt$(EXE); then \ - $(INSTALL_PROG)\ - ocamlcmt.opt$(EXE) "$(INSTALL_BINDIR)/ocamlcmt$(EXE)"; \ - else \ - $(INSTALL_PROG) ocamlcmt$(EXE) "$(INSTALL_BINDIR)"; \ - fi - -# The bytecode disassembler - -dumpobj_LIBRARIES = $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp) -dumpobj_MODULES = opnames dumpobj - -make_opcodes = make_opcodes$(EXE) - -make_opcodes_LIBRARIES = -make_opcodes_MODULES = make_opcodes - -$(eval $(call OCAML_BYTECODE_PROGRAM,make_opcodes)) - -opnames.ml: $(ROOTDIR)/runtime/caml/instruct.h $(make_opcodes) - $(NEW_OCAMLRUN) $(make_opcodes) -opnames < $< > $@ - -clean:: - rm -f opnames.ml make_opcodes make_opcodes.exe make_opcodes.ml - -beforedepend:: opnames.ml make_opcodes.ml - -# Display info on compiled files - -ocamlobjinfo_LIBRARIES = \ - $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp middleend) -ocamlobjinfo_MODULES = objinfo - -# Scan object files for required primitives - -primreq_LIBRARIES = $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp) -primreq_MODULES = primreq - -lintapidiff_LIBRARIES = \ - $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp middleend) \ - $(ROOTDIR)/otherlibs/str/str -lintapidiff_MODULES = lintapidiff - -lintapidiff.opt$(EXE): VPATH += $(ROOTDIR)/otherlibs/str - -$(eval $(call OCAML_NATIVE_PROGRAM,lintapidiff)) - -clean:: - rm -f -- lintapidiff.opt lintapidiff.opt.exe - rm -f lintapidiff.cm? lintapidiff.o lintapidiff.obj - -# Copy a bytecode executable, stripping debug info - -stripdebug_LIBRARIES = \ - $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp) -stripdebug_MODULES = stripdebug - -# Compare two bytecode executables - -cmpbyt_LIBRARIES = $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp) -cmpbyt_MODULES = cmpbyt - -# Scan latex files, and run ocaml code examples - -ocamltex = ocamltex$(EXE) - -ocamltex_LIBRARIES = \ - $(addprefix $(ROOTDIR)/compilerlibs/ocaml,common bytecomp toplevel) \ - $(addprefix $(ROOTDIR)/otherlibs/,str/str unix/unix) -ocamltex_MODULES = ocamltex - -# ocamltex uses str.cma and unix.cma and so must be compiled with -# $(ROOTDIR)/ocamlc not $(ROOTDIR)/boot/ocamlc since the boot -# compiler does not necessarily have the correct shared library -# configuration. -$(ocamltex): CAMLC = $(OCAMLRUN) $(ROOTDIR)/ocamlc$(EXE) $(STDLIBFLAGS) -$(ocamltex): OC_COMMON_LDFLAGS += -linkall -$(ocamltex): VPATH += $(addprefix $(ROOTDIR)/otherlibs/,str unix) - -$(eval $(call OCAML_BYTECODE_PROGRAM,ocamltex)) - -ocamltex.cmo: OC_COMMON_CFLAGS += -no-alias-deps - -# we need str and unix which depend on the bytecode version of other tools -# thus we use the othertools target -ifeq "$(build_ocamltex)" "true" -othertools: $(ocamltex) -endif -clean:: - rm -f -- ocamltex ocamltex.exe ocamltex.cm? - -# Common stuff - -%.cmo: %.ml - $(CAMLC) $(OC_COMMON_CFLAGS) $(INCLUDES) -c $< - -%.cmi: %.mli - $(CAMLC) $(OC_COMMON_CFLAGS) $(INCLUDES) -c $< - -%.cmx: %.ml - $(CAMLOPT) $(OC_COMMON_CFLAGS) $(INCLUDES) $(OC_NATIVE_CFLAGS) -c $< - -clean:: - rm -f *.cmo *.cmi *.cma *.dll *.so *.lib *.a - -OC_OCAMLDEPDIRS = $(VPATH) -depend: beforedepend - $(OCAMLDEP_CMD) *.mli *.ml > .depend - -.PHONY: clean distclean install beforedepend depend - -distclean: clean - rm -f eventlog_metadata *.bak - -include .depend |