summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/make.sh
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-20 15:09:10 +0200
committertylov <[email protected]>2023-07-20 15:12:29 +0200
commit900295256d825fc323149cd223c49787f32a3696 (patch)
tree6c79cf4209e3975bb6865e2940b9cb56ea469c73 /misc/examples/make.sh
parent224a04f7fa7549ed94d2a1415eb25829e39a7cca (diff)
downloadSTC-modified-900295256d825fc323149cd223c49787f32a3696.tar.gz
STC-modified-900295256d825fc323149cd223c49787f32a3696.zip
Moved examples to sub-directories. Added cotask1.c cotask2.c examples.
Diffstat (limited to 'misc/examples/make.sh')
-rwxr-xr-xmisc/examples/make.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/misc/examples/make.sh b/misc/examples/make.sh
index cf224950..7135ffdf 100755
--- a/misc/examples/make.sh
+++ b/misc/examples/make.sh
@@ -37,18 +37,20 @@ else
fi
if [ $run = 0 ] ; then
- for i in *.c ; do
- echo $comp -I../../include $i $clibs $oflag$(basename $i .c).exe
- $comp -I../../include $i $clibs $oflag$(basename $i .c).exe
+ for i in */*.c ; do
+ #out=$(basename $i .c).exe
+ out=$(dirname $i)/$(basename $i .c).exe
+ echo $comp -I../../include $i $clibs $oflag$out
+ $comp -I../../include $i $clibs $oflag$out
done
else
- for i in *.c ; do
+ for i in */*.c ; do
echo $comp -I../../include $i $clibs
$comp -I../../include $i $clibs
- if [ -f $(basename -s .c $i).exe ]; then ./$(basename -s .c $i).exe; fi
- if [ -f ./a.exe ]; then ./a.exe; fi
- if [ -f ./a.out ]; then ./a.out; fi
+ #out=$(basename $i .c).exe
+ out=$(dirname $i)/$(basename $i .c).exe
+ if [ -f $out ]; then ./$out; fi
done
fi
-rm -f a.out *.o *.obj # *.exe
+#rm -f a.out *.o *.obj # *.exe