From owner-freebsd-current@FreeBSD.ORG Sat Sep 10 00:44:59 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EA8C106564A; Sat, 10 Sep 2011 00:44:59 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f07:14d3:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id C24E48FC15; Sat, 10 Sep 2011 00:44:58 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f07:14d3:1::5]) by mail.farley.org (8.14.5/8.14.5) with ESMTP id p8A0ivKh043143; Fri, 9 Sep 2011 20:44:57 -0400 (EDT) (envelope-from scf@FreeBSD.org) Date: Fri, 9 Sep 2011 20:44:57 -0400 (EDT) From: "Sean C. Farley" To: "Lev A. Serebryakov" In-Reply-To: Message-ID: References: <1231707981.20110907201053@serebryakov.spb.ru> <4E67A720.2000903@FreeBSD.org> <1997790603.20110907212004@serebryakov.spb.ru> User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="56599777-266539953-1315615497=:3074" X-Spam-Status: No, score=-1.5 required=4.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.farley.org Cc: freebsd-current Subject: Re: WITHOUT_GCC flag disables installation of /usr/bin/cpp too -- is it Ok? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Sep 2011 00:44:59 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --56599777-266539953-1315615497=:3074 Content-Type: TEXT/PLAIN; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8BIT On Fri, 9 Sep 2011, Benjamin Kaduk wrote: > On Wed, 7 Sep 2011, Lev Serebryakov wrote: > >> Hello, Dimitry. >> You wrote 7 сентября 2011 г., 21:17:20: >> >> I think, that /usr/bin/cpp is valuable by itself, as it is handy >> generic preprocessor tool, useful for preparing complex ipfw scripts, >> for example. All others are bundled together, for sure. > > I am not really convinced. /usr/bin/cpp is the C preprocessor, and it is > only required to emit output that its bundled C compiler will accept as > input. In particular, it can do whatever it wants with whitespace, wrapping > and unwrapping lines, outputting other spurious text, &c.. > From cpp(1): > The C preprocessor is intended to be used only with C, C++, and Objec- > tive-C source code. In the past, it has been abused as a general text > processor. It will choke on input which does not obey C's lexical > rules. For example, apostrophes will be interpreted as the beginning > of character constants, and cause errors. Also, you cannot rely on it > preserving characteristics of the input which are not significant to > C-family languages. If a Makefile is preprocessed, all the hard tabs > will be removed, and the Makefile will not work. > The (incredibly brain-dead) build system at $work runs cpp on a Makefile, > which I had to hack around in order to get things to work. It's really an > ugly hack, though, and is not at all robust. I wish I didn't have to. > > If you want a general-purpose macro processor, please consider using > something that was designed as a general-purpose macro processor (e.g. m4(1) > which is in base) -- abusing cpp(1) is just asking for weird/subtle errors to > be introduce in the future. Another option may be to install devel/ucpp. I have not used it before, but it may be good enough for preparing ipfw scripts. Sean -- scf@FreeBSD.org --56599777-266539953-1315615497=:3074--