summaryrefslogtreecommitdiff
path: root/make/mkdep.in
diff options
context:
space:
mode:
Diffstat (limited to 'make/mkdep.in')
-rw-r--r--make/mkdep.in38
1 files changed, 25 insertions, 13 deletions
diff --git a/make/mkdep.in b/make/mkdep.in
index bb536c95..8c2201f4 100644
--- a/make/mkdep.in
+++ b/make/mkdep.in
@@ -140,25 +140,37 @@ if [ X"${MKDEPPROG}" != X ]; then
else
@MKDEPCC@ @MKDEPCFLAGS@ ${newargs} |
sed "
- s; \./; ;g
+ s; \\./; ;g
+ s; \\\\; ;g
@LIBTOOL_MKDEP_SED@
$SED" |
- awk '{
- if ($1 != prev) {
+ awk '$1 ~ /:$/ {
if (rec != "")
- print rec;
- rec = $0;
- prev = $1;
+ print rec;
+ if (NF == 1)
+ rec = $1;
+ else
+ rec = $1 " " $2;
+ for (i = 3; i <= NF; i++) {
+ if (length(rec $i) > 76) {
+ print rec " \\";
+ rec = " " $i;
+ } else {
+ rec = rec " " $i;
+ }
+ }
+ next;
}
- else {
- if (length(rec $2) > 78) {
- print rec;
- rec = $0;
+ {
+ for (i = 1; i <= NF; i++) {
+ if (length(rec $i) > 76) {
+ print rec, "\\";
+ rec = " " $i;
+ } else {
+ rec = rec " " $i;
+ }
}
- else
- rec = rec " " $2
}
- }
END {
print rec
}' >> $TMP