diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2023-03-14 13:05:49 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2023-03-21 04:48:31 -0400 |
commit | ed7ab52e273e8fcf61c6e95ec28c392ff9ed4023 (patch) | |
tree | f15515091b8fc3908a32adf3702ae4b3ec13e8e9 | |
parent | 977bc698db176c1886b2d716e8ef4d90a45f335e (diff) | |
download | rockbox-ed7ab52e273e8fcf61c6e95ec28c392ff9ed4023.tar.gz rockbox-ed7ab52e273e8fcf61c6e95ec28c392ff9ed4023.zip |
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
-rw-r--r-- | apps/apps.make | 2 | ||||
-rw-r--r-- | manual/Makefile | 2 | ||||
-rw-r--r-- | tools/functions.make | 6 | ||||
-rw-r--r-- | tools/makesrc.inc | 2 | ||||
-rw-r--r-- | utils/hwstub/stub/hwstub.make | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/apps/apps.make b/apps/apps.make index 6afcd12b5c..47b015bc92 100644 --- a/apps/apps.make +++ b/apps/apps.make | |||
@@ -24,7 +24,7 @@ $(BUILDDIR)/apps/features: $(APPSDIR)/features.txt $(BUILDDIR)/firmware/common/ | |||
24 | $(call PRINTS,PP $(<F)) | 24 | $(call PRINTS,PP $(<F)) |
25 | $(SILENT)$(CC) $(PPCFLAGS) \ | 25 | $(SILENT)$(CC) $(PPCFLAGS) \ |
26 | -E -P -imacros "config.h" -imacros "button.h" -x c $< | \ | 26 | -E -P -imacros "config.h" -imacros "button.h" -x c $< | \ |
27 | grep -v "^\#" | grep -v "^ *$$" > $(BUILDDIR)/apps/features; \ | 27 | grep -v "^#" | grep -v "^ *$$" > $(BUILDDIR)/apps/features; \ |
28 | 28 | ||
29 | $(BUILDDIR)/apps/genlang-features: $(BUILDDIR)/apps/features | 29 | $(BUILDDIR)/apps/genlang-features: $(BUILDDIR)/apps/features |
30 | $(call PRINTS,GEN $(subst $(BUILDDIR)/,,$@))tr \\n : < $< > $@ | 30 | $(call PRINTS,GEN $(subst $(BUILDDIR)/,,$@))tr \\n : < $< > $@ |
diff --git a/manual/Makefile b/manual/Makefile index e1d3c1fb81..6718085e30 100644 --- a/manual/Makefile +++ b/manual/Makefile | |||
@@ -59,7 +59,7 @@ $(OBJDIR)/features.tex: $(ROOTDIR)/apps/features.txt | |||
59 | $(SILENT) for f in \ | 59 | $(SILENT) for f in \ |
60 | $$(cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ | 60 | $$(cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ |
61 | $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" \ | 61 | $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" \ |
62 | -imacros "button.h" - | grep -v "^\#" | grep -v "^$$"); \ | 62 | -imacros "button.h" - | grep -v "^#" | grep -v "^$$"); \ |
63 | do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}"; done ; \ | 63 | do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}"; done ; \ |
64 | printf "$$feat" > $@ | 64 | printf "$$feat" > $@ |
65 | 65 | ||
diff --git a/tools/functions.make b/tools/functions.make index 518b945320..d9acbba2ba 100644 --- a/tools/functions.make +++ b/tools/functions.make | |||
@@ -15,11 +15,11 @@ | |||
15 | # The sed line is to prepend the directory to all source files | 15 | # The sed line is to prepend the directory to all source files |
16 | 16 | ||
17 | preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c -include config.h $(1) | \ | 17 | preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c -include config.h $(1) | \ |
18 | grep -v '^\#' | grep -v "^ *$$" | \ | 18 | grep -v '^#' | grep -v "^ *$$" | \ |
19 | sed -e 's:^..*:$(dir $(1))&:') | 19 | sed -e 's:^..*:$(dir $(1))&:') |
20 | 20 | ||
21 | preprocess2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \ | 21 | preprocess2file = $(shell $(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \ |
22 | grep -v '^\#' | grep -v "^$$" > $(2) | 22 | grep -v '^#' | grep -v "^$$" > $(2)) |
23 | 23 | ||
24 | asmdefs2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \ | 24 | asmdefs2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \ |
25 | perl -ne 'if(/^_?AD_(\w+):$$/){$$var=$$1}else{/^\W\.(?:word|long)\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $(2) | 25 | perl -ne 'if(/^_?AD_(\w+):$$/){$$var=$$1}else{/^\W\.(?:word|long)\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $(2) |
diff --git a/tools/makesrc.inc b/tools/makesrc.inc index 846df8cb9e..55c1bbe98d 100644 --- a/tools/makesrc.inc +++ b/tools/makesrc.inc | |||
@@ -11,4 +11,4 @@ | |||
11 | 11 | ||
12 | SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ | 12 | SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ |
13 | $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - 2>/dev/null \ | 13 | $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - 2>/dev/null \ |
14 | | grep -v "^\#") | 14 | | grep -v "^#") |
diff --git a/utils/hwstub/stub/hwstub.make b/utils/hwstub/stub/hwstub.make index d51ca1df95..3938b0b070 100644 --- a/utils/hwstub/stub/hwstub.make +++ b/utils/hwstub/stub/hwstub.make | |||
@@ -8,7 +8,7 @@ LDFLAGS=-lgcc -Os -nostdlib -T$(TMP_LDS) -Wl,-Map,$(TMP_MAP) $(INCLUDES) -L$(BUI | |||
8 | 8 | ||
9 | SRC:=$(shell cat $(ROOT_DIR)/SOURCES | $(CC) $(INCLUDES) \ | 9 | SRC:=$(shell cat $(ROOT_DIR)/SOURCES | $(CC) $(INCLUDES) \ |
10 | $(DEFINES) -E -P -include "config.h" - 2>/dev/null \ | 10 | $(DEFINES) -E -P -include "config.h" - 2>/dev/null \ |
11 | | grep -v "^\#") | 11 | | grep -v "^#") |
12 | SRC:=$(foreach src,$(SRC),$(BUILD_DIR)/$(src)) | 12 | SRC:=$(foreach src,$(SRC),$(BUILD_DIR)/$(src)) |
13 | OBJ=$(SRC:.c=.o) | 13 | OBJ=$(SRC:.c=.o) |
14 | OBJ:=$(OBJ:.S=.o) | 14 | OBJ:=$(OBJ:.S=.o) |