From owner-svn-src-all@FreeBSD.ORG Thu Mar 31 21:33:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA4F4106566B; Thu, 31 Mar 2011 21:33:33 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D758E8FC17; Thu, 31 Mar 2011 21:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2VLXXv0023396; Thu, 31 Mar 2011 21:33:33 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2VLXXLA023394; Thu, 31 Mar 2011 21:33:33 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201103312133.p2VLXXLA023394@svn.freebsd.org> From: Ryan Stone Date: Thu, 31 Mar 2011 21:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220227 - head/sys/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2011 21:33:34 -0000 Author: rstone Date: Thu Mar 31 21:33:33 2011 New Revision: 220227 URL: http://svn.freebsd.org/changeset/base/220227 Log: 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 Modified: head/sys/tools/fw_stub.awk Modified: head/sys/tools/fw_stub.awk ============================================================================== --- head/sys/tools/fw_stub.awk Thu Mar 31 21:30:00 2011 (r220226) +++ head/sys/tools/fw_stub.awk Thu Mar 31 21:33:33 2011 (r220227) @@ -124,14 +124,14 @@ gsub(/[-\.]/, "_", modname); printc("/*\ * Automatically generated by:\ * $FreeBSD$\ - */\ -#include \ -#include \ -#include \ -#include \ -#include \ -#include \ -#include \n"); + */"); +printc("#include "); +printc("#include "); +printc("#include "); +printc("#include "); +printc("#include "); +printc("#include "); +printc("#include \n"); if (opt_l) { printc("static long " opt_l "_license_ack = 0;");