Browse code

- 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 authored on 26/06/2008 09:08:53
Showing 1 changed files
... ...
@@ -1,6 +1,7 @@
1 1
 # $Id$
2 2
 
3 3
 include ../../Makefile.defs
4
+include ../../Makefile.targets
4 5
 
5 6
 auto_gen=
6 7
 NAME=sercmd
... ...
@@ -8,7 +9,17 @@ RELEASE=0.1
8 8
 
9 9
 readline_locations= /usr/include/readline/readline.h \
10 10
 					$(LOCALBASE)/include/readline/readline.h
11
+
11 12
 use_readline ?=
13
+ifneq (,$(MAKECMDGOALS))
14
+ifeq (,$(filter-out $(nodep_targets),$(MAKECMDGOALS)))
15
+#set it to empty, we don't need to detect/use it for clean, doc a.s.o
16
+override use_readline:=
17
+quiet=1
18
+endif
19
+endif #ifneq (,$(MAKECMDGOALS))
20
+
21
+
12 22
 
13 23
 DEFS:= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' \
14 24
 		$(filter -D%HAVE -DARCH% -DOS% -D__CPU% -D__OS%, $(DEFS))
... ...
@@ -34,6 +45,7 @@ endif
34 34
 include ../../Makefile.sources
35 35
 include ../../Makefile.rules
36 36
 
37
+ifeq (,$(quiet))
37 38
 ifeq ($(use_readline),1)
38 39
 $(info readline detected ($(readline_path)) )
39 40
 $(info command completion enabled)
... ...
@@ -42,6 +54,7 @@ $(info "no readline include files detected, disabling readline support")
42 42
 $(info "command completion disabled" )
43 43
 $(info "to force readline support try 'make use_readline=1'")
44 44
 endif
45
+endif # ifeq (,$(quiet))
45 46
 
46 47
 $(NAME).o: 
47 48