1 ?RCS: $Id: cpp_trad.U 1 2006-08-24 12:32:52Z rmanfredi $
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
11 ?RCS: $Log: cpp_stuff.U,v $
12 ?MAKE:cpp_trad: cpp cat contains rm
13 ?MAKE: -pick add $@ %<
15 ?S: This variable contains the program to run to get traditional C
16 ?S: preprocessor semantics and not ISO C semantics: we want something
17 ?S: that knows as little about C as possible to use as a more general
18 ?S: purpose preprocessor.
21 : how do we get traditional cpp semantics?
23 echo "Checking to see how to get traditional cpp semantics..." >&4
29 if $cpp foo.c >foo.cpp; $contains ab foo.cpp >/dev/null 2>&1; then
30 echo "Plain '$cpp' works just fine."
32 elif $cpp -traditional foo.c >foo.cpp; \
33 $contains ab foo.cpp >/dev/null 2>&1; then
34 echo "We'll use '$cpp -traditional' to get proper semantics."
35 cpp_trad="$cpp -traditional"
37 echo "I don't know how to get traditional semantics with '$cpp'." >&4