Skip to content

Commit dd2341e

Browse files
committed
Build: bin symbolic link is generated
1 parent 3b40e80 commit dd2341e

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ js/external
22
todo.org
33
*~
44
_build/
5+
bin
56
/build/
67
.merlin
78
._d/

Makefile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

111111
doc: $(MANGENREP) man/KaSim_manual.pdf
@@ -117,7 +117,8 @@ profiling:
117117
@+$(MAKE) EXTRAFLAGS="-pkg landmarks.ppx -pkg landmarks" OCAML_LANDMARKS="auto,allocation" all
118118

119119
all:
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

122123
agents:
123124
dune build --only-packages kappa-library,kappa-binaries,kappa-agents
@@ -137,18 +138,19 @@ clean_doc:
137138
rm -rf $(MANGENREP)
138139

139140
clean: 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

144146
check:
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

149151
build-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/

bin

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)