ocaml/ocamldoc/Makefile

527 lines
15 KiB
Makefile
Raw Normal View History

#**************************************************************************
#* *
#* OCaml *
#* *
#* Maxence Guesdon, projet Cristal, INRIA Rocquencourt *
#* *
#* Copyright 2001 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. *
#* *
#**************************************************************************
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
ROOTDIR = ..
-include $(ROOTDIR)/Makefile.build_config
include $(ROOTDIR)/Makefile.common
include $(ROOTDIR)/Makefile.best_binaries
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
OCAMLRUN ?= $(ROOTDIR)/boot/ocamlrun
OCAMLYACC ?= $(ROOTDIR)/yacc/ocamlyacc
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
STDLIBFLAGS = -nostdlib -I $(ROOTDIR)/stdlib
OCAMLC = $(BEST_OCAMLC) $(STDLIBFLAGS)
OCAMLOPT = $(BEST_OCAMLOPT) $(STDLIBFLAGS)
OCAMLDEP = $(BEST_OCAMLDEP)
DEPFLAGS = -slash
OCAMLLEX = $(BEST_OCAMLLEX)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
# TODO: figure out whether the DEBUG lines the following preprocessor removes
# are actually useful.
# If they are not, then the preprocessor logic (including the
# remove_DEBUG script and the debug target) could be removed.
# If they are, it may be better to be able to enable them at run-time
# rather than compile-time, e.g. through a -debug command-line option.
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
# In the following line, "sh" is useful under Windows. Without it,
# the ./remove_DEBUG command would be executed by cmd.exe which would not
# know how to handle it.
OCAMLPP=-pp 'sh ./remove_DEBUG'
# For installation
##############
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
CP=cp
OCAMLDOC=ocamldoc
OCAMLDOC_OPT=$(OCAMLDOC).opt
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
# TODO: clarify whether the following really needs to be that complicated
ifeq "$(UNIX_OR_WIN32)" "unix"
ifeq "$(TARGET)" "$(HOST)"
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
OCAMLDOC_RUN_BYTE=$(OCAMLRUN) -I $(ROOTDIR)/otherlibs/$(UNIXLIB) -I $(ROOTDIR)/otherlibs/str ./$(OCAMLDOC)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
else
# if shared-libraries are not supported, unix.cma and str.cma
# are compiled with -custom, so ocamldoc also uses -custom,
# and (ocamlrun ocamldoc) does not work.
OCAMLDOC_RUN_BYTE=./$(OCAMLDOC)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
endif
else
OCAMLDOC_RUN_BYTE=$(OCAMLRUN) ./$(OCAMLDOC)
endif
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
else # Windows
OCAMLDOC_RUN_BYTE = \
CAML_LD_LIBRARY_PATH="$(ROOTDIR)/otherlibs/win32unix;$(ROOTDIR)/otherlibs/str" $(OCAMLRUN) ./$(OCAMLDOC)
endif
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
OCAMLDOC_RUN_OPT=./$(OCAMLDOC_OPT)
OCAMLDOC_RUN_PLUGINS=$(OCAMLDOC_RUN_BYTE)
ifeq "$(wildcard $(OCAMLDOC_OPT))" ""
OCAMLDOC_RUN=$(OCAMLDOC_RUN_BYTE)
else
OCAMLDOC_RUN=$(OCAMLDOC_RUN_OPT)
endif
OCAMLDOC_LIBCMA=odoc_info.cma
OCAMLDOC_LIBCMI=odoc_info.cmi
OCAMLDOC_LIBCMXA=odoc_info.cmxa
OCAMLDOC_LIBA=odoc_info.$(A)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
OCAMLDOC_LIBMLIS=odoc_info.mli
OCAMLDOC_LIBCMIS=$(OCAMLDOC_LIBMLIS:.mli=.cmi)
OCAMLDOC_LIBCMTS=$(OCAMLDOC_LIBMLIS:.mli=.cmt) $(OCAMLDOC_LIBMLIS:.mli=.cmti)
ODOC_TEST=odoc_test.cmo
GENERATORS_CMOS= \
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
generators/odoc_todo.cmo \
generators/odoc_literate.cmo
ifeq "$(NATDYNLINK)" "true"
GENERATORS_CMXS = $(GENERATORS_CMOS:.cmo=.cmxs)
else
GENERATORS_CMXS =
endif
# Compilation
#############
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
INCLUDES_DEP=\
-I $(ROOTDIR)/utils \
-I $(ROOTDIR)/parsing \
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
-I $(ROOTDIR)/typing \
-I $(ROOTDIR)/driver \
-I $(ROOTDIR)/bytecomp \
-I $(ROOTDIR)/toplevel
INCLUDES_NODEP=\
-I $(ROOTDIR)/stdlib \
-I $(ROOTDIR)/compilerlibs \
-I $(ROOTDIR)/otherlibs/str \
-I $(ROOTDIR)/otherlibs/dynlink \
-I $(ROOTDIR)/otherlibs/dynlink/native \
-I $(ROOTDIR)/otherlibs/$(UNIXLIB)
DEPINCLUDES=$(INCLUDES_DEP)
INCLUDES=$(INCLUDES_DEP) $(INCLUDES_NODEP)
COMPFLAGS=$(INCLUDES) -absname -w +a-4-9-41-42-44-45-48 -warn-error A \
-safe-string -strict-sequence -strict-formats -bin-annot -principal
LINKFLAGS=$(INCLUDES) -nostdlib
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
CMOFILES=\
odoc_config.cmo \
odoc_messages.cmo \
odoc_global.cmo \
odoc_types.cmo \
odoc_misc.cmo \
odoc_text_parser.cmo \
odoc_text_lexer.cmo \
odoc_text.cmo \
odoc_name.cmo \
odoc_parameter.cmo \
odoc_value.cmo \
odoc_type.cmo \
odoc_extension.cmo \
odoc_exception.cmo \
odoc_class.cmo \
odoc_module.cmo \
odoc_print.cmo \
odoc_str.cmo \
odoc_comments_global.cmo \
odoc_parser.cmo \
odoc_lexer.cmo \
odoc_see_lexer.cmo \
odoc_env.cmo \
odoc_merge.cmo \
odoc_sig.cmo \
odoc_ast.cmo \
odoc_control.cmo \
odoc_inherit.cmo \
odoc_search.cmo \
odoc_scan.cmo \
odoc_cross.cmo \
odoc_comments.cmo \
odoc_dep.cmo \
odoc_analyse.cmo \
odoc_info.cmo
CMXFILES = $(CMOFILES:.cmo=.cmx)
CMIFILES = $(CMOFILES:.cmo=.cmi)
EXECMOFILES=\
$(CMOFILES) \
odoc_dag2html.cmo \
odoc_to_text.cmo \
odoc_ocamlhtml.cmo \
odoc_html.cmo \
odoc_man.cmo \
odoc_latex_style.cmo \
odoc_latex.cmo \
odoc_texi.cmo \
odoc_dot.cmo \
odoc_gen.cmo \
odoc_args.cmo \
odoc.cmo
EXECMXFILES = $(EXECMOFILES:.cmo=.cmx)
EXECMIFILES = $(EXECMOFILES:.cmo=.cmi)
LIBCMOFILES = $(CMOFILES)
LIBCMXFILES = $(LIBCMOFILES:.cmo=.cmx)
LIBCMIFILES = $(LIBCMOFILES:.cmo=.cmi)
.PHONY: all
all: lib exe generators
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: exe
exe: $(OCAMLDOC)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: lib
lib: $(OCAMLDOC_LIBCMA) $(OCAMLDOC_LIBCMI) $(ODOC_TEST)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: generators
generators: $(GENERATORS_CMOS)
.PHONY: opt.opt allopt # allopt and opt.opt are synonyms
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
opt.opt: exeopt libopt generatorsopt
allopt: opt.opt
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: exeopt
exeopt: $(OCAMLDOC_OPT)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: libopt
libopt: $(OCAMLDOC_LIBCMXA) $(OCAMLDOC_LIBCMI)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: generatorsopt
generatorsopt: $(GENERATORS_CMXS)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
# TODO: the following debug target could be replaced by a DEBUG variable
.PHONY: debug
debug:
$(MAKE) OCAMLPP=""
OCAMLDOC_LIBRARIES = ocamlcommon unix str dynlink
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
OCAMLDOC_BCLIBRARIES = $(OCAMLDOC_LIBRARIES:%=%.cma)
OCAMLDOC_NCLIBRARIES = $(OCAMLDOC_LIBRARIES:%=%.cmxa)
$(OCAMLDOC): $(EXECMOFILES)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
$(OCAMLC) -o $@ -linkall $(LINKFLAGS) $(OCAMLDOC_BCLIBRARIES) $^
$(OCAMLDOC_OPT): $(EXECMXFILES)
2018-09-06 07:12:42 -07:00
$(OCAMLOPT_CMD) -o $@ -linkall $(LINKFLAGS) $(OCAMLDOC_NCLIBRARIES) $^
$(OCAMLDOC_LIBCMA): $(LIBCMOFILES)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
$(OCAMLC) -a -o $@ $(LINKFLAGS) $^
$(OCAMLDOC_LIBCMXA): $(LIBCMXFILES)
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
$(OCAMLOPT) -a -o $@ $(LINKFLAGS) $^
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: manpages
2018-08-23 14:16:32 -07:00
manpages: stdlib_man/Stdlib.3o
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: html_doc
2018-08-23 14:16:32 -07:00
html_doc: stdlib_html/Stdlib.html
2018-10-25 08:19:56 -07:00
.PHONY: pdf_doc
pdf_doc: stdlib_latex/stdlib.pdf
.PHONY: texi_doc
texi_doc: stdlib_texi/stdlib.texi
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: dot
dot: ocamldoc.dot
ocamldoc.dot: $(EXECMOFILES)
$(OCAMLDOC_RUN) -dot -dot-reduce -o $@ $(INCLUDES) odoc*.ml
# Parsers and lexers dependencies :
###################################
odoc_text_parser.ml: odoc_text_parser.mly
odoc_text_parser.mli: odoc_text_parser.mly
odoc_parser.ml: odoc_parser.mly
odoc_parser.mli:odoc_parser.mly
odoc_text_lexer.ml: odoc_text_lexer.mll
odoc_lexer.ml:odoc_lexer.mll
odoc_ocamlhtml.ml: odoc_ocamlhtml.mll
odoc_see_lexer.ml: odoc_see_lexer.mll
# generic rules :
#################
.SUFFIXES: .mll .mly .ml .mli .cmo .cmi .cmx .cmxs
.ml.cmo:
$(OCAMLC) $(OCAMLPP) $(COMPFLAGS) -c $<
.mli.cmi:
$(OCAMLC) $(OCAMLPP) $(COMPFLAGS) -c $<
.ml.cmx:
$(OCAMLOPT) $(OCAMLPP) $(COMPFLAGS) -c $<
.ml.cmxs:
2018-09-06 07:12:42 -07:00
$(OCAMLOPT_CMD) -shared -o $@ $(OCAMLPP) $(COMPFLAGS) $<
.mll.ml:
$(OCAMLLEX) $(OCAMLLEX_FLAGS) $<
.mly.ml:
2018-04-20 06:42:59 -07:00
$(OCAMLYACC) --strict -v $<
.mly.mli:
2018-04-20 06:42:59 -07:00
$(OCAMLYACC) --strict -v $<
# Installation targets
######################
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
# TODO: it may be good to split the following rule in several ones, e.g.
# install-programs, install-doc, install-libs
INSTALL_MANODIR=$(INSTALL_MANDIR)/man3
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: install
install:
$(MKDIR) "$(INSTALL_BINDIR)"
$(MKDIR) "$(INSTALL_LIBDIR)/ocamldoc"
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
$(MKDIR) "$(INSTALL_MANODIR)"
$(INSTALL_PROG) $(OCAMLDOC) "$(INSTALL_BINDIR)/$(OCAMLDOC)$(EXE)"
$(INSTALL_DATA) \
makefiles: use 'install' instead of 'cp' in 'make install' targets I can observe weird performance bottlenecks on my machine caused by the use of 'cp' in the 'install' scripts of OCaml. When installing into a directory that is already populated by an existing installation, 'make install' can routinely take 10s on my machine¹. After this change it reliably takes 1.5s, independently of whether the destination is already populated or not. ¹: a brtfs filesystem on an old-ish SSD Why I care ---------- An extra 10s delay due to 'make install' can be noticeable in tight change-build-install-test feedback loops for a compiler change where we change the compiler, have a fast 'make world.opt' due to incremental builds, install the change and test it -- possibly after installing a couple opam packages, which can be fairly quick. Partial diagnosis ----------------- The performance issue seems to be caused by the fact that 'cp' (at least the GNU coreutils version), when the file already exists, replaces it by opening it in writeonly+truncate mode and writing the file content ('strace' shows that the delay is caused within an 'openat' call). In particular, using the --remove-destination option (which changes 'cp' to just remove the destination file before copying) removes the performance issue, but this option seems missing from the BSD/OSX 'cp' so it could cause portability issue. Change ------ The present commit rewrites the 'install' targets of all Makefiles to use the 'install' command instead. 'install' by default gives executable-like permission to the destination file, instead of reusing the source file's permissions, so we specify manually the permission modes, depending on whether the installed file is an executable (or dynamically-linked library) or just data (including other compiled object files). Testing ------- I checked manually that the permissions of the installed files are identical to the ones of the current 'cp'-using targets, except for some '.mli' file in middle_end which currently have +x bits enabled for no good reason. Remark: To test this, playing with the DESTDIR variable is very useful (this lets you install to a new directory (or the same as before) without having to re-run the configure script). I used the following, fairly slow shell script to collect permissions: for f in $(find $DESTDIR); do \ echo $(basename $f) $(ls -l $f | cut -d' ' -f1); \ done | sort Remark: it is important to run `sync` in-between 'make install' runs to avoid timing effects due to filesystem or disk caching strategies. I believe that this corresponds to the natural time delay (and unrelated disk activity) that would occur in realistic change-install-test feedback loops.
2018-03-28 08:46:34 -07:00
ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) \
"$(INSTALL_LIBDIR)/ocamldoc"
$(INSTALL_DATA) \
$(OCAMLDOC_LIBCMIS) \
"$(INSTALL_LIBDIR)/ocamldoc"
ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true"
$(INSTALL_DATA) \
$(OCAMLDOC_LIBMLIS) $(OCAMLDOC_LIBCMTS) \
"$(INSTALL_LIBDIR)/ocamldoc"
endif
makefiles: use 'install' instead of 'cp' in 'make install' targets I can observe weird performance bottlenecks on my machine caused by the use of 'cp' in the 'install' scripts of OCaml. When installing into a directory that is already populated by an existing installation, 'make install' can routinely take 10s on my machine¹. After this change it reliably takes 1.5s, independently of whether the destination is already populated or not. ¹: a brtfs filesystem on an old-ish SSD Why I care ---------- An extra 10s delay due to 'make install' can be noticeable in tight change-build-install-test feedback loops for a compiler change where we change the compiler, have a fast 'make world.opt' due to incremental builds, install the change and test it -- possibly after installing a couple opam packages, which can be fairly quick. Partial diagnosis ----------------- The performance issue seems to be caused by the fact that 'cp' (at least the GNU coreutils version), when the file already exists, replaces it by opening it in writeonly+truncate mode and writing the file content ('strace' shows that the delay is caused within an 'openat' call). In particular, using the --remove-destination option (which changes 'cp' to just remove the destination file before copying) removes the performance issue, but this option seems missing from the BSD/OSX 'cp' so it could cause portability issue. Change ------ The present commit rewrites the 'install' targets of all Makefiles to use the 'install' command instead. 'install' by default gives executable-like permission to the destination file, instead of reusing the source file's permissions, so we specify manually the permission modes, depending on whether the installed file is an executable (or dynamically-linked library) or just data (including other compiled object files). Testing ------- I checked manually that the permissions of the installed files are identical to the ones of the current 'cp'-using targets, except for some '.mli' file in middle_end which currently have +x bits enabled for no good reason. Remark: To test this, playing with the DESTDIR variable is very useful (this lets you install to a new directory (or the same as before) without having to re-run the configure script). I used the following, fairly slow shell script to collect permissions: for f in $(find $DESTDIR); do \ echo $(basename $f) $(ls -l $f | cut -d' ' -f1); \ done | sort Remark: it is important to run `sync` in-between 'make install' runs to avoid timing effects due to filesystem or disk caching strategies. I believe that this corresponds to the natural time delay (and unrelated disk activity) that would occur in realistic change-install-test feedback loops.
2018-03-28 08:46:34 -07:00
if test -d stdlib_man; then \
$(INSTALL_DATA) stdlib_man/* "$(INSTALL_MANODIR)"; \
makefiles: use 'install' instead of 'cp' in 'make install' targets I can observe weird performance bottlenecks on my machine caused by the use of 'cp' in the 'install' scripts of OCaml. When installing into a directory that is already populated by an existing installation, 'make install' can routinely take 10s on my machine¹. After this change it reliably takes 1.5s, independently of whether the destination is already populated or not. ¹: a brtfs filesystem on an old-ish SSD Why I care ---------- An extra 10s delay due to 'make install' can be noticeable in tight change-build-install-test feedback loops for a compiler change where we change the compiler, have a fast 'make world.opt' due to incremental builds, install the change and test it -- possibly after installing a couple opam packages, which can be fairly quick. Partial diagnosis ----------------- The performance issue seems to be caused by the fact that 'cp' (at least the GNU coreutils version), when the file already exists, replaces it by opening it in writeonly+truncate mode and writing the file content ('strace' shows that the delay is caused within an 'openat' call). In particular, using the --remove-destination option (which changes 'cp' to just remove the destination file before copying) removes the performance issue, but this option seems missing from the BSD/OSX 'cp' so it could cause portability issue. Change ------ The present commit rewrites the 'install' targets of all Makefiles to use the 'install' command instead. 'install' by default gives executable-like permission to the destination file, instead of reusing the source file's permissions, so we specify manually the permission modes, depending on whether the installed file is an executable (or dynamically-linked library) or just data (including other compiled object files). Testing ------- I checked manually that the permissions of the installed files are identical to the ones of the current 'cp'-using targets, except for some '.mli' file in middle_end which currently have +x bits enabled for no good reason. Remark: To test this, playing with the DESTDIR variable is very useful (this lets you install to a new directory (or the same as before) without having to re-run the configure script). I used the following, fairly slow shell script to collect permissions: for f in $(find $DESTDIR); do \ echo $(basename $f) $(ls -l $f | cut -d' ' -f1); \ done | sort Remark: it is important to run `sync` in-between 'make install' runs to avoid timing effects due to filesystem or disk caching strategies. I believe that this corresponds to the natural time delay (and unrelated disk activity) that would occur in realistic change-install-test feedback loops.
2018-03-28 08:46:34 -07:00
else : ; fi
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
# Note: at the moment, $(INSTALL_MANODIR) is created even if the doc has
# not been built. This is not clean and should be changed.
.PHONY: installopt
installopt:
if test -f $(OCAMLDOC_OPT); then $(MAKE) installopt_really ; fi
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: installopt_really
installopt_really:
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
$(MKDIR) "$(INSTALL_BINDIR)"
$(MKDIR) "$(INSTALL_LIBDIR)/ocamldoc"
$(INSTALL_PROG) \
makefiles: use 'install' instead of 'cp' in 'make install' targets I can observe weird performance bottlenecks on my machine caused by the use of 'cp' in the 'install' scripts of OCaml. When installing into a directory that is already populated by an existing installation, 'make install' can routinely take 10s on my machine¹. After this change it reliably takes 1.5s, independently of whether the destination is already populated or not. ¹: a brtfs filesystem on an old-ish SSD Why I care ---------- An extra 10s delay due to 'make install' can be noticeable in tight change-build-install-test feedback loops for a compiler change where we change the compiler, have a fast 'make world.opt' due to incremental builds, install the change and test it -- possibly after installing a couple opam packages, which can be fairly quick. Partial diagnosis ----------------- The performance issue seems to be caused by the fact that 'cp' (at least the GNU coreutils version), when the file already exists, replaces it by opening it in writeonly+truncate mode and writing the file content ('strace' shows that the delay is caused within an 'openat' call). In particular, using the --remove-destination option (which changes 'cp' to just remove the destination file before copying) removes the performance issue, but this option seems missing from the BSD/OSX 'cp' so it could cause portability issue. Change ------ The present commit rewrites the 'install' targets of all Makefiles to use the 'install' command instead. 'install' by default gives executable-like permission to the destination file, instead of reusing the source file's permissions, so we specify manually the permission modes, depending on whether the installed file is an executable (or dynamically-linked library) or just data (including other compiled object files). Testing ------- I checked manually that the permissions of the installed files are identical to the ones of the current 'cp'-using targets, except for some '.mli' file in middle_end which currently have +x bits enabled for no good reason. Remark: To test this, playing with the DESTDIR variable is very useful (this lets you install to a new directory (or the same as before) without having to re-run the configure script). I used the following, fairly slow shell script to collect permissions: for f in $(find $DESTDIR); do \ echo $(basename $f) $(ls -l $f | cut -d' ' -f1); \ done | sort Remark: it is important to run `sync` in-between 'make install' runs to avoid timing effects due to filesystem or disk caching strategies. I believe that this corresponds to the natural time delay (and unrelated disk activity) that would occur in realistic change-install-test feedback loops.
2018-03-28 08:46:34 -07:00
$(OCAMLDOC_OPT) "$(INSTALL_BINDIR)/$(OCAMLDOC_OPT)$(EXE)"
$(INSTALL_DATA) \
$(OCAMLDOC_LIBCMIS) \
"$(INSTALL_LIBDIR)/ocamldoc"
ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true"
$(INSTALL_DATA) \
$(OCAMLDOC_LIBMLIS) $(OCAMLDOC_LIBCMTS) \
"$(INSTALL_LIBDIR)/ocamldoc"
endif
$(INSTALL_DATA) \
makefiles: use 'install' instead of 'cp' in 'make install' targets I can observe weird performance bottlenecks on my machine caused by the use of 'cp' in the 'install' scripts of OCaml. When installing into a directory that is already populated by an existing installation, 'make install' can routinely take 10s on my machine¹. After this change it reliably takes 1.5s, independently of whether the destination is already populated or not. ¹: a brtfs filesystem on an old-ish SSD Why I care ---------- An extra 10s delay due to 'make install' can be noticeable in tight change-build-install-test feedback loops for a compiler change where we change the compiler, have a fast 'make world.opt' due to incremental builds, install the change and test it -- possibly after installing a couple opam packages, which can be fairly quick. Partial diagnosis ----------------- The performance issue seems to be caused by the fact that 'cp' (at least the GNU coreutils version), when the file already exists, replaces it by opening it in writeonly+truncate mode and writing the file content ('strace' shows that the delay is caused within an 'openat' call). In particular, using the --remove-destination option (which changes 'cp' to just remove the destination file before copying) removes the performance issue, but this option seems missing from the BSD/OSX 'cp' so it could cause portability issue. Change ------ The present commit rewrites the 'install' targets of all Makefiles to use the 'install' command instead. 'install' by default gives executable-like permission to the destination file, instead of reusing the source file's permissions, so we specify manually the permission modes, depending on whether the installed file is an executable (or dynamically-linked library) or just data (including other compiled object files). Testing ------- I checked manually that the permissions of the installed files are identical to the ones of the current 'cp'-using targets, except for some '.mli' file in middle_end which currently have +x bits enabled for no good reason. Remark: To test this, playing with the DESTDIR variable is very useful (this lets you install to a new directory (or the same as before) without having to re-run the configure script). I used the following, fairly slow shell script to collect permissions: for f in $(find $DESTDIR); do \ echo $(basename $f) $(ls -l $f | cut -d' ' -f1); \ done | sort Remark: it is important to run `sync` in-between 'make install' runs to avoid timing effects due to filesystem or disk caching strategies. I believe that this corresponds to the natural time delay (and unrelated disk activity) that would occur in realistic change-install-test feedback loops.
2018-03-28 08:46:34 -07:00
ocamldoc.hva *.cmx $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) \
"$(INSTALL_LIBDIR)/ocamldoc"
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
# TODO: also split into several rules
# Testing :
###########
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: test
test:
$(MKDIR) $@
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/ocamldoc.odoc odoc*.ml odoc*.mli -v
$(MKDIR) $@-custom
$(OCAMLDOC_RUN_PLUGINS) -colorize-code -sort -d $@-custom $(INCLUDES) \
-g generators/odoc_literate.cmo -g generators/odoc_todo.cmo \
-load $@/ocamldoc.odoc -v
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: test_stdlib
test_stdlib:
$(MKDIR) $@
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/stdlib.odoc -keep-code \
$(ROOTDIR)/stdlib/*.mli \
$(ROOTDIR)/otherlibs/$(UNIXLIB)/unix.mli \
$(ROOTDIR)/otherlibs/str/str.mli
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: test_stdlib_code
test_stdlib_code:
$(MKDIR) $@
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/stdlib.odoc -keep-code \
`ls $(ROOTDIR)/stdlib/*.ml | grep -v Labels` \
$(ROOTDIR)/otherlibs/$(UNIXLIB)/unix.ml \
$(ROOTDIR)/otherlibs/str/str.ml
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: test_latex
test_latex:
$(MKDIR) $@
$(OCAMLDOC_RUN) -latex -sort -o $@/test.tex -d $@ $(INCLUDES) odoc*.ml \
odoc*.mli test2.txt $(ROOTDIR)/stdlib/*.mli $(ROOTDIR)/otherlibs/unix/unix.mli
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: test_latex_simple
test_latex_simple:
$(MKDIR) $@
$(OCAMLDOC_RUN) -latex -sort -o $@/test.tex -d $@ $(INCLUDES) \
-latextitle 6,subsection -latextitle 7,subsubection \
$(ROOTDIR)/stdlib/hashtbl.mli \
$(ROOTDIR)/stdlib/arg.mli \
$(ROOTDIR)/otherlibs/$(UNIXLIB)/unix.mli \
$(ROOTDIR)/stdlib/map.mli
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: test_man
test_man:
$(MKDIR) $@
$(OCAMLDOC_RUN) -man -sort -d $@ $(INCLUDES) odoc*.ml odoc*.mli
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: test_texi
test_texi:
$(MKDIR) $@
$(OCAMLDOC_RUN) -texi -sort -d $@ $(INCLUDES) odoc*.ml odoc*.mli
# stdlib non-prefixed :
#######################
SRC=$(ROOTDIR)
2018-08-23 14:16:32 -07:00
# Documented modules: stdlib + otherlib + utils(?) + parsing(for compiler-libs)
include Makefile.docfiles
stdlib_man/Stdlib.3o: $(OCAMLDOC) $(DOC_ALL)
$(MKDIR) stdlib_man
$(OCAMLDOC_RUN) -man -d stdlib_man -nostdlib \
-hide Stdlib -lib Stdlib $(DOC_ALL_INCLUDES) \
2018-09-04 00:16:47 -07:00
-pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk" \
-t "OCaml library" -man-mini \
$(DOC_ALL_TEXT:%=-text %) \
$(DOC_ALL_MLIS)
stdlib_html/Stdlib.html: $(OCAMLDOC) $(DOC_ALL)
$(MKDIR) stdlib_html
$(OCAMLDOC_RUN) -html -d stdlib_html -nostdlib \
-hide Stdlib -lib Stdlib $(DOC_ALL_INCLUDES) \
2018-09-04 00:16:47 -07:00
-pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk" \
-t "OCaml library" \
$(DOC_ALL_TEXT:%=-text %) \
$(DOC_ALL_MLIS)
stdlib_texi/stdlib.texi: $(OCAMLDOC) $(DOC_ALL)
2018-10-25 08:19:56 -07:00
$(MKDIR) stdlib_texi
$(OCAMLDOC_RUN) -texi -o stdlib_texi/stdlib.texi -nostdlib \
-hide Stdlib -lib Stdlib $(DOC_ALL_INCLUDES) \
-pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk" \
-t "OCaml library" \
$(DOC_ALL_TEXT:%=-text %) \
2018-10-25 08:19:56 -07:00
$(DOC_ALL_MLIS)
stdlib_latex/stdlib.tex: $(OCAMLDOC) $(DOC_ALL)
2018-10-25 08:19:56 -07:00
$(MKDIR) stdlib_latex
$(OCAMLDOC_RUN) -latex -o stdlib_latex/stdlib.tex -nostdlib \
-hide Stdlib -lib Stdlib $(DOC_ALL_INCLUDES) \
-pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk" \
-t "OCaml library" \
$(DOC_ALL_TEXT:%=-text %) \
2018-10-25 08:19:56 -07:00
$(DOC_ALL_MLIS)
stdlib_latex/stdlib.pdf: stdlib_latex/stdlib.tex
cd stdlib_latex && pdflatex stdlib && pdflatex stdlib
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: autotest_stdlib
autotest_stdlib:
$(MKDIR) $@
$(OCAMLDOC_RUN_PLUGINS) -g autotest/odoc_test.cmo\
$(INCLUDES) -keep-code \
$(ROOTDIR)/stdlib/*.mli \
$(ROOTDIR)/otherlibs/$(UNIXLIB)/unix.mli \
$(ROOTDIR)/otherlibs/str/str.mli
# odoc rules :
##############
.PHONY: odoc
odoc:
rm -rf odoc
$(MKDIR) odoc
# .cmti --> .odoc
for fn in $(ROOTDIR)/stdlib/stdlib*.cmti; do \
odoc compile $(INCLUDES) --package stdlib $(ROOTDIR)/stdlib/$$fn; \
done
for lib in str bigarray; do \
odoc compile $(INCLUDES) --package $$lib $(ROOTDIR)/otherlibs/$$lib/$$lib.cmti; \
done
odoc compile $(INCLUDES) --package unix $(ROOTDIR)/otherlibs/$(UNIXLIB)/unix.cmti
for fn in $(ROOTDIR)/parsing/*.cmti; do \
odoc compile $(INCLUDES) --package parsing $(ROOTDIR)/parsing/$$fn; \
done
# .odoc --> .html
odoc html $(INCLUDES) --output-dir odoc $(ROOTDIR)/stdlib/stdlib.odoc
for lib in str bigarray $(UNIXLIB); do \
odoc html $(INCLUDES) --output-dir odoc $(ROOTDIR)/otherlibs/$$lib/$$lib.odoc; \
done
for fn in $(ROOTDIR)/parsing/*.odoc; do \
odoc html $(INCLUDES) --output-dir odoc $$fn; \
done
for d in odoc/*; do \
lib=`basename $$d`; \
cd $$d; \
echo -e The $$lib 'library.\n\nModules\n:{!modules:' * '}' > ../../index.mld; \
cd ../..; \
odoc html $(INCLUDES) --output-dir odoc --index-for=$$lib index.mld; \
rm -f index.mld; \
done
cp odoc_index.html odoc/index.html
odoc css -o odoc
# backup, clean and depend :
############################
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: clean
clean:
rm -f \#*\#
rm -f $(OCAMLDOC) $(OCAMLDOC_OPT) *.cma *.cmxa *.cmo *.cmi *.cmx *.cmt *.cmti *.a *.lib *.o *.obj
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
rm -f odoc_parser.output odoc_text_parser.output
rm -f odoc_lexer.ml odoc_text_lexer.ml odoc_see_lexer.ml odoc_ocamlhtml.ml
rm -f odoc_parser.ml odoc_parser.mli odoc_text_parser.ml odoc_text_parser.mli
rm -rf stdlib_man stdlib_html stdlib_texi stdlib_latex
rm -f generators/*.cm[taiox] generators/*.a generators/*.lib generators/*.o generators/*.obj \
generators/*.cmx[as]
Merge Unix and Windows build systems in the ocamldoc directory (#808) This commit changes the behaviour of both the Unix and Windows build systems. The changes are either specific to one build system or common to both. Changes specific to the Unix build system: - Use the -slash option when invoking ocamldep. This does nothing on Unix and makes it possible to use the same command under Unix and Windows. - install target: - Directories are created unconditionnally, instead of creating them only if they do not already exist (also true for the installopt target) - cp no longer uses the -f flag, to be consistent with the other directories - The custom directory $(INSTALL_LIBDIR)/custom is no longer created because nothing was installed there anyway - In the opt.opt target, consecutive calls to make have been replaced by prerequisites, enhancing parallelisation opportunities. Changes specific to the Windows build system: - Whaen compiling .ml files, use the same line-number-preserving preprocessor as under Unix, rather than the grep -v DEBUG command. - ocamldoc generators and odoc_test are now compiled - ocamldoc can now be run from sources to generate the documentation of the standard library - The test targets are now also available under Windows - opt.opt now builds native-code versions of the generators Changes affecting both Unix and Windows build systems: - The targets that were depending on the empty "dummy" target are now declared as .PHONY targets, dummy has been removed. - In the all target, successive calls to make have been replaced by prerequisites. - Commands executed by make clean are now displayed instead of being executed silently.
2016-09-14 15:46:11 -07:00
.PHONY: depend
depend:
$(OCAMLYACC) odoc_text_parser.mly
$(OCAMLYACC) odoc_parser.mly
$(OCAMLLEX) $(OCAMLLEX_FLAGS) odoc_text_lexer.mll
$(OCAMLLEX) $(OCAMLLEX_FLAGS) odoc_lexer.mll
$(OCAMLLEX) $(OCAMLLEX_FLAGS) odoc_ocamlhtml.mll
$(OCAMLLEX) $(OCAMLLEX_FLAGS) odoc_see_lexer.mll
$(OCAMLDEP) $(DEPFLAGS) $(DEPINCLUDES) *.mll *.mly *.ml *.mli > .depend
$(OCAMLDEP) $(DEPFLAGS) $(DEPINCLUDES) -shared generators/*.ml >> .depend
include .depend