Jelajahi Sumber

- don't try to autodetect libreadline for a no-build target
(e.g. clean). It uses Makefile.targets to get the list of no code-building
targets.

Andrei Pelinescu-Onciul 17 tahun lalu
induk
melakukan
1d1e18c1b3
1 mengubah file dengan 13 tambahan dan 0 penghapusan
  1. 13 0
      utils/sercmd/Makefile

+ 13 - 0
utils/sercmd/Makefile

@@ -1,6 +1,7 @@
 # $Id$
 
 include ../../Makefile.defs
+include ../../Makefile.targets
 
 auto_gen=
 NAME=sercmd
@@ -8,7 +9,17 @@ RELEASE=0.1
 
 readline_locations= /usr/include/readline/readline.h \
 					$(LOCALBASE)/include/readline/readline.h
+
 use_readline ?=
+ifneq (,$(MAKECMDGOALS))
+ifeq (,$(filter-out $(nodep_targets),$(MAKECMDGOALS)))
+#set it to empty, we don't need to detect/use it for clean, doc a.s.o
+override use_readline:=
+quiet=1
+endif
+endif #ifneq (,$(MAKECMDGOALS))
+
+
 
 DEFS:= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' \
 		$(filter -D%HAVE -DARCH% -DOS% -D__CPU% -D__OS%, $(DEFS))
@@ -34,6 +45,7 @@ endif
 include ../../Makefile.sources
 include ../../Makefile.rules
 
+ifeq (,$(quiet))
 ifeq ($(use_readline),1)
 $(info readline detected ($(readline_path)) )
 $(info command completion enabled)
@@ -42,6 +54,7 @@ $(info "no readline include files detected, disabling readline support")
 $(info "command completion disabled" )
 $(info "to force readline support try 'make use_readline=1'")
 endif
+endif # ifeq (,$(quiet))
 
 $(NAME).o: