Skip to content

Commit 8e5d197

Browse files
author
jfpoilpret
committed
Fix build-doc shell script to fit new dirs structure.
1 parent 6dc26fe commit 8e5d197

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

make/build-docs

+12-6
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,32 @@
66
# 3. Generate size tables for inclusion into tutorial doc
77
# 4. Regenerate docs
88

9+
CURDIR=`pwd`
10+
SCRIPT=$(readlink -f "$0")
11+
MAKEDIR=$(dirname "$SCRIPT")
12+
BASEDIR=$MAKEDIR/..
13+
914
echo "Build all samples for Arduino API"
10-
cd tuto-samples/arduino
15+
cd $BASEDIR/tuto-samples/arduino
1116
./build-samples | ./stats.py >sizes.txt
12-
cd ../..
1317

1418
echo "Build all samples for FastArduino"
15-
cd tuto-samples/fastarduino
19+
cd $BASEDIR/tuto-samples/fastarduino
1620
./build-samples 2>errors| ./stats.py >sizes.txt
17-
cd ../..
1821

1922
# check if error found, then abort
20-
grep "Error" tuto-samples/fastarduino/errors
23+
cd $CURDIR
24+
grep "Error" $BASEDIR/tuto-samples/fastarduino/errors
2125
if [ $? -ne 1 ]; then
2226
echo "Error occurred, aborting."
2327
exit 1
2428
fi
2529

2630
# Generate size tables
2731
echo "Generate size data sheets"
28-
./gen-sample-size-tables.py tuto-samples/arduino/sizes.txt tuto-samples/fastarduino/sizes.txt samples-list.txt >tuto-samples/tables.txt
32+
$MAKEDIR/gen-sample-size-tables.py $BASEDIR/tuto-samples/arduino/sizes.txt $BASEDIR/tuto-samples/fastarduino/sizes.txt $MAKEDIR/samples-list.txt >$BASEDIR/tuto-samples/tables.txt
2933

3034
echo "Generate docs"
35+
cd $BASEDIR
3136
make doco
37+
cd $CURDIR

0 commit comments

Comments
 (0)