Bug 6917 - locale/gen-translit.pl: move preprocessing to Makefile
locale/gen-translit.pl: move preprocessing to Makefile
Status: NEW
Product: glibc
Classification: Unclassified
Component: localedata
2.8
: P2 normal
: ---
Assigned To: GNU C Library Locale Maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-27 09:55 UTC by Jeroen Demeyer
Modified: 2008-09-27 09:56 UTC (History)
1 user (show)

See Also:
Host: powerpc64-unknown-linux-gnu
Target: powerpc64-unknown-linux-gnu
Build: powerpc-unknown-linux-gnu
Last reconfirmed:


Attachments
Proposed patch (1.26 KB, patch)
2008-09-27 09:56 UTC, Jeroen Demeyer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Demeyer 2008-09-27 09:55:31 UTC
The first line of locale/gen-translit.pl is the following:

open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file"

There are two problems with this:
1) This does not detect any errors while the shell command "cat C-translit.h.in
| gcc -E -" is running.  Instead, you get some obscure errors later on when
C-translit.h is using to compile something.
2) $(CPP) should be used instead of gcc -E

So my proposal would be to move this preprocessing to the Makefile and replace
gcc -E by $(CPP).
Comment 1 Jeroen Demeyer 2008-09-27 09:56:06 UTC
Created attachment 2963 [details]
Proposed patch