Просмотр исходного кода

* Fixed up maketype to touch headers and remove .o files as needed

svn: 1525
Bryan Drewery 21 лет назад
Родитель
Сommit
f9796bfaf4
1 измененных файлов с 10 добавлено и 19 удалено
  1. 10 19
      misc/maketype

+ 10 - 19
misc/maketype

@@ -1,10 +1,5 @@
 #!/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=""
 
 if [ $1 = "hub" ]; then
@@ -18,11 +13,11 @@ fi
 
 if test ! -f stamp.$1 && test -f stamp.$other
 then
+  #Find and remove .c files
   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"
-#  for s in $cfiles 
-  for s in $flist
+  for s in $cfiles 
   do
     bleh="`echo $s | cut -d / -f 2`";
     if [ $bleh = "mod" ]; then
@@ -45,17 +40,13 @@ then
       fi
     fi
   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
 rm -f stamp.*
 touch stamp.$1
-
-
-
-
-
-
-
-
-
-
-