Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* text=auto

findwinsdk text eol=lf
msvs-detect text eol=lf
checkenv text eol=lf
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ ifeq ($(findstring clean,$(MAKECMDGOALS)),)
include Makefile.winsdk
endif

Makefile.winsdk: findwinsdk
bash ./findwinsdk x86 > $@
bash ./findwinsdk x64 64 >> $@
Makefile.winsdk: msvs-detect
bash ./msvs-detect --output=make > $@

# NB MSVC_DETECT is expected by OCaml's build system
MSVC_DETECT=1
MSVC_FLAGS=/nologo /MD -D_CRT_SECURE_NO_DEPRECATE /GS-

Expand All @@ -59,7 +59,7 @@ MSVC64_PREFIX=
MSVCC=cl.exe $(MSVC_FLAGS)
MSVCC64=cl.exe $(MSVC_FLAGS)
else
ifeq ($(SDK),)
ifeq ($(MSVS_PATH),)
# Otherwise, assume the 32-bit version of VS 2008 or Win7 SDK is in the path.

MSVCC_ROOT := $(shell which cl.exe 2>/dev/null | cygpath -f - -ad | xargs -d \\n dirname 2>/dev/null | cygpath -f - -m)
Expand All @@ -76,8 +76,8 @@ MSVCC = $(MSVCC_ROOT)/cl.exe $(MSVC_FLAGS)
MSVCC64 = $(MSVCC_ROOT)/amd64/cl.exe $(MSVC_FLAGS)
else
MSVCC_ROOT:=
MSVC_PREFIX=PATH="$(SDK):$(PATH)" LIB="$(SDK_LIB);$(LIB)" INCLUDE="$(SDK_INC);$(INCLUDE)"
MSVC64_PREFIX=PATH="$(SDK64):$(PATH)" LIB="$(SDK64_LIB);$(LIB)" INCLUDE="$(SDK64_INC);$(INCLUDE)"
MSVC_PREFIX=PATH="$(MSVS_PATH)$(PATH)" LIB="$(MSVS_LIB)$(LIB)" INCLUDE="$(MSVS_INC)$(INCLUDE)"
MSVC64_PREFIX=PATH="$(MSVS64_PATH)$(PATH)" LIB="$(MSVS64_LIB)$(LIB)" INCLUDE="$(MSVS64_INC)$(INCLUDE)"

MSVCC = cl.exe $(MSVC_FLAGS)
MSVCC64 = cl.exe $(MSVC_FLAGS)
Expand All @@ -86,8 +86,8 @@ endif

show_root:
ifeq ($(MSVCC_ROOT),)
@echo "$(SDK)"
@echo "$(SDK_LIB)"
@echo "$(MSVS_PATH)"
@echo "$(MSVS_LIB)"
else
@echo "$(MSVCC_ROOT)"
@echo "$(MSVC_LIB)"
Expand Down Expand Up @@ -234,7 +234,7 @@ package_src:
rm -Rf flexdll-$(VERSION)
mkdir flexdll-$(VERSION)
mkdir flexdll-$(VERSION)/test
cp -a $(filter-out Compat.ml version.ml,$(OBJS) $(shell git ls-files Compat*.ml)) Makefile findwinsdk $(COMMON_FILES) version.rc flexdll-$(VERSION)/
cp -a $(filter-out Compat.ml version.ml,$(OBJS) $(shell git ls-files Compat*.ml)) Makefile msvs-detect $(COMMON_FILES) version.rc flexdll-$(VERSION)/
cp -aR test/Makefile test/*.c flexdll-$(VERSION)/test/
tar czf $(PACKAGE) flexdll-$(VERSION)
rm -Rf flexdll-$(VERSION)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ environment:
CYG_CACHE: C:/cygwin/var/cache/setup
matrix:
- OCAMLBRANCH: 4.03
SKIP_OCAML_TEST: no
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every PR should ensure that the oldest bootstrap works

- OCAMLBRANCH: 4.04
- OCAMLBRANCH: 4.05
- OCAMLBRANCH: 4.06
SKIP_OCAML_TEST: no
- OCAMLBRANCH: 4.07
SKIP_OCAML_TEST: no
- OCAMLBRANCH: trunk
Expand Down
42 changes: 32 additions & 10 deletions appveyor_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,33 @@ function run {
}

function configure_ocaml {
cp config/m-nt.h $HEADER_DIR/m.h
cp config/s-nt.h $HEADER_DIR/s.h

sed -e "s|PREFIX=.*|PREFIX=$OCAMLROOT|" \
-e "s|OTHERLIBRARIES=.*|OTHERLIBRARIES=|" \
-e "s|WITH_DEBUGGER=.*|WITH_DEBUGGER=|" \
-e "s|WITH_OCAMLDOC=.*|WITH_OCAMLDOC=|" \
config/Makefile.msvc64 > $CONFIG_DIR/Makefile
#run "Content of config/Makefile" cat $CONFIG_DIR/Makefile
if [[ -z $HEADER_DIR ]] ; then
# Unfortunately, configure fails to set-up bootstrapping if flexlink is
# in PATH
sed -i -e 's/@iflexdir@/-I"$(ROOTDIR)\/flexdll"/' Makefile.config.in

./configure --build=i686-pc-cygwin --host=x86_64-pc-windows \
--prefix=$OCAMLROOT \
--disable-debugger \
--disable-ocamldoc \
--disable-systhreads \
--disable-str-lib \
--disable-unix-lib \
--disable-bigarray-lib \
$(GRAPHICS_DISABLE) \
--disable-debug-runtime
else
# "Classic" configuration
cp config/m-nt.h $HEADER_DIR/m.h
cp config/s-nt.h $HEADER_DIR/s.h

sed -e "s|PREFIX=.*|PREFIX=$OCAMLROOT|" \
-e "s|OTHERLIBRARIES=.*|OTHERLIBRARIES=|" \
-e "s|WITH_DEBUGGER=.*|WITH_DEBUGGER=|" \
-e "s|WITH_OCAMLDOC=.*|WITH_OCAMLDOC=|" \
config/Makefile.msvc64 > $CONFIG_DIR/Makefile
#run "Content of config/Makefile" cat $CONFIG_DIR/Makefile
fi
}

echo ** OCAMLROOT=$OCAMLROOT
Expand All @@ -49,7 +67,8 @@ cd ocaml

MAKEOCAML=make
CONFIG_DIR=config
HEADER_DIR=runtime/caml
GRAPHICS_DISABLE=
HEADER_DIR=

case $OCAMLBRANCH in
4.03|4.04)
Expand All @@ -61,6 +80,9 @@ case $OCAMLBRANCH in
;;
4.06|4.07)
HEADER_DIR=byterun/caml
;;
4.08)
GRAPHICS_DISABLE=--disable-graph-lib
esac

if [ $OCAMLBRANCH = "4.03" ] ; then
Expand Down
37 changes: 0 additions & 37 deletions findwinsdk

This file was deleted.

Loading