mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-11 16:37:45 -04:00
make: have preprocess2file fail on error
The preprocess2file helper is mainly used to preprocess linker scripts, but piping the preprocessor output to 'grep' masks the exit code of gcc, so if it fails (eg. due to an #error directive) then it does not cause the build to fail like it should. In this particular case the grep commands don't seem to be doing anything, since the "-P" option suppresses line markers, which "grep -v ^$(_hash)" is probably meant to filter out. The intent behind "grep -v ^$$" is unclear since the preprocessor doesn't seem to output any line beginning with '$', but in any event it seems unnecessary. Change-Id: Ie23f5de1fe1bfb5890c7b2f3c7fa05401931d89f
This commit is contained in:
parent
676d3b6432
commit
7bf1c79cb5
1 changed files with 1 additions and 2 deletions
|
|
@ -24,8 +24,7 @@ preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c -include config.h $(1) |
|
|||
grep -v "^$(_hash_)" | grep -v "^ *$$" | \
|
||||
sed -e 's:^..*:$(dir $(1))&:')
|
||||
|
||||
preprocess2file = $(shell $(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \
|
||||
grep -v '^$(_hash_)' | grep -v "^$$" > $(2))
|
||||
preprocess2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) -o $(2)
|
||||
|
||||
asmdefs2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \
|
||||
perl -ne 'if(/^_?AD_(\w+):$$/){$$var=$$1}else{/^\W\.(?:word|long)\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $(2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue