diff options
author | rstone <rstone@FreeBSD.org> | 2011-03-31 21:33:33 +0000 |
---|---|---|
committer | rstone <rstone@FreeBSD.org> | 2011-03-31 21:33:33 +0000 |
commit | 21740f8564b0464c4a7de62f19bc2aba43543d1b (patch) | |
tree | cadc3a5636ca8a6827c48c6ed0732f29a4f93f71 /sys/tools | |
parent | 94aa425d1e859784b795cec781fea5fc10991ef0 (diff) | |
download | FreeBSD-src-21740f8564b0464c4a7de62f19bc2aba43543d1b.zip FreeBSD-src-21740f8564b0464c4a7de62f19bc2aba43543d1b.tar.gz |
GNU awk does not output escaped newlines in multi-line printc statements. This
leads to compile errors when trying to compile firmware(9) stubs created with
gawk, as multiple #include statements end up on the same line. Replace the
multi-line printc statement that outputs all of the #includes with one printc
per #include. This allows modules compatible with firmware(9) to be cross-built
from a Linux machine without requiring the one true awk to be installed.
I've intentionally done the minimal set of changes necessary to make gawk
produce valid (but not pretty) C code, to reduce the churn and keep fw_stubs.awk
as readable as possible.
Approved by: emaste (mentor)
MFC after: 2 weeks
Diffstat (limited to 'sys/tools')
-rw-r--r-- | sys/tools/fw_stub.awk | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/tools/fw_stub.awk b/sys/tools/fw_stub.awk index 05e2f32..0c7d567 100644 --- a/sys/tools/fw_stub.awk +++ b/sys/tools/fw_stub.awk @@ -124,14 +124,14 @@ gsub(/[-\.]/, "_", modname); printc("/*\ * Automatically generated by:\ * $FreeBSD$\ - */\ -#include <sys/param.h>\ -#include <sys/errno.h>\ -#include <sys/kernel.h>\ -#include <sys/module.h>\ -#include <sys/linker.h>\ -#include <sys/firmware.h>\ -#include <sys/systm.h>\n"); + */"); +printc("#include <sys/param.h>"); +printc("#include <sys/errno.h>"); +printc("#include <sys/kernel.h>"); +printc("#include <sys/module.h>"); +printc("#include <sys/linker.h>"); +printc("#include <sys/firmware.h>"); +printc("#include <sys/systm.h>\n"); if (opt_l) { printc("static long " opt_l "_license_ack = 0;"); |