|
@@ -1,10 +1,5 @@
|
|
|
#!/bin/sh
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
-#some files dont have any #ifdef HUB|LEAF
|
|
|
|
|
-#but they do have a header included which DOES
|
|
|
|
|
-#this can potentially cause major problems with sizeof(struct) etc...
|
|
|
|
|
-#temporary solution: MAKE CLEAN
|
|
|
|
|
-
|
|
|
|
|
other=""
|
|
other=""
|
|
|
|
|
|
|
|
if [ $1 = "hub" ]; then
|
|
if [ $1 = "hub" ]; then
|
|
@@ -18,11 +13,11 @@ fi
|
|
|
|
|
|
|
|
if test ! -f stamp.$1 && test -f stamp.$other
|
|
if test ! -f stamp.$1 && test -f stamp.$other
|
|
|
then
|
|
then
|
|
|
|
|
+ #Find and remove .c files
|
|
|
flist="`find src -name \*.c`"
|
|
flist="`find src -name \*.c`"
|
|
|
-# cfiles="`grep -l \"def [H|L][U|E][B|A]\" $flist`"
|
|
|
|
|
|
|
+ cfiles="`grep -l \"def [H|L][U|E][B|A]\" $flist`"
|
|
|
echo "[*] Cleaning up files for $1 build"
|
|
echo "[*] Cleaning up files for $1 build"
|
|
|
-# for s in $cfiles
|
|
|
|
|
- for s in $flist
|
|
|
|
|
|
|
+ for s in $cfiles
|
|
|
do
|
|
do
|
|
|
bleh="`echo $s | cut -d / -f 2`";
|
|
bleh="`echo $s | cut -d / -f 2`";
|
|
|
if [ $bleh = "mod" ]; then
|
|
if [ $bleh = "mod" ]; then
|
|
@@ -45,17 +40,13 @@ then
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
done
|
|
done
|
|
|
|
|
+ #Now find and 'touch' header files
|
|
|
|
|
+ flist="`find src -name \*.h`"
|
|
|
|
|
+ cfiles="`grep -l \"def [H|L][U|E][B|A]\" $flist`"
|
|
|
|
|
+ for s in $cfiles
|
|
|
|
|
+ do
|
|
|
|
|
+ touch $s
|
|
|
|
|
+ done
|
|
|
fi
|
|
fi
|
|
|
rm -f stamp.*
|
|
rm -f stamp.*
|
|
|
touch stamp.$1
|
|
touch stamp.$1
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|