1 # -*- makefile -*- Time-stamp: <07/12/12 01:52:19 ptr>
3 # Copyright (c) 1997-1999, 2002, 2003, 2005-2007
6 # Portion Copyright (c) 1999-2001
7 # Parallel Graphics Ltd.
9 # Licensed under the Academic Free License version 3.0
14 ifndef _NO_SHARED_BUILD
15 INSTALL_TAGS
:= install-release-shared
21 INSTALL_TAGS
+= install-release-static
25 ifndef _NO_SHARED_BUILD
26 INSTALL_TAGS
+= install-dbg-shared
29 INSTALL_TAGS
+= install-dbg-static
33 ifndef _NO_STLDBG_BUILD
34 ifndef WITHOUT_STLPORT
35 ifndef _NO_SHARED_BUILD
36 INSTALL_TAGS
+= install-stldbg-shared
39 INSTALL_TAGS
+= install-stldbg-static
47 ifndef INSTALL_STRIP_TAGS
49 ifndef _NO_SHARED_BUILD
50 INSTALL_STRIP_TAGS
:= install-strip-shared
56 INSTALL_STRIP_TAGS
+= install-release-static
60 ifndef _NO_SHARED_BUILD
61 INSTALL_STRIP_TAGS
+= install-dbg-shared
64 INSTALL_STRIP_TAGS
+= install-dbg-static
68 ifndef _NO_STLDBG_BUILD
69 ifndef WITHOUT_STLPORT
70 ifndef _NO_SHARED_BUILD
71 INSTALL_STRIP_TAGS
+= install-stldbg-shared
74 INSTALL_STRIP_TAGS
+= install-stldbg-static
82 PHONY
+= install install-strip install-headers
$(INSTALL_TAGS
) $(INSTALL_STRIP_TAGS
)
84 install: $(INSTALL_TAGS
) install-headers
86 install-strip
: $(INSTALL_STRIP_TAGS
) install-headers
88 # Workaround for GNU make 3.80; see comments in rules-so.mak
89 define do_install_so_links
90 $${INSTALL_LIB_DIR
$(1)}/$${SO_NAME
$(1)xxx
}: $${SO_NAME_OUT
$(1)xxx
}
91 $$(INSTALL_SO
) $${SO_NAME_OUT
$(1)xxx
} $$(INSTALL_LIB_DIR
$(1))
92 @
$(call do_so_links_1
,$$(INSTALL_LIB_DIR
$(1)),$${SO_NAME
$(1)xx
},$${SO_NAME
$(1)xxx
})
93 @
$(call do_so_links_1
,$$(INSTALL_LIB_DIR
$(1)),$${SO_NAME
$(1)x
},$${SO_NAME
$(1)xx
})
94 @
$(call do_so_links_1
,$$(INSTALL_LIB_DIR
$(1)),$${SO_NAME
$(1)},$${SO_NAME
$(1)x
})
97 # Workaround for GNU make 3.80; see comments in rules-so.mak
98 define do_install_so_links_wk
99 # expand to nothing, if equal
100 ifneq (${INSTALL_LIB_DIR}/${SO_NAMExxx},${INSTALL_LIB_DIR_STLDBG}/${SO_NAME_STLDBGxxx})
101 # expand to nothing, if WITHOUT_STLPORT
102 ifndef WITHOUT_STLPORT
103 $(call do_install_so_links
,$(1))
108 # Workaround for GNU make 3.80; see comments in rules-so.mak
109 define do_install_so_links_wk2
110 # expand to nothing, if equal
111 ifneq (${INSTALL_LIB_DIR}/${SO_NAMExxx},${INSTALL_LIB_DIR_DBG}/${SO_NAME_DBGxxx})
112 $(call do_install_so_links
,$(1))
117 $(eval
$(call do_install_so_links
,))
118 # ifneq (${INSTALL_LIB_DIR}/${SO_NAMExxx},${INSTALL_LIB_DIR_DBG}/${SO_NAME_DBGxxx})
119 # $(eval $(call do_install_so_links,_DBG))
120 $(eval
$(call do_install_so_links_wk2
,_DBG
))
122 # ifneq (${INSTALL_LIB_DIR}/${SO_NAMExxx},${INSTALL_LIB_DIR_STLDBG}/${SO_NAME_STLDBGxxx})
123 # ifndef WITHOUT_STLPORT
124 $(eval
$(call do_install_so_links_wk
,_STLDBG
))
128 install-release-shared
: release-shared
$(INSTALL_LIB_DIR
) $(INSTALL_LIB_DIR
)/${SO_NAMExxx} install-headers
131 install-strip-shared
: release-shared
$(INSTALL_LIB_DIR
) $(INSTALL_LIB_DIR
)/${SO_NAMExxx} install-headers
132 ${STRIP} ${_SO_STRIP_OPTION} $(INSTALL_LIB_DIR
)/${SO_NAMExxx}
135 install-dbg-shared
: dbg-shared
$(INSTALL_LIB_DIR_DBG
) $(INSTALL_LIB_DIR_DBG
)/${SO_NAME_DBGxxx}
138 ifndef WITHOUT_STLPORT
139 install-stldbg-shared
: stldbg-shared
$(INSTALL_LIB_DIR_STLDBG
) $(INSTALL_LIB_DIR_STLDBG
)/${SO_NAME_STLDBGxxx}
140 ${POST_INSTALL_STLDBG}
143 define do_install_headers
144 if
[ ! -d
$(INSTALL_HDR_DIR
) ]; then \
145 $(INSTALL_D
) $(INSTALL_HDR_DIR
) ||
{ echo
"Can't create $(INSTALL_HDR_DIR)"; exit
1; }; \
147 for dd in
$(HEADERS_BASE
); do \
150 f
=`cd $$d; find $$h \( -wholename "*/.svn" -prune \) -o \( -type d -print \)`; \
152 if
[ ! -d
$(INSTALL_HDR_DIR
)/$$ddd ]; then \
153 $(INSTALL_D
) $(INSTALL_HDR_DIR
)/$$ddd ||
{ echo
"Can't create $(INSTALL_HDR_DIR)/$$ddd"; exit
1; }; \
156 f
=`find $$dd \( -wholename "*/.svn*" -o -name "*~" -o -name "*.bak" \) -prune -o \( -type f -print \)`; \
158 h
=`echo $$ff | sed -e "s|$$d|$(INSTALL_HDR_DIR)|"`; \
159 $(INSTALL_F
) $$ff $$h; \
162 for f in
$(HEADERS
); do \
164 $(INSTALL_F
) $$f $(INSTALL_HDR_DIR
)/$$h ||
{ echo
"Can't install $(INSTALL_HDR_DIR)/$$h"; exit
1; }; \
168 # find $$dd \( -type f \( \! \( -wholename "*/.svn*" -o -name "*~" -o -name "*.bak" \) \) \) -print
169 # _HEADERS_FROM = $(shell for dd in $(HEADERS_BASE); do find $$dd \( -type f \( \! \( -wholename "*/.svn/*" -o -name "*~" -o -name "*.bak" \) \) \) -print ; done )
170 # _HEADERS_TO = $(foreach d,$(HEADERS_BASE),$(patsubst $(d)/%,$(BASE_INSTALL_DIR)include/%,$(_HEADERS_FROM)))
173 @
$(do_install_headers
)