mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-27 18:53:42 +03:00
2c2acdcfac
This has two main advantages: firstly, it actually makes the build slightly faster and less memory intensive, because Idris doesn't fork a new process and eat all the memory! Secondly, it means we can build a distribution with the C file, for building on machines which don't have Idris 1 available. Also includes a script for building such a distribution. I expect someone who is better a writing Makefiles than me can tidy this up. There are almost certainly problems on Windows too - please help if you can! There are new Make targets 'all-fromc' and 'install-fromc' which don't require building from Idris source, so that we can build with no Idris 1 available. A small consequence: make install-exec no longer builds the idris2 executable, just installs it.
31 lines
882 B
Bash
Executable File
31 lines
882 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ $# -eq 0 ]
|
|
then
|
|
echo "Usage: ./mkdist.sh [version]"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p idris2-$1
|
|
# Copy the source, but without build artefacts
|
|
rsync -avm --include='*.idr' -f 'hide,! */' src idris2-$1
|
|
rsync -avm --include-from='srcfiles' -f 'hide,! */' libs idris2-$1
|
|
rsync -avm --include-from='srcfiles' -f 'hide,! */' samples idris2-$1
|
|
rsync -avm --include-from='srcfiles' -f 'hide,! */' docs idris2-$1
|
|
rsync -avm --include-from='srcfiles' -f 'hide,! */' tests idris2-$1
|
|
# Copy run time support for Idris 1
|
|
rsync -avm --include-from='srcfiles' -f 'hide,! */' dist idris2-$1
|
|
# Copy run time support for Idris 2
|
|
cp -r support idris2-$1/support
|
|
# Copy top level files and docs
|
|
cp *.md Makefile LICENSE idris2.ipkg idris2-$1
|
|
|
|
tar zcvf idris2-$1.tgz idris2-$1
|
|
|
|
echo "Did you remember to:"
|
|
echo "\tmake dist/idris2.c?"
|
|
echo "\ttag the release?"
|
|
echo "\tset the -O2 flag?"
|
|
|
|
|