mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
Remove lint from awk script (trailing ;)
Improve regex to allow detection of : inside of filenames. Skip files with ':' in name Fix noslash 'next' vs 'continue' bug
This commit is contained in:
parent
9bf50242c3
commit
5a8254fa45
1 changed files with 13 additions and 11 deletions
24
build/mkdep
24
build/mkdep
|
|
@ -145,24 +145,26 @@ _EOF_
|
||||||
$MKDEP_CC $MKDEP_CFLAGS $files | \
|
$MKDEP_CC $MKDEP_CFLAGS $files | \
|
||||||
sed -e 's; \./; ;g' | \
|
sed -e 's; \./; ;g' | \
|
||||||
$SED > $TMP.sed
|
$SED > $TMP.sed
|
||||||
# dont pipe to awk. SGI awk wants a filename as argument.
|
# do not pipe to awk. SGI awk wants a filename as argument.
|
||||||
# (or '-', but I do not know if all other awks support that.)
|
# (or '-', but I do not know if all other awks support that.)
|
||||||
awk '
|
awk '
|
||||||
$1 ~ /:/ {
|
$1 ~ /:$/ {
|
||||||
filenm=$1;
|
filenm=$1
|
||||||
dep=substr($0, length(filenm)+1);
|
dep=substr($0, length(filenm)+1)
|
||||||
}
|
}
|
||||||
$1 !~ /:/ {
|
$1 !~ /:$/ {
|
||||||
dep=$0;
|
dep=$0
|
||||||
}
|
}
|
||||||
/.*/ {
|
/.*/ {
|
||||||
split(dep, depends, " ");
|
if ( filenm ~ /:.*:$/ ) next
|
||||||
|
split(dep, depends, " ")
|
||||||
for(d in depends) {
|
for(d in depends) {
|
||||||
dfile = depends[d];
|
dfile = depends[d]
|
||||||
if (( noslash == "yes") && (dfile ~ /^\// )) next
|
if ( dfile ~ /:/ ) continue
|
||||||
|
if (( noslash == "yes") && (dfile ~ /^\// )) continue
|
||||||
if ( length(dfile) < 2 ) continue
|
if ( length(dfile) < 2 ) continue
|
||||||
rec = filenm " " dfile;
|
rec = filenm " " dfile
|
||||||
print rec;
|
print rec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
' noslash="$NOSLASH" $TMP.sed >> $TMP
|
' noslash="$NOSLASH" $TMP.sed >> $TMP
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue