Skip to contentSkip to conversation

build: delete useless characters

PATCH In review Arturo Borrero Gonzalez 3 participants 5 messages Apr 16, 2014 – Apr 18, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: delete useless characters

There are a lot of '-e' that seem useless in the build system.

Previous to this patch:
[...]
-e CC src/evaluate.c
-e CC src/expression.c
-e CC src/proto.c
[...]

With this patch:
[...]
CC src/evaluate.c
CC src/expression.c
CC src/proto.c
[...]

---
 Makefile.rules.in |   20 ++++++++++----------
 doc/Makefile.in   |    4 ++--
 files/Makefile.in |    2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)
Makefile.rules.in +10 -10
index 6a00916..53ba7e9 100644
@@ -12,16 +12,16 @@ configure:		configure.ac
 			sh configure
 
 %.o:			%.c	$(makedeps)
-			@echo -e "  CC\t\t$<"
+			@echo	"  CC\t\t$<"
 			$(CC) $(CFLAGS) -c -o $@ $<
 
 .%.d:			%.c	$(makedeps)
-			@echo -e "  DEP\t\t$<"
+			@echo	"  DEP\t\t$<"
 			$(RM) $@
 			$(CC) -M $(CFLAGS) $< | sed 's,$(*F)\.o[ :]*,$*.o $@ : ,g' > $@
 
 %.c %.h:		%.y	$(makedeps)
-			@echo -e "  YACC\t\t$<"
+			@echo	"  YACC\t\t$<"
 			$(YACC) $(YACCFLAGS) --defines=$*.h.tmp -o $@ $<
 			( \
 				echo "#ifndef __$(*F)_H"; \
@@ -32,15 +32,15 @@ configure:		configure.ac
 			$(RM) $*.h.tmp
 
 %.c %.h:		%.l	$(makedeps)
-			@echo -e "  LEX\t\t$<"
+			@echo	"  LEX\t\t$<"
 			$(LEX) -t --header-file=$(<:.l=.h) $< > $@
 
 %.8:			%.xml	$(makedeps)
-			@echo -e "  MAN\t\t$@"
+			@echo	"  MAN\t\t$@"
 			(cd $(SUBDIR); $(DB2MAN) --xinclude ../$<)
 
 %.pdf:			%.xml	$(makedeps)
-			@echo -e "  PDF\t\t$@"
+			@echo	"  PDF\t\t$@"
 			dblatex -q -t pdf -o $@ $<
 
 archive:
@@ -54,19 +54,19 @@ $(1)-extra-clean-files	:= $$(patsubst %,$(SUBDIR)%,$$($(1)-extra-clean-files))
 depfiles		:= $$(patsubst $(SUBDIR)%.o,$(SUBDIR).%.d,$$($(1)-obj))
 
 $(SUBDIR)$(1):		$$($(1)-extra-targets) $$($(1)-obj)
-			@echo -e "  LD\t\t$$@"
+			@echo	"  LD\t\t$$@"
 			$$(CC) $$($(1)-obj) $$(LDFLAGS) -o $$@
 all_targets		+= $(SUBDIR)$(1)
 
 .PHONY:			$(1)-clean
 $(1)-clean:
-			@echo -e "  CLEAN\t\t$(1)"
+			@echo	"  CLEAN\t\t$(1)"
 			$$(RM) $$($(1)-obj) $$(depfiles) $$($(1)-extra-clean-files) $(SUBDIR)$(1)
 clean_targets		+= $(1)-clean
 
 .PHONY:			$(1)-install
 $(1)-install:
-			@echo -e "  INSTALL\t$1"
+			@echo	"  INSTALL\t$1"
 			$(MKDIR_P) $$(DESTDIR)/$$($(1)-destdir)
 			$(INSTALL) -m 755 -p \
 				$(SUBDIR)$(1) \
@@ -92,5 +92,5 @@ install:		all $(SUBDIRS) $(install_targets)
 
 .PHONY: $(SUBDIRS)
 $(SUBDIRS):
-			@echo -e "  SUBDIR\t$@/"
+			@echo	"  SUBDIR\t$@/"
 			@$(MAKE) -s -f Makefile.rules $(MAKECMDGOALS) SUBDIR="$@/" SUBDIRS=""
doc/Makefile.in +2 -2
index 1ec856c..660172d 100644
@@ -3,11 +3,11 @@ pdfdocs-@CONFIG_PDF@	+= doc/nft.pdf
 
 all:		$(mandocs-y) $(pdfdocs-y)
 clean:
-		@echo -e "  CLEAN\t\tdoc"
+		@echo	"  CLEAN\t\tdoc"
 		$(RM) $(mandocs-y) $(pdfdocs-y)
 
 install:	$(mandocs-y) $(pdfdocs-y)
-		@echo -e "  INSTALL\tdoc"
+		@echo	"  INSTALL\tdoc"
 		if test -n "$(mandocs-y)"; then \
 			$(MKDIR_P) $(DESTDIR)/${mandir}/man8 ;\
 			$(INSTALL) -m 755 -p $(mandocs-y) \
files/Makefile.in +1 -1
index dc237e2..1b6dbc2 100644
@@ -1,5 +1,5 @@
 install:
-	@echo -e "  INSTALL\tfiles"
+	@echo	"  INSTALL\tfiles"
 	$(MKDIR_P) $(DESTDIR)/$(confdir)
 	$(INSTALL) -m 755 -p $(SUBDIR)nftables/* $(DESTDIR)/$(confdir)/
 	$(SED) -i "s~#\! nft~#\!@sbindir@/nft~" $(DESTDIR)/$(confdir)/*
#1 lore raw
Quoted 10 lines · Arturo Borrero Gonzalez

There are a lot of '-e' that seem useless in the build system.

Previous to this patch:
[...]
-e CC src/evaluate.c
-e CC src/expression.c
-e CC src/proto.c
[...]

Quoted 6 lines

With this patch:
[...]
CC src/evaluate.c
CC src/expression.c
CC src/proto.c
[...]

I assume you're on debian? The -e is needed to interpret the backslash sequences like \t. Something is broken about the echo command in debian, I'd assume its using the shell internal one instead of /bin/echo.

This needs to be fixed differently:

CC\t\tsrc/main.c
CC\t\tsrc/cli.c
CC\t\tsrc/rule.c
CC\t\tsrc/statement.c
CC\t\tsrc/datatype.c
CC\t\tsrc/expression.c
CC\t\tsrc/evaluate.c
CC\t\tsrc/proto.c
CC\t\tsrc/payload.c
CC\t\tsrc/exthdr.c
CC\t\tsrc/meta.c
CC\t\tsrc/ct.c
CC\t\tsrc/netlink.c
CC\t\tsrc/netlink_linearize.c
CC\t\tsrc/netlink_delinearize.c
CC\t\tsrc/segtree.c
CC\t\tsrc/rbtree.c
CC\t\tsrc/gmputil.c
CC\t\tsrc/utils.c
CC\t\tsrc/erec.c
CC\t\tsrc/mnl.c
CC\t\tsrc/hipac.c
CC\t\tsrc/parser.c
CC\t\tsrc/scanner.c

#2 lore raw
Quoted 5 lines · Patrick McHardy

I assume you're on debian? The -e is needed to interpret the backslash sequences like \t. Something is broken about the echo command in debian, I'd assume its using the shell internal one instead of /bin/echo.

Yes, you are right. Then forget this patch.

I was reading a bit the build system, wondering how to get the actual form of the CC commands.

regards.

Signature · 5 lines
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 11 lines · Arturo Borrero Gonzalez
Quoted 5 lines · Patrick McHardy

I assume you're on debian? The -e is needed to interpret the backslash sequences like \t. Something is broken about the echo command in debian, I'd assume its using the shell internal one instead of /bin/echo.

Yes, you are right. Then forget this patch.

I was reading a bit the build system, wondering how to get the actual form of the CC commands.

Try using the full path to echo perhaps.

#4 lore raw
Quoted 8 lines · Patrick McHardy
Quoted 7 lines · Arturo Borrero Gonzalez
Quoted 5 lines · Patrick McHardy

I assume you're on debian? The -e is needed to interpret the backslash sequences like \t. Something is broken about the echo command in debian, I'd assume its using the shell internal one instead of /bin/echo.

Quoted 6 lines
Quoted 4 lines

Yes, you are right. Then forget this patch.

I was reading a bit the build system, wondering how to get the actual form of the CC commands.

Try using the full path to echo perhaps.

What about the automake patch I sent some months back? It would address the issue in a fashion that's also compatible with variants of sh/echo that do not support -e/-n.