Re: WITHOUT_GCC flag disables installation of /usr/bin/cpp too -
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
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
--56599777-266539953-1315615497=:3074--
討論串 (同標題文章)
完整討論串 (本文為第 5 之 5 篇):