diff options
author | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2020-06-17 09:29:56 +0200 |
---|---|---|
committer | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2020-06-18 11:16:55 +0200 |
commit | bdd9ca391e3a56253d7480b07bb1a8aac361904c (patch) | |
tree | 438b71b4bc6a4e11fa9a4056cbbca722bce5fed3 /ocamldoc/Makefile | |
parent | 41e4dc1dc8e156dd10a63124ce061ac1588d0aef (diff) | |
download | ocaml-bdd9ca391e3a56253d7480b07bb1a8aac361904c.tar.gz |
Add the $(EXE) suffix to all programs at build rather than install time
This commit touches neither boot/ocamlc nor boot/ocamllex
It has the side-effect of fixing the cleanup rules which did not use the
$(EXE) extension when removing a file although it was produced with the
$(EXE) extension.
Diffstat (limited to 'ocamldoc/Makefile')
-rw-r--r-- | ocamldoc/Makefile | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile index 06aaa22304..2f2704c561 100644 --- a/ocamldoc/Makefile +++ b/ocamldoc/Makefile @@ -18,8 +18,8 @@ ROOTDIR = .. include $(ROOTDIR)/Makefile.common include $(ROOTDIR)/Makefile.best_binaries -OCAMLRUN ?= $(ROOTDIR)/boot/ocamlrun -OCAMLYACC ?= $(ROOTDIR)/yacc/ocamlyacc +OCAMLRUN ?= $(ROOTDIR)/boot/ocamlrun$(EXE) +OCAMLYACC ?= $(ROOTDIR)/yacc/ocamlyacc$(EXE) STDLIBFLAGS = -nostdlib -I $(ROOTDIR)/stdlib OCAMLC = $(BEST_OCAMLC) $(STDLIBFLAGS) @@ -32,8 +32,10 @@ OCAMLLEX = $(BEST_OCAMLLEX) ############## CP=cp -OCAMLDOC=ocamldoc -OCAMLDOC_OPT=$(OCAMLDOC).opt +OCAMLDOC=ocamldoc$(EXE) +OCAMLDOC_OPT=ocamldoc.opt$(EXE) + +programs := ocamldoc ocamldoc.opt # TODO: clarify whether the following really needs to be that complicated ifeq "$(UNIX_OR_WIN32)" "unix" @@ -202,9 +204,13 @@ OCAMLDOC_LIBRARIES = ocamlcommon unix str dynlink OCAMLDOC_BCLIBRARIES = $(OCAMLDOC_LIBRARIES:%=%.cma) OCAMLDOC_NCLIBRARIES = $(OCAMLDOC_LIBRARIES:%=%.cmxa) +$(eval $(call PROGRAM_SYNONYM,ocamldoc)) + $(OCAMLDOC): $(EXECMOFILES) $(OCAMLC) -o $@ -linkall $(LINKFLAGS) $(OCAMLDOC_BCLIBRARIES) $^ +$(eval $(call PROGRAM_SYNONYM,ocamldoc.opt)) + $(OCAMLDOC_OPT): $(EXECMXFILES) $(OCAMLOPT_CMD) -o $@ -linkall $(LINKFLAGS) $(OCAMLDOC_NCLIBRARIES) $^ @@ -288,7 +294,7 @@ install: $(MKDIR) "$(INSTALL_BINDIR)" $(MKDIR) "$(INSTALL_LIBDIR)/ocamldoc" $(MKDIR) "$(INSTALL_MANODIR)" - $(INSTALL_PROG) $(OCAMLDOC) "$(INSTALL_BINDIR)/$(OCAMLDOC)$(EXE)" + $(INSTALL_PROG) $(OCAMLDOC) "$(INSTALL_BINDIR)/$(OCAMLDOC)" $(INSTALL_DATA) \ ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) \ "$(INSTALL_LIBDIR)/ocamldoc" @@ -316,7 +322,7 @@ installopt_really: $(MKDIR) "$(INSTALL_BINDIR)" $(MKDIR) "$(INSTALL_LIBDIR)/ocamldoc" $(INSTALL_PROG) \ - $(OCAMLDOC_OPT) "$(INSTALL_BINDIR)/$(OCAMLDOC_OPT)$(EXE)" + $(OCAMLDOC_OPT) "$(INSTALL_BINDIR)/$(OCAMLDOC_OPT)" $(INSTALL_DATA) \ $(OCAMLDOC_LIBCMIS) \ "$(INSTALL_LIBDIR)/ocamldoc" @@ -487,7 +493,8 @@ odoc: .PHONY: clean clean: rm -f \#*\# - rm -f $(OCAMLDOC) $(OCAMLDOC_OPT) *.cma *.cmxa *.cmo *.cmi *.cmx *.cmt *.cmti *.a *.lib *.o *.obj + rm -f $(programs) $(programs:=.exe) + rm -f *.cma *.cmxa *.cmo *.cmi *.cmx *.cmt *.cmti *.a *.lib *.o *.obj 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 |