patch-pre2.0.7 linux/scripts/depend.awk
Next file: linux/CREDITS
Previous file: linux/net/netrom/nr_route.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Mon May 20 08:37:40 1996
- Orig file:
pre2.0.6/linux/scripts/depend.awk
- Orig date:
Fri Apr 12 15:52:13 1996
diff -u --recursive --new-file pre2.0.6/linux/scripts/depend.awk linux/scripts/depend.awk
@@ -94,12 +94,12 @@
LASTFILE=FILENAME
depname=FILENAME
relpath=FILENAME
- sub("\\.c",".o: ",depname)
- sub("\\.S",".o: ",depname)
+ sub("\\.c$",".o: ",depname)
+ sub("\\.S$",".o: ",depname)
if (depname==FILENAME) {
cmd="\n\t@touch "depname
}
- sub("\\.h",".h: ",depname)
+ sub("\\.h$",".h: ",depname)
if(relpath ~ "^\\." ) {
sub("[^/]*$","", relpath)
relpath=relpath"/"
@@ -114,21 +114,28 @@
if (fname=="linux/config.h") {
hasconfig=1
}
- if(fileExists(relpath""fname)) {
+ rfname=relpath""fname
+ if(fileExists(rfname)) {
found=1
if (!hasdep) {
printf "%s", depname
}
hasdep=1
- printf " \\\n %s", relpath""fname
+ printf " \\\n %s", rfname
if(fname ~ "^\\." ) {
- if(!relpath in ARGV) {
- ARGV[ARGC]=relpath""fname
+ fnd=0;
+ for(i in ARGV) {
+ if(ARGV[i]==rfname) {
+ fnd=1
+ }
+ }
+ if(fnd==0) {
+ ARGV[ARGC]=rfname
++ARGC
}
}
} else {
- for(path in parray) {
+ for(path in parray) {
if(fileExists(parray[path]"/"fname)) {
shortp=parray[path]
found=1
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this