diff options
Diffstat (limited to 'libdm/make.tmpl.in')
-rw-r--r-- | libdm/make.tmpl.in | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in index a306101d5..f1c88fac0 100644 --- a/libdm/make.tmpl.in +++ b/libdm/make.tmpl.in @@ -13,11 +13,9 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -ifeq ($(V),1) - Q= -else - Q=@ -endif +V ?= $(if ("@SILENT_RULES@","yes"),,1) +Q := $(if $(V),,@) +SHOW := $(if $(V),@true,@echo) SHELL = @SHELL@ @@ -129,6 +127,17 @@ DEFAULT_RUN_DIR = @DEFAULT_RUN_DIR@ DEFAULT_PID_DIR = @DEFAULT_PID_DIR@ DEFAULT_MANGLING = @MANGLING@ +#---------------------------------------------------------------------- +# From http://blog.melski.net/tag/debugging-makefiles/ +# +# Usage: make print-CC print-CXX print-LD +#---------------------------------------------------------------------- +print-%: + @echo '$*=$($*)' + @echo ' origin = $(origin $*)' + @echo ' flavor = $(flavor $*)' + @echo ' value = $(value $*)' + # Setup vpath search paths for some suffixes vpath %.c $(srcdir) vpath %.cpp $(srcdir) @@ -145,6 +154,10 @@ ifndef MAKEFLAGS MAKEFLAGS = @JOBS@ endif +ifneq (1, $(firstword $(V))) +MAKEFLAGS += --no-print-directory +endif + # Handle installation of files ifeq ("@WRITE_INSTALL@", "yes") # leaving defaults @@ -524,6 +537,7 @@ endif ifeq ("@USE_TRACKING@","yes") ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov \ help check check_local check_cluster check_lvmpolld)) +.SECONDARY: # Note: no tabs before -include -include $(SOURCES:.c=.d) $(SOURCES2:.c=.d) $(CXXSOURCES:.cpp=.d) endif |