makefiles: Suppress stray backslash warnings with grep 3.8
GNU grep 3.8 warns about "\#" when compiling. The "#" has to be escaped for Makefiles and shell, but it isn't special to grep so grep thinks it's an invalid escape sequence. Change-Id: Ieb2607d42b7daa1939ca0101b915ec0c7afd4298
This commit is contained in:
parent
977bc698db
commit
ed7ab52e27
5 changed files with 7 additions and 7 deletions
|
@ -24,7 +24,7 @@ $(BUILDDIR)/apps/features: $(APPSDIR)/features.txt $(BUILDDIR)/firmware/common/
|
||||||
$(call PRINTS,PP $(<F))
|
$(call PRINTS,PP $(<F))
|
||||||
$(SILENT)$(CC) $(PPCFLAGS) \
|
$(SILENT)$(CC) $(PPCFLAGS) \
|
||||||
-E -P -imacros "config.h" -imacros "button.h" -x c $< | \
|
-E -P -imacros "config.h" -imacros "button.h" -x c $< | \
|
||||||
grep -v "^\#" | grep -v "^ *$$" > $(BUILDDIR)/apps/features; \
|
grep -v "^#" | grep -v "^ *$$" > $(BUILDDIR)/apps/features; \
|
||||||
|
|
||||||
$(BUILDDIR)/apps/genlang-features: $(BUILDDIR)/apps/features
|
$(BUILDDIR)/apps/genlang-features: $(BUILDDIR)/apps/features
|
||||||
$(call PRINTS,GEN $(subst $(BUILDDIR)/,,$@))tr \\n : < $< > $@
|
$(call PRINTS,GEN $(subst $(BUILDDIR)/,,$@))tr \\n : < $< > $@
|
||||||
|
|
|
@ -59,7 +59,7 @@ $(OBJDIR)/features.tex: $(ROOTDIR)/apps/features.txt
|
||||||
$(SILENT) for f in \
|
$(SILENT) for f in \
|
||||||
$$(cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
$$(cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
||||||
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" \
|
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" \
|
||||||
-imacros "button.h" - | grep -v "^\#" | grep -v "^$$"); \
|
-imacros "button.h" - | grep -v "^#" | grep -v "^$$"); \
|
||||||
do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}"; done ; \
|
do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}"; done ; \
|
||||||
printf "$$feat" > $@
|
printf "$$feat" > $@
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
# The sed line is to prepend the directory to all source files
|
# The sed line is to prepend the directory to all source files
|
||||||
|
|
||||||
preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c -include config.h $(1) | \
|
preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c -include config.h $(1) | \
|
||||||
grep -v '^\#' | grep -v "^ *$$" | \
|
grep -v '^#' | grep -v "^ *$$" | \
|
||||||
sed -e 's:^..*:$(dir $(1))&:')
|
sed -e 's:^..*:$(dir $(1))&:')
|
||||||
|
|
||||||
preprocess2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \
|
preprocess2file = $(shell $(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \
|
||||||
grep -v '^\#' | grep -v "^$$" > $(2)
|
grep -v '^#' | grep -v "^$$" > $(2))
|
||||||
|
|
||||||
asmdefs2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \
|
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)
|
perl -ne 'if(/^_?AD_(\w+):$$/){$$var=$$1}else{/^\W\.(?:word|long)\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $(2)
|
||||||
|
|
|
@ -11,4 +11,4 @@
|
||||||
|
|
||||||
SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
||||||
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - 2>/dev/null \
|
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - 2>/dev/null \
|
||||||
| grep -v "^\#")
|
| grep -v "^#")
|
||||||
|
|
|
@ -8,7 +8,7 @@ LDFLAGS=-lgcc -Os -nostdlib -T$(TMP_LDS) -Wl,-Map,$(TMP_MAP) $(INCLUDES) -L$(BUI
|
||||||
|
|
||||||
SRC:=$(shell cat $(ROOT_DIR)/SOURCES | $(CC) $(INCLUDES) \
|
SRC:=$(shell cat $(ROOT_DIR)/SOURCES | $(CC) $(INCLUDES) \
|
||||||
$(DEFINES) -E -P -include "config.h" - 2>/dev/null \
|
$(DEFINES) -E -P -include "config.h" - 2>/dev/null \
|
||||||
| grep -v "^\#")
|
| grep -v "^#")
|
||||||
SRC:=$(foreach src,$(SRC),$(BUILD_DIR)/$(src))
|
SRC:=$(foreach src,$(SRC),$(BUILD_DIR)/$(src))
|
||||||
OBJ=$(SRC:.c=.o)
|
OBJ=$(SRC:.c=.o)
|
||||||
OBJ:=$(OBJ:.S=.o)
|
OBJ:=$(OBJ:.S=.o)
|
||||||
|
|
Loading…
Reference in a new issue