Clearly report that dependencies cannot be regenerated for the MSVC ports

master
Sébastien Hinderer 2017-03-06 14:30:40 +01:00 committed by Damien Doligez
parent ccf22c8471
commit a85b39654a
10 changed files with 50 additions and 39 deletions

View File

@ -946,9 +946,19 @@ clean::
$(MAKE) -C byterun clean
rm -f stdlib/libcamlrun.$(A)
subdirs := asmrun byterun debugger lex ocamldoc stdlib tools \
$(addprefix otherlibs/, $(OTHERLIBRARIES))
.PHONY: alldepend
alldepend::
$(MAKE) -C byterun depend
ifeq "$(TOOLCHAIN)" "msvc"
alldepend:
$(error Dependencies cannot be regenerated using the MSVC ports)
else
alldepend: depend
for dir in $(subdirs); do \
$(MAKE) -C $$dir depend; \
done
endif
# The runtime system for the native-code compiler
@ -964,8 +974,6 @@ stdlib/libasmrun.$(A): asmrun/libasmrun.$(A)
clean::
$(MAKE) -C asmrun clean
rm -f stdlib/libasmrun.$(A)
alldepend::
$(MAKE) -C asmrun depend
# The standard library
@ -984,9 +992,6 @@ libraryopt:
partialclean::
$(MAKE) -C stdlib clean
alldepend::
$(MAKE) -C stdlib depend
# The lexer and parser generators
.PHONY: ocamllex
@ -1000,9 +1005,6 @@ ocamllex.opt: ocamlopt
partialclean::
$(MAKE) -C lex clean
alldepend::
$(MAKE) -C lex depend
.PHONY: ocamlyacc
ocamlyacc:
$(MAKE) -C yacc $(BOOT_FLEXLINK_CMD) all
@ -1030,9 +1032,6 @@ html_doc: ocamldoc
partialclean::
$(MAKE) -C ocamldoc clean
alldepend::
$(MAKE) -C ocamldoc depend
# The extra libraries
.PHONY: otherlibraries
@ -1057,11 +1056,6 @@ clean::
($(MAKE) -C otherlibs/$$i clean); \
done
alldepend::
for i in $(OTHERLIBRARIES); do \
($(MAKE) -C otherlibs/$$i depend); \
done
# The replay debugger
.PHONY: ocamldebugger
@ -1071,9 +1065,6 @@ ocamldebugger: ocamlc ocamlyacc ocamllex otherlibraries
partialclean::
$(MAKE) -C debugger clean
alldepend::
$(MAKE) -C debugger depend
# Check that the stack limit is reasonable.
ifeq "$(UNIX_OR_WIN32)" "unix"
.PHONY: checkstack
@ -1147,9 +1138,6 @@ ocamltoolsopt.opt: ocamlc.opt ocamlyacc ocamllex.opt asmcomp/cmx_format.cmi \
partialclean::
$(MAKE) -C tools clean
alldepend::
$(MAKE) -C tools depend
## Test compilation of backend-specific parts
partialclean::
@ -1279,8 +1267,6 @@ depend: beforedepend
$(CAMLDEP) -slash $(DEPFLAGS) -bytecode \
-impl driver/compdynlink.mlbyte >> .depend
alldepend:: depend
.PHONY: distclean
distclean: clean
rm -f boot/ocamlrun boot/ocamlrun$(EXE) boot/camlheader \

View File

@ -177,8 +177,11 @@ clean:
distclean: clean
rm -r *~
ifneq "$(TOOLCHAIN)" "msvc"
.PHONY: depend
ifeq "$(TOOLCHAIN)" "msvc"
depend:
$(error Dependencies cannot be regenerated using the MSVC ports)
else
depend: $(COBJS:.$(O)=.c) $(LINKEDFILES)
$(CC) -MM $(FLAGS) *.c | sed -e 's/\.o/.$$(O)/' > .depend
$(CC) -MM $(FLAGS) -DPROFILING *.c | sed -e 's/\.o/.p.$$(O)/' \

View File

@ -214,9 +214,12 @@ libcamlrun_shared.$(SO): $(PICOBJS)
%.pic.$(O): %.c
$(CC) $(PICFLAGS) -c $(OUTPUTOBJ)$@ $<
ifneq "$(TOOLCHAIN)" "msvc"
.PHONY: depend
depend : prims.c caml/opnames.h caml/jumptbl.h caml/version.h
ifeq "$(TOOLCHAIN)" "msvc"
depend:
$(error Dependencies cannot be regenerated using the MSVC ports)
else
depend: prims.c caml/opnames.h caml/jumptbl.h caml/version.h
$(CC) -MM $(CFLAGS) *.c | sed -e 's/\.o/.$$(O)/' > .depend
$(CC) -MM $(DFLAGS) *.c | sed -e 's/\.o/.d.$$(O)/' >> .depend
$(CC) -MM $(IFLAGS) *.c | sed -e 's/\.o/.i.$$(O)/' >> .depend

View File

@ -22,8 +22,11 @@ HEADERS=bigarray.h
include ../Makefile
ifneq "$(TOOLCHAIN)" "msvc"
.PHONY: depend
depend:
ifeq "$(TOOLCHAIN)" "msvc"
$(error Dependencies cannot be regenerated using the MSVC ports)
else
$(CC) -MM $(CFLAGS) *.c | sed -e 's/\.o/.$$(O)/g' > .depend
$(CAMLRUN) $(ROOTDIR)/tools/ocamldep -slash *.mli *.ml >> .depend
endif

View File

@ -30,12 +30,11 @@ clean::
bng.$(O): bng.h bng_digit.c \
bng_amd64.c bng_ia32.c bng_ppc.c bng_sparc.c
# At the moment, the following rule only works with gcc
# It is not a big deal since the .depend file it produces is stored
# in the repository
ifneq "$(TOOLCHAIN)" "msvc"
.PHONY: depend
depend:
ifeq "$(TOOLCHAIN)" "msvc"
$(error Dependencies cannot be regenerated using the MSVC ports)
else
$(CC) -MM $(CFLAGS) *.c | sed -e 's/\.o/.$$(O)/g' > .depend
$(CAMLRUN) $(ROOTDIR)/tools/ocamldep -slash *.mli *.ml >> .depend
endif

View File

@ -24,9 +24,11 @@ include ../Makefile
str.cmo: str.cmi
str.cmx: str.cmi
ifneq "$(TOOLCHAIN)" "msvc"
.PHONY: depend
depend:
ifeq "$(TOOLCHAIN)" "msvc"
$(error Dependencies cannot be regenerated using the MSVC ports)
else
$(CC) -MM $(CFLAGS) *.c | sed -e 's/\.o/.$$(O)/g' > .depend
$(CAMLRUN) $(ROOTDIR)/tools/ocamldep -slash *.mli *.ml >> .depend
endif

View File

@ -148,12 +148,14 @@ installopt:
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $<
ifeq "$(UNIX_OR_WIN32)" "unix"
.PHONY: depend
ifeq "$(TOOLCHAIN)" "msvc"
depend:
$(error Dependencies cannot be regenerated using the MSVC ports)
else
depend: $(GENFILES)
-$(CC) -MM -I../../byterun *.c > .depend
$(CAMLRUN) ../../tools/ocamldep -slash *.mli *.ml >> .depend
else # Windows
depend:
endif
include .depend

View File

@ -129,8 +129,13 @@ installopt:
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
.PHONY: depend
depend:
ifeq "$(TOOLCHAIN)" "msvc"
$(error Dependencies cannot be regenerated using the MSVC ports)
else
$(CC) -MM $(CFLAGS) *.c > .depend
$(CAMLRUN) ../../tools/ocamldep -slash *.mli *.ml >> .depend
endif
include .depend

View File

@ -45,8 +45,13 @@ HEADERS=unixsupport.h socketaddr.h
include ../Makefile
.PHONY: depend
depend:
ifeq "$(TOOLCHAIN)" "msvc"
$(error Dependencies cannot be regenerated using the MSVC ports)
else
$(CC) -MM $(CFLAGS) *.c > .depend
$(CAMLRUN) ../../tools/ocamldep -slash *.mli *.ml >> .depend
endif
include .depend

View File

@ -60,8 +60,11 @@ clean::
$(UNIX_FILES) $(UNIX_CAML_FILES): %: ../unix/%
cp ../unix/$* $*
ifneq "$(TOOLCHAIN)" "msvc"
.PHONY: depend
ifeq "$(TOOLCHAIN)" "msvc"
depend:
$(error Dependencies cannot be regenerated using the MSVC ports)
else
depend: $(ALL_FILES) $(UNIX_CAML_FILES) unix.ml
$(CC) -MM $(CFLAGS) $(ALL_FILES) | sed -e 's/\.o/.$$(O)/g' > .depend
$(CAMLRUN) $(ROOTDIR)/tools/ocamldep -slash $(UNIX_CAML_FILES) \