Browse code

- more darwin build with libs fixes (works now) - sercmd is no longer force-rebuilt every time

Andrei Pelinescu-Onciul authored on 25/05/2007 15:50:11
Showing 4 changed files
... ...
@@ -501,8 +501,8 @@ install-modules-all: install-modules install-modules-doc
501 501
 install-doc: $(doc_prefix)/$(doc_dir) install-modules-doc
502 502
 	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/INSTALL 
503 503
 	$(INSTALL_DOC) INSTALL $(doc_prefix)/$(doc_dir)
504
-	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/README_MODULES 
505
-	$(INSTALL_DOC) README_MODULES $(doc_prefix)/$(doc_dir)
504
+	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/README-MODULES 
505
+	$(INSTALL_DOC) README-MODULES $(doc_prefix)/$(doc_dir)
506 506
 	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/AUTHORS 
507 507
 	$(INSTALL_DOC) AUTHORS $(doc_prefix)/$(doc_dir)
508 508
 	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/NEWS
... ...
@@ -31,12 +31,6 @@ ifeq ($(BUGFIX_VER),)
31 31
 	BUGFIX_VER:=0
32 32
 endif
33 33
 
34
-ifeq	($(strip $(compile_for_install)),yes)
35
-	LIB_INSTALL_NAME:=$(lib_target)/$(LIB_RUNTIME_NAME)
36
-else
37
-	LIB_INSTALL_NAME:=$(shell pwd)/$(LIB_RUNTIME_NAME)
38
-endif
39
-
40 34
 ifeq ($(OS), darwin)
41 35
 	LIB_NAME:= \
42 36
 	$(LIB_PREFIX)$(NAME).$(MAJOR_VER).$(MINOR_VER).$(BUGFIX_VER)$(LIB_SUFFIX)
... ...
@@ -48,7 +42,7 @@ ifeq ($(OS), darwin)
48 48
 	# path to a linked library is taken from the library itself (the path
49 49
 	# is built-in the library)
50 50
 	LIBINAME_F:=libiname.lst
51
-	NAME_LD_FLAGS:= -compatibility_version $(MAJOR_VER).$(MINOR_VER) \
51
+	NAME_LD_FLAGS= -compatibility_version $(MAJOR_VER).$(MINOR_VER) \
52 52
 					-current_version $(MAJOR_VER).$(MINOR_VER).$(BUGFIX_VER) \
53 53
 					-install_name $(LIB_INSTALL_NAME)
54 54
 
... ...
@@ -56,10 +50,16 @@ else
56 56
 	LIB_NAME:=$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX).$(MAJOR_VER).$(MINOR_VER)
57 57
 	LIB_RUNTIME_NAME:=$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX).$(MAJOR_VER)
58 58
 	LIB_LINK_NAME:=$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
59
-	NAME_LD_FLAGS:= $(LIB_SONAME)$(LIB_RUNTIME_NAME)
59
+	NAME_LD_FLAGS= $(LIB_SONAME)$(LIB_RUNTIME_NAME)
60 60
 	LIBINAME_F:=
61 61
 endif
62 62
 
63
+ifeq	($(strip $(compile_for_install)),yes)
64
+	LIB_INSTALL_NAME:=$(lib_target)/$(LIB_RUNTIME_NAME)
65
+else
66
+	LIB_INSTALL_NAME:=$(shell pwd)/$(LIB_RUNTIME_NAME)
67
+endif
68
+
63 69
 
64 70
 COREPATH ?=../..
65 71
 
... ...
@@ -35,8 +35,8 @@
35 35
 # on some ser libs)
36 36
 
37 37
 ifneq	($(SER_LIBS),)
38
-# realpath doesn't seem to work on darwin
39
-SER_LIBS_DIRS:=$(abspath $(dir $(SER_LIBS)))
38
+# abspath & realpath don't seem to work on darwin
39
+SER_LIBS_DIRS:=$(dir $(SER_LIBS))
40 40
 ifneq	(,$(filter install install% %install, $(MAKECMDGOALS)))
41 41
 lib_compile_for_install=yes
42 42
 expected_lib_ipath=$(lib_target)
... ...
@@ -78,7 +78,7 @@ ALL_LIBS+=$(foreach l, $(SER_LIBS), -L$(dir $l) -l$(notdir $l))
78 78
 $(NAME): $(SER_LIBS_DEPS) librpath.lst
79 79
 
80 80
 $(SER_LIBS_DEPS):
81
-	$(MAKE) -C $(dir $@)  compile_for_install=$(lib_compile_for_install)
81
+	$(MAKE) -wC $(dir $@)  compile_for_install=$(lib_compile_for_install)
82 82
 
83 83
 
84 84
 ifneq ($(SER_IPATH_LST),)
... ...
@@ -86,12 +86,13 @@ ifneq ($(SER_IPATH_LST),)
86 86
 $(NAME): $(SER_IPATH_LST) 
87 87
 
88 88
 $(SER_IPATH_LST): FORCE
89
-	@if grep "COMPILED_INAME:=$(call expected_lib_ipath,$(@D))" $(@) \
90
-			1>/dev/null 2>/dev/null ; \
89
+	@if grep \
90
+		"COMPILED_INAME:=$(call expected_lib_ipath,$(shell cd $(@D); pwd))" \
91
+		$(@) 1>/dev/null 2>/dev/null ; \
91 92
 	then :; \
92 93
 	else \
93 94
 		echo "re-building $(@D)" ; \
94
-		$(MAKE) -C $(@D) compile_for_install=$(lib_compile_for_install) ; \
95
+		$(MAKE) -wC $(@D) compile_for_install=$(lib_compile_for_install) ; \
95 96
 	fi
96 97
 
97 98
 .PHONY: FORCE
... ...
@@ -101,7 +102,7 @@ FORCE:
101 101
 FORCE-BUILD-LIBS:
102 102
 	@for r in $(SER_LIBS_DIRS) ; do \
103 103
 		echo building lib $$r; \
104
-		$(MAKE) -C $$r compile_for_install=$(lib_compile_for_install) ; \
104
+		$(MAKE) -wC $$r compile_for_install=$(lib_compile_for_install) ; \
105 105
 	done
106 106
 
107 107
 endif
... ...
@@ -132,7 +133,7 @@ clean:
132 132
 		if [ -d "$$r" ]; then \
133 133
 			echo "module $$r" ; \
134 134
 			$(MAKE) -C $$r clean ; \
135
-		        $(MAKE) -C $$r/doc clean ; \
135
+			$(MAKE) -C $$r/doc clean ; \
136 136
 		fi ; \
137 137
 	done 
138 138
 	@if [ -n "$(modules)" ]; then \
... ...
@@ -31,11 +31,19 @@ ifeq ($(use_readline),1)
31 31
 endif
32 32
 
33 33
 
34
-
35 34
 include ../../Makefile.sources
36 35
 include ../../Makefile.rules
37 36
 
38
-$(NAME).o: msg
37
+ifeq ($(use_readline),1)
38
+$(info readline detected ($(readline_path)) )
39
+$(info command completion enabled)
40
+else
41
+$(info "no readline include files detected, disabling readline support")
42
+$(info "command completion disabled" )
43
+$(info "(to force readline support try 'make use_readline=1')")
44
+endif
45
+
46
+$(NAME).o: 
39 47
 
40 48
 .PHONY: msg
41 49
 msg: