summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cmds20
-rw-r--r--Makefile8
2 files changed, 20 insertions, 8 deletions
diff --git a/Cmds b/Cmds
index 6f030c4..1b2719a 100644
--- a/Cmds
+++ b/Cmds
@@ -5,9 +5,14 @@ Q = @
SHELL := $(shell if [ -x /bin/bash ]; then echo /bin/bash; else echo /bin/sh; fi)
# Compiler related stuff
-LDQ = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CC)
CCNQ = $(CCACHE) $(CC)
-CCQ = $(Q)echo -e " CC\t$<" && $(CCNQ)
+ifeq ($(Q),)
+ LDQ = $(CCACHE) $(CC)
+ CCQ = $(CCNQ)
+else
+ LDQ = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CC)
+ CCQ = $(Q)echo -e " CC\t$<" && $(CCNQ)
+endif
# sparse related
C =
@@ -18,8 +23,15 @@ else
endif
# Flex/bison related
-LEX = $(Q)echo -e " LEX\t$<" && flex
-YACC = $(Q)echo -e " YACC\t$<" && bison
+LEX = flex
+YACC = bison
+ifeq ($(Q),)
+ LEXQ = $(LEX)
+ YACCQ = $(YACC)
+else
+ LEXQ = $(Q)echo -e " LEX\t$<" && $(LEX)
+ YACCQ = $(Q)echo -e " YAAC\t$<" && $(YACC)
+endif
# Installation related
INST = echo -e " INST\t$(1)" && install -d $(2) && \
diff --git a/Makefile b/Makefile
index 34d64c2..faaafe8 100644
--- a/Makefile
+++ b/Makefile
@@ -175,11 +175,11 @@ install_allbutmausezahn: $(foreach tool,$(filter-out mausezahn,$(TOOLS)),$(tool)
uninstall: $(foreach tool,$(TOOLS),$(tool)_uninstall)
%.yy.o: %.l
- $(LEX) -P $(shell perl -wlne 'print $$1 if /lex-func-prefix:\s([a-z]+)/' $<) \
- -o $(BUILD_DIR)/$(shell basename $< .l).yy.c $(LEX_FLAGS) $<
+ $(LEXQ) -P $(shell perl -wlne 'print $$1 if /lex-func-prefix:\s([a-z]+)/' $<) \
+ -o $(BUILD_DIR)/$(shell basename $< .l).yy.c $(LEX_FLAGS) $<
%.tab.o: %.y
- $(YACC) -p $(shell perl -wlne 'print $$1 if /yacc-func-prefix:\s([a-z]+)/' $<) \
- -o $(BUILD_DIR)/$(shell basename $< .y).tab.c $(YAAC_FLAGS) -d $<
+ $(YACCQ) -p $(shell perl -wlne 'print $$1 if /yacc-func-prefix:\s([a-z]+)/' $<) \
+ -o $(BUILD_DIR)/$(shell basename $< .y).tab.c $(YAAC_FLAGS) -d $<
$(foreach tool,$(TOOLS),$(eval $(call TOOL_templ,$(tool))))