@@ -101,11 +101,11 @@ site/index.html: $(INDEX_HTML) $(SITE_EXTRAS) site/JsSim.js site/KaSimWorker.js
101101 rm $$ {LOG} || { cat $$ {LOG}; rm $$ {LOG}; exit 2; }
102102
103103% .witness : % .sh $(MANGENREP ) $(MODELS ) % .gplot
104- cd $(dir $@ ) && KAPPABIN=" $( CURDIR) /bin/" sh $(notdir $< ) > $(notdir $@ ) 2>&1 \
104+ cd $(dir $@ ) && KAPPABIN=" $( CURDIR) /_build/install/default/ bin/" sh $(notdir $< ) > $(notdir $@ ) 2>&1 \
105105 || { cat $( notdir $@ ) ; rm $( notdir $@ ) ; exit 2; }
106106
107107% .witness : % .sh $(MANGENREP ) $(MODELS )
108- cd $(dir $@ ) && KAPPABIN=" $( CURDIR) /bin/" sh $(notdir $< ) > $(notdir $@ ) 2>&1 \
108+ cd $(dir $@ ) && KAPPABIN=" $( CURDIR) /_build/install/default/ bin/" sh $(notdir $< ) > $(notdir $@ ) 2>&1 \
109109 || { cat $( notdir $@ ) ; rm $( notdir $@ ) ; exit 2; }
110110
111111doc : $(MANGENREP ) man/KaSim_manual.pdf
@@ -117,7 +117,8 @@ profiling:
117117 @+$(MAKE ) EXTRAFLAGS=" -pkg landmarks.ppx -pkg landmarks" OCAML_LANDMARKS=" auto,allocation" all
118118
119119all :
120- dune build --only-packages kappa-library,kappa-binaries
120+ dune build kappa-binaries.install
121+ ln -n -s _build/install/default/bin bin
121122
122123agents :
123124 dune build --only-packages kappa-library,kappa-binaries,kappa-agents
@@ -137,18 +138,19 @@ clean_doc:
137138 rm -rf $(MANGENREP )
138139
139140clean : clean_doc clean_ide
141+ rm -f bin
140142 dune clean
141143 find . -name \* ~ -delete
142- +$(MAKE ) KAPPABIN=" $( CURDIR) /bin/" -C tests/integration clean
144+ +$(MAKE ) KAPPABIN=" $( CURDIR) /_build/install/default/ bin/" -C tests/integration clean
143145
144146check :
145147 dune runtest
146- @+$(MAKE ) KAPPABIN=" $( CURDIR) /bin/" -C tests/integration clean
147- @+$(MAKE ) KAPPABIN=" $( CURDIR) /bin/" -C tests/integration all
148+ @+$(MAKE ) KAPPABIN=" $( CURDIR) /_build/install/default/ bin/" -C tests/integration clean
149+ @+$(MAKE ) KAPPABIN=" $( CURDIR) /_build/install/default/ bin/" -C tests/integration all
148150
149151build-tests :
150152 dune promote
151- @+$(MAKE ) KAPPABIN=" $( CURDIR) /bin/" -C tests/integration build
153+ @+$(MAKE ) KAPPABIN=" $( CURDIR) /_build/install/default/ bin/" -C tests/integration build
152154
153155# https://electronjs.org/docs/tutorial/application-distribution
154156
@@ -163,7 +165,7 @@ Kappapp.tar.gz:
163165 mv Kappapp/electron Kappapp/kappapp
164166 mv site Kappapp/resources/app
165167 mkdir Kappapp/resources/bin
166- cp bin/* Kappapp/resources/bin/
168+ cp _build/install/default/ bin/* Kappapp/resources/bin/
167169 tar czf $@ Kappapp
168170 rm -r Kappapp
169171
@@ -201,7 +203,7 @@ Kappapp.app: gui/Info.plist gui/Kappa.icns
201203 rm $$ FOLDER && mkdir -p $$ FOLDER && pushd $$ FOLDER && unzip $$ FILE && popd && mv $$ FOLDER/Electron.app $@ && rm -r $$ FOLDER
202204 rm -r $@ /Contents/Resources/* .lproj/
203205 mkdir $@ /Contents/Resources/bin
204- cp bin/* $@ /Contents/Resources/bin/
206+ cp _build/install/default/ bin/* $@ /Contents/Resources/bin/
205207 mv site $@ /Contents/Resources/app/
206208 mv gui/Kappa.icns $@ /Contents/Resources/
207209 mv gui/Info.plist $@ /Contents/
0 commit comments