>Date: Wed, 31 Oct 2001 08:34:16 -0800 (PST)
>From: David Wolfskill <[EMAIL PROTECTED]>

>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

>Stop in /usr/src/usr.bin/kdump.
>*** Error code 1

>.... However, in reviewing that
>log, I didn't see the awk complaints ("awk: newline in string #include
><cam/scsi/s... at source line 1").

Yup; that is the error message that accompanies awk's termination (from
within the src/usr.bin/kdump/mkioctls script) with status 2.

>At this stage, I'll welcome pointers/suggestions while I do some
>research on my own.

By breaking down the parts of the pipeline in src/usr.bin/kdump/mkioctls,
it looks as if the problem is that the (shell) variable ioctl_includes
is being set to a list of #include directives, one per line, such as:

#include <cam/scsi/scsi_pass.h>
#include <cam/scsi/scsi_ses.h>
#include <cam/scsi/scsi_targetio.h>
#include <dev/ppbus/lptio.h>
#include <dev/ppbus/ppi.h>

That shell variable is being used to set the value of a similarly-named
awk variable:

        awk -v ioctl_includes="$ioctl_includes" -v use_switch="$use_switch" '

And awk does *not* seem to like having embedded newline characters in 

By generating the output to a separate file, the replacing each "real
newline" with a C/awk/Perl representation thereof (i.e., "\n"), I was
able to get the awk part of the pipeline to terminate with a status of
0, while generating what looks like reasonable output (though I'm hardly
an expert on that).

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....

Am I really the only one who has seen this?

David H. Wolfskill                              [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to