Skip to content

Commit

Permalink
Change bootstrap on Windows to match Unix
Browse files Browse the repository at this point in the history
OCaml lib is always bootstrap/ocaml/lib/ocaml
  • Loading branch information
dra27 committed Feb 8, 2018
1 parent 2db554d commit 5861ee3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions appveyor_build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ if "%OCAML_PORT%" neq "" git apply appveyor.patch
set INSTALLED_URL=
for /f "tokens=3" %%U in ('findstr /C:"URL_ocaml = " src_ext\Makefile') do set OCAML_URL=%%U
for /f "tokens=3" %%U in ('findstr /C:"URL_flexdll = " src_ext\Makefile') do set FLEXDLL_URL=%%U
if exist bootstrap\ocaml\lib\stdlib.cmxa (
echo Deleting out-of-date bootstrap compiler
rd /s/q bootstrap
)
if exist bootstrap\installed-tarball for /f "delims=" %%U in ('type bootstrap\installed-tarball') do set INSTALLED_URL=%%U

if "%INSTALLED_URL%" neq "%OCAML_URL% %FLEXDLL_URL% %DEP_MODE%" if exist bootstrap\nul (
Expand Down
4 changes: 2 additions & 2 deletions shell/bootstrap-ocaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if [ -n "$1" -a -n "${COMSPEC}" -a -x "${COMSPEC}" ] ; then
PREFIX=`cd .. ; pwd`/ocaml
WINPREFIX=`echo ${PREFIX} | cygpath -f - -m`
if [ ${GEN_CONFIG_ONLY} -eq 0 ] ; then
sed -e "s|^PREFIX=.*|PREFIX=${WINPREFIX}|" config/Makefile.${BUILD} > config/Makefile
sed -e "s|^PREFIX=.*|PREFIX=${WINPREFIX}|" -e "s|/lib|/lib/ocaml|" config/Makefile.${BUILD} > config/Makefile
cp config/s-nt.h byterun/caml/s.h
cp config/m-nt.h byterun/caml/m.h
fi
Expand All @@ -116,7 +116,7 @@ if [ -n "$1" -a -n "${COMSPEC}" -a -x "${COMSPEC}" ] ; then
mv flexdll-* flexdll
PATH="${PATH_PREPEND}${PREFIX}/bin:${PATH}" Lib="${LIB_PREPEND}${Lib}" Include="${INC_PREPEND}${Include}" make flexdll world.opt install
fi
OCAMLLIB=${WINPREFIX}/lib
OCAMLLIB=${WINPREFIX}/lib/ocaml
else
PREFIX=`cd .. ; pwd`/ocaml
if [ ${GEN_CONFIG_ONLY} -eq 0 ] ; then
Expand Down
2 changes: 1 addition & 1 deletion src_ext/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ lib-pkg-urls:

reset-lib-pkg:
@rm -f ../bootstrap/ocaml/bin/ocamlbuild* ../bootstrap/ocaml/bin/ocamlfind* `ls ../bootstrap/ocaml/bin/* | grep -v "flexlink\|\/ocaml[^\/]*$$"` ../bootstrap/ocaml/lib/topfind
@rm -rf ../bootstrap/ocaml/lib/ocaml/site-lib ../bootstrap/ocaml/lib/site-lib ../bootstrap/ocaml/etc *.pkgbuild
@rm -rf ../bootstrap/ocaml/lib/ocaml/site-lib ../bootstrap/ocaml/etc *.pkgbuild

ifeq ($(JBUILDER),)
JBUILDER_DEP=jbuilder/_build/install/default/bin/jbuilder$(EXE)
Expand Down

0 comments on commit 5861ee3

Please sign in to comment.