Date: Wed, 31 Oct 2001 13:38:17 -0800 (PST) From: David Wolfskill <david@catwhisker.org> To: current@FreeBSD.ORG, david@catwhisker.org Subject: Re: buildworld breakage during "make depend" at usr.bin/kdump Message-ID: <200110312138.f9VLcHX45849@bunrab.catwhisker.org> In-Reply-To: <200110311923.f9VJN3845569@bunrab.catwhisker.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>Date: Wed, 31 Oct 2001 11:23:03 -0800 (PST) >From: David Wolfskill <david@catwhisker.org> [Me, muttering to myself again....] >>mkdep -f .depend -a -I/usr/obj/usr/src/i386/usr/include /usr/src/usr.bin/jot/jot.c >>cd /usr/src/usr.bin/jot; make _EXTRADEPEND >>echo jot: /usr/obj/usr/src/i386/usr/lib/libc.a >> .depend >>===> usr.bin/kdump >>sh /usr/src/usr.bin/kdump/mkioctls /usr/obj/usr/src/i386/usr/include > ioctl.c >>awk: newline in string #include <cam/scsi/s... at source line 1 >>... >... >And awk does *not* seem to like having embedded newline characters in >there. >If there is a way to tell awk to "quit whining and *like* the newlines", >that would seem to be ideal. Failing that, I can work up some way to >transmogrify the #include list so awk will like it better.... Well, I got beyond that point by hacking src/usr.bin/kdump/mkioctls: Index: /usr/src/usr.bin/kdump/mkioctls =================================================================== RCS file: /cvs/freebsd/src/usr.bin/kdump/mkioctls,v retrieving revision 1.23 diff -u -r1.23 mkioctls --- /usr/src/usr.bin/kdump/mkioctls 24 May 2001 08:47:57 -0000 1.23 +++ /usr/src/usr.bin/kdump/mkioctls 31 Oct 2001 21:29:00 -0000 @@ -25,10 +25,10 @@ egrep -v '^(netns)/' | xargs egrep -l \ '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | - sed -e 's/^/#include </' -e s'/$/>/' + awk '{printf("#include <%s>\\\\n", $1)}' ` -echo "$ioctl_includes" | +awk -v x="$ioctl_includes" 'BEGIN {print x}' | gcc -E -I$1 -dM - | awk -v ioctl_includes="$ioctl_includes" -v use_switch="$use_switch" ' BEGIN { which is likely nowhere near "good," let alone "optimal". (I tend to write a great deal more Perl than awk. I'm willing to try re-casting the awk stuff as Perl, if that's wanted.) Of course, the whole idea that awk (suddenly?) should be unable to cope with a variable that happens to have a newline in its *value* strikes me as a POLA violation in the extreme... but see above WRT my awk experience (and lack thereof).... Onward, david -- David H. Wolfskill david@catwhisker.org As a computing professional, I believe it would be unethical for me to advise, recommend, or support the use (save possibly for personal amusement) of any product that is or depends on any Microsoft product. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110312138.f9VLcHX45849>