clean up Makefile

master
Damien Doligez 2017-10-18 11:57:19 +02:00
parent 1e3bbf1bb9
commit cc9b78917c
1 changed files with 7 additions and 53 deletions

View File

@ -390,11 +390,7 @@ coreall:
# Build the core system: the minimum needed to make depend and bootstrap
.PHONY: core
core:
ifeq "$(UNIX_OR_WIN32)" "unix"
$(MAKE) coldstart
else # Windows, to be fixed!
$(MAKE) runtime
endif
$(MAKE) coreall
# Save the current bootstrap compiler
@ -453,19 +449,13 @@ opt-core: runtimeopt
.PHONY: opt
opt:
ifeq "$(UNIX_OR_WIN32)" "unix"
$(MAKE) runtimeopt
$(MAKE) ocamlopt
$(MAKE) libraryopt
$(MAKE) otherlibrariesopt ocamltoolsopt
else
$(MAKE) opt-core
$(MAKE) otherlibrariesopt ocamltoolsopt
endif
# Native-code versions of the tools
.PHONY: opt.opt
ifeq "$(UNIX_OR_WIN32)" "unix"
opt.opt:
$(MAKE) checkstack
$(MAKE) runtime
@ -478,23 +468,6 @@ opt.opt:
$(MAKE) otherlibrariesopt
$(MAKE) ocamllex.opt ocamltoolsopt ocamltoolsopt.opt $(OCAMLDOC_OPT) \
ocamltest.opt
else
opt.opt: core opt-core ocamlc.opt all ocamlopt.opt ocamllex.opt \
ocamltoolsopt ocamltoolsopt.opt otherlibrariesopt $(OCAMLDOC_OPT) \
ocamltest.opt
endif
.PHONY: base.opt
base.opt:
$(MAKE) checkstack
$(MAKE) runtime
$(MAKE) core
$(MAKE) ocaml
$(MAKE) opt-core
$(MAKE) ocamlc.opt
$(MAKE) otherlibraries $(WITH_DEBUGGER) $(WITH_OCAMLDOC) ocamltest
$(MAKE) ocamlopt.opt
$(MAKE) otherlibrariesopt
# Core bootstrapping cycle
.PHONY: coreboot
@ -671,12 +644,12 @@ installopt:
$(MAKE) -C stdlib installopt
cp middle_end/*.cmi middle_end/*.cmt middle_end/*.cmti \
middle_end/*.mli \
"$(INSTALL_COMPLIBDIR)"
"$(INSTALL_COMPLIBDIR)"
cp middle_end/base_types/*.cmi middle_end/base_types/*.cmt \
middle_end/base_types/*.cmti middle_end/base_types/*.mli \
"$(INSTALL_COMPLIBDIR)"
"$(INSTALL_COMPLIBDIR)"
cp asmcomp/*.cmi asmcomp/*.cmt asmcomp/*.cmti asmcomp/*.mli \
"$(INSTALL_COMPLIBDIR)"
"$(INSTALL_COMPLIBDIR)"
cp compilerlibs/ocamloptcomp.cma $(OPTSTART) "$(INSTALL_COMPLIBDIR)"
if test -n "$(WITH_OCAMLDOC)"; then \
$(MAKE) -C ocamldoc installopt; \
@ -810,21 +783,15 @@ partialclean::
.PHONY: runtop
runtop:
ifeq "$(UNIX_OR_WIN32)" "unix"
$(MAKE) runtime
$(MAKE) coreall
$(MAKE) ocaml
else
$(MAKE) core
$(MAKE) ocaml
endif
@rlwrap --help 2>/dev/null && $(EXTRAPATH) rlwrap $(RUNTOP) ||\
$(EXTRAPATH) $(RUNTOP)
.PHONY: natruntop
natruntop:
$(MAKE) runtime
$(MAKE) coreall
$(MAKE) core
$(MAKE) opt
$(MAKE) opt.opt
$(MAKE) ocamlnat
@rlwrap --help 2>/dev/null && $(EXTRAPATH) rlwrap $(NATRUNTOP) ||\
@ -1102,10 +1069,10 @@ ocamldebugger: ocamlc ocamlyacc ocamllex otherlibraries
partialclean::
$(MAKE) -C debugger clean
# Check that the stack limit is reasonable.
ifeq "$(UNIX_OR_WIN32)" "unix"
# Check that the stack limit is reasonable (Unix-only)
.PHONY: checkstack
checkstack:
ifeq "$(UNIX_OR_WIN32)" "unix"
if $(MKEXE) $(OUTPUTEXE)tools/checkstack$(EXE) tools/checkstack.c; \
then tools/checkstack$(EXE); \
else :; \
@ -1127,19 +1094,6 @@ lintapidiff:
clean::
cd testsuite; $(MAKE) clean
# Make MacOS X package
ifeq "$(UNIX_OR_WIN32)" "unix"
.PHONY: package-macosx
package-macosx:
sudo rm -rf package-macosx/root
$(MAKE) PREFIX="`pwd`"/package-macosx/root install
tools/make-package-macosx
sudo rm -rf package-macosx/root
clean::
rm -rf package-macosx/*.pkg package-macosx/*.dmg
endif
# The middle end (whose .cma library is currently only used for linking
# the "ocamlobjinfo" program, since we cannot depend on the whole native code
# compiler for "make world" and the list of dependencies for