-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmake-distrib.sh
executable file
·44 lines (32 loc) · 966 Bytes
/
make-distrib.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
set -e
VERSION=$(sed -n -e 's/^.*version *= *(\([0-9]\+,[0-9]\+,[0-9]\+\)) *$/\1/' -e 's/,/./gp' aurochs/version.ml)
echo "Version is $VERSION"
./build.sh
OLD=$PWD
TARGET=${TARGET:-aurochs-sdk-v$VERSION}
cd _build
mkdir -p $TARGET
mkdir -p $TARGET/bin
mkdir -p $TARGET/obj
mkdir -p $TARGET/src
mkdir -p $TARGET/lib
mkdir -p $TARGET/include
mkdir -p $TARGET/java
mkdir -p $TARGET/java/fr/aurochs
cp ../Makefile.distrib $TARGET/Makefile
cp ../Makefile.java $TARGET/Makefile.java
if [ "x$NOBIN" != "x" ]; then
cp aurochs/aurochs_tool.native $TARGET/bin/aurochs
cp libaurochs.a $TARGET/lib
fi
cp include/*.h $TARGET/include
cp ../cnog/check.c $TARGET/src
cp aurochs/*.c cnog/*.c cpack/*.c cutil/*.c $TARGET/src
cp ../java/*.c ../java/Makefile $TARGET/java
cp ../java/fr/aurochs/*.java $TARGET/java/fr/aurochs
cp ../java/arith.peg $TARGET/java
cp ../java/arith.txt $TARGET/java
tar czvf $TARGET.tar.gz $TARGET
cd $OLD
cp _build/$TARGET.tar.gz .