I humbly offer my attempt to bring a modicum (or at least a scintilla)
of sanity to managing a build of the boost library...


-- 
 
|\/|
|/\|
|\/| Randall S. Loomis
 
Sr. Software Engineer
Solectek Corporation
www.solectek.com
Index: ptxdist-trunk/rules/boost.in
===================================================================
--- ptxdist-trunk/rules/boost.in	(revision 7116)
+++ ptxdist-trunk/rules/boost.in	(working copy)
@@ -22,525 +22,94 @@
 
 		http://www.boost.org/
 
-# config BOOST_ALGORIGHM
-# 	bool
-# 	depends on BOOST
-# 	prompt "algorithm"
-#
-# config BOOST_ANY
-# 	bool
-# 	depends on BOOST
-# 	prompt "any"
-#
-# config BOOST_ARRAY
-# 	bool
-# 	depends on BOOST
-# 	prompt "array"
-#
-# config BOOST_ASSIGN
-# 	bool
-# 	depends on BOOST
-# 	prompt "assign"
-#
-# config BOOST_BIND
-# 	bool
-# 	depends on BOOST
-# 	prompt "bind"
-#
-# config BOOST_COMPATIBILITY
-# 	bool
-# 	depends on BOOST
-# 	prompt "compatibility"
-# 	help
-# 	  Bootst  library.
-#
-# compose
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# concept_check
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# config
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# conversion
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# crc
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# date_time
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# detail
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# disjoint_sets
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# dynamic_bitset
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# expected_results.xml
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
+config BOOST_TARGET_INSTALL_SOLIBS
+ 	bool
+ 	depends on BOOST
+ 	prompt "install shared libs on target"
+ 	help
+ 	   install shared libs on target rootfs.
 
+config BOOST_DATE_TIME
+ 	bool
+ 	depends on BOOST
+ 	prompt "build date_time lib"
+ 	help
+ 	  Boost date_time library.
+
 config BOOST_FILESYSTEM
 	bool
 	depends on BOOST
-	prompt "filesystem"
+	prompt "build filesystem lib"
 	help
-	  Bootst filesystem library.
+	  Boost filesystem library.
 
-# format
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# function
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# functional
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# graph
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-#
-# integer
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# io
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# iostreams
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# iterator
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# lambda
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# libraries.htm
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# logic
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# maintainers.txt
-# math
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# mem_fn
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# mpl
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# multi_array
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# multi_index
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# numeric
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# optional
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# parameter
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# platform_maintainers.txt
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# pool
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# preprocessor
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# program_options
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# property_map
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# ptr_container
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# python
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# random
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# range
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# rational
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# regex
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# serialization
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# signals
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# smart_ptr
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# spirit
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# static_assert
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# test
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# thread
+config BOOST_GRAPH
+ 	bool
+ 	depends on BOOST
+ 	prompt "build graph lib"
+ 	help
+ 	  Boost graph library.
 
-config BOOST_THREAD
+config BOOST_IOSTREAMS
 	bool
 	depends on BOOST
-	prompt "thread"
+	prompt "build iostreams lib"
 	help
-	  Portable C++ multi-threading library.
+	  Boost iostreams library.
 
-# timer
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# tokenizer
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# tuple
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# type_traits
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# utility
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# variant
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
-# wave
-# config BOOST_
-# 	bool
-# 	depends on BOOST
-# 	prompt ""
-# 	help
-# 	  Bootst  library.
+config BOOST_PROGRAM_OPTIONS
+	bool
+	depends on BOOST
+	prompt "build program_options lib"
+	help
+	  Boost program_options library.
 
+config BOOST_PYTHON
+	bool
+	depends on BOOST
+	prompt "build python lib"
+	help
+	  Boost python library.
 
-# -----
-
 config BOOST_REGEX
 	bool
 	depends on BOOST
-	prompt "regex"
+	prompt "build regex lib"
 	help
-	  Bootst regex library.
+	  Boost regex library.
 
-# config BOOST_SIGNALS
-# 	bool
-# 	depends on BOOST
-# 	prompt "signals"
-# 	help
-# 	  Bootst signals library.
-#
-# config BOOST_SERIALIZATION
-# 	bool
-# 	depends on BOOST
-# 	prompt "serialization"
-# 	help
-# 	  Bootst serialization library.
-#
-# config BOOST_THREAD
-# 	bool
-# 	depends on BOOST
-# 	prompt "thread"
-# 	help
-# 	  Bootst thread library.
-#
-# config BOOST_PYTHON
-# 	bool
-# 	depends on BOOST
-# 	prompt "python bindings"
-# 	help
-# 	  Bootst python library.
-#
-# config BOOST_FILESYSTEM
-# 	bool
-# 	depends on BOOST
-# 	prompt "filesystem"
-# 	help
-# 	  Bootst filesystem library.
-#
-# config BOOST_WAVE
-# 	bool
-# 	depends on BOOST
-# 	prompt "wave"
-# 	help
-# 	  Bootst wave library.
-#
-# config BOOST_DATE_TIME
-# 	bool
-# 	depends on BOOST
-# 	prompt "date_time"
-# 	help
-# 	  Bootst regexp library.
-#
-# config BOOST_IOSTREAMS
-# 	bool
-# 	depends on BOOST
-# 	prompt "iostreams"
-# 	help
-# 	  Bootst regexp library.
-#
-# config BOOST_TEST
-# 	bool
-# 	depends on BOOST
-# 	prompt "test"
-# 	help
-# 	  Bootst test library.
-#
-# config BOOST_PROGRAM_OPTIONS
-# 	bool
-# 	depends on BOOST
-# 	prompt "program options"
-# 	help
-# 	  Bootst regexp library.
-#
-# config BOOST_GRAPH
-# 	bool
-# 	depends on BOOST
-# 	prompt "graph"
-# 	help
-# 	  Bootst regexp library.
-#
+config BOOST_SERIALIZATION
+	bool
+	depends on BOOST
+	prompt "build serialization lib"
+	help
+	  Boost serialization library.
+
+config BOOST_SIGNALS
+	bool
+	depends on BOOST
+	prompt "build signals lib"
+	help
+	  Boost signals library.
+
+config BOOST_TEST
+	bool
+	depends on BOOST
+	prompt "build test lib"
+	help
+	  Boost test library.
+
+config BOOST_THREAD
+	bool
+	depends on BOOST
+	prompt "build thread lib"
+	help
+	  Portable C++ multi-threading library.
+
+config BOOST_WAVE
+	bool
+	depends on BOOST
+	prompt "build wave lib"
+	help
+	  Boost wave library.
+
Index: ptxdist-trunk/rules/boost.make
===================================================================
--- ptxdist-trunk/rules/boost.make	(revision 7116)
+++ ptxdist-trunk/rules/boost.make	(working copy)
@@ -64,6 +64,48 @@
 # -q: quit on error
 # -d: debug level, default=1
 
+#
+# autoconf
+#
+BOOST_AUTOCONF	= --layout=system  --prefix=/usr
+
+ifdef PTXCONF_BOOST_DATE_TIME
+BOOST_AUTOCONF	+= --with-date_time
+endif
+ifdef PTXCONF_BOOST_FILESYSTEM
+BOOST_AUTOCONF	+= --with-filesystem
+endif
+ifdef PTXCONF_BOOST_GRAPH
+BOOST_AUTOCONF	+= --with-graph
+endif
+ifdef PTXCONF_BOOST_IOSTREAMS
+BOOST_AUTOCONF	+= --with-iostreams
+endif
+ifdef PTXCONF_BOOST_PROGRAM_OPTIONS
+BOOST_AUTOCONF	+= --with-program_options
+endif
+ifdef PTXCONF_BOOST_PYTHON
+BOOST_AUTOCONF	+= --with-python
+endif
+ifdef PTXCONF_BOOST_REGEX
+BOOST_AUTOCONF	+= --with-regex
+endif
+ifdef PTXCONF_BOOST_SERIALIZATION
+BOOST_AUTOCONF	+= --with-serialization
+endif
+ifdef PTXCONF_BOOST_SIGNALS
+BOOST_AUTOCONF	+= --with-signals
+endif
+ifdef PTXCONF_BOOST_TEST
+BOOST_AUTOCONF	+= --with-test
+endif
+ifdef PTXCONF_BOOST_THREAD
+BOOST_AUTOCONF	+= --with-thread
+endif
+ifdef PTXCONF_BOOST_WAVE
+BOOST_AUTOCONF	+= --with-wave
+endif
+
 BOOST_JAM	:= \
 	$(BOOST_DIR)/tools/build/jam_src/bjam \
 	-q \
@@ -71,7 +113,10 @@
 	-sTOOLS=gcc \
 	-sGCC=$(COMPILER_PREFIX)gcc \
 	-sGXX=$(COMPILER_PREFIX)g++ \
-	-sOBJCOPY=$(COMPILER_PREFIX)objcopy
+	-sOBJCOPY=$(COMPILER_PREFIX)objcopy \
+	-sBUILD="release <threading>single <rtti>on <runtime-link>dynamic <debug-symbols>off" \
+	$(BOOST_AUTOCONF) \
+	stage
 
 $(STATEDIR)/boost.prepare: $(boost_prepare_deps_default)
 	@$(call targetinfo, $@)
@@ -87,16 +132,7 @@
 
 $(STATEDIR)/boost.compile: $(boost_compile_deps_default)
 	@$(call targetinfo, $@)
-
-ifdef PTXCONF_BOOST_FILESYSTEM
-	cd $(BOOST_DIR)/libs/filesystem/build && $(BOOST_JAM)
-endif
-ifdef PTXCONF_BOOST_REGEX
-	cd $(BOOST_DIR)/libs/regex/build && $(BOOST_JAM)
-endif
-ifdef PTXCONF_BOOST_THREAD
-	cd $(BOOST_DIR)/libs/thread/build && $(BOOST_JAM)
-endif
+	cd $(BOOST_DIR) && $(BOOST_JAM)
 	@$(call touch, $@)
 
 # ----------------------------------------------------------------------------
@@ -107,19 +143,8 @@
 
 $(STATEDIR)/boost.install: $(boost_install_deps_default)
 	@$(call targetinfo, $@)
-	mkdir -p $(SYSROOT)/usr/include/boost/
-ifdef PTXCONF_BOOST_FILESYSTEM
-endif
-ifdef PTXCONF_BOOST_REGEX
-	cp -a \
-	  $(BOOST_DIR)/bin/boost/libs/regex/build/libboost_regex.so/gcc/release/shared-linkable-true/libboost_regex-gcc-1_33_1.so \
-	  $(SYSROOT)/usr/lib/
-	cp -a $(BOOST_DIR)/boost/regex/ $(BOOST_DIR)/boost/regex.hpp $(SYSROOT)/usr/include/boost/
-endif
-ifdef PTXCONF_BOOST_THREAD
-	cp -a $(BOOST_DIR)/libs/thread/build/bin-stage/libboost_thread* $(SYSROOT)/usr/lib/
-	cp -a $(BOOST_DIR)/boost/thread/ $(BOOST_DIR)/boost/thread.hpp $(SYSROOT)/usr/include/boost/
-endif
+	cp -a $(BOOST_DIR)/boost $(SYSROOT)/usr/include
+	cp -a $(BOOST_DIR)/stage/lib/*.a $(SYSROOT)/usr/lib
 	@$(call touch, $@)
 
 # ----------------------------------------------------------------------------
@@ -140,6 +165,7 @@
 	@$(call install_fixup,boost,DEPENDS,)
 	@$(call install_fixup,boost,DESCRIPTION,missing)
 
+ifdef PTXCONF_BOOST_TARGET_INSTALL_SOLIBS
 ifdef PTXCONF_BOOST_FILESYSTEM
 	@$(call install_copy, boost, 0, 0, 0644, \
 		$(BOOST_DIR)/stage/lib/libboost_filesystem-gcc-d-1_33_1.so.1.33.1, \
@@ -158,6 +184,18 @@
 		/usr/lib/libboost_regex-gcc-d-1_33_1.so)
 endif
 
+ifdef PTXCONF_BOOST_SERIALIZATION
+	@$(call install_copy, boost, 0, 0, 0644, \
+		$(BOOST_DIR)/stage/lib/libboost_serialization.so.1.33.1, \
+		/usr/lib/libboost_serialization.so.1.33.1)
+	@$(call install_link, boost, \
+		libboost_serialization.so.1.33.1, \
+		/usr/lib/libboost_serialization.so.1)
+	@$(call install_link, boost, \
+		libboost_serialization.so.1, \
+		/usr/lib/libboost_serialization.so)
+endif
+
 ifdef PTXCONF_BOOST_THREAD
 	@$(call install_copy, boost, 0, 0, 0644, \
 		$(BOOST_DIR)/libs/thread/build/bin-stage/libboost_thread-gcc-mt-d-1_33_1.so.1.33.1, \
@@ -166,6 +204,7 @@
 		libboost_thread-gcc-mt-d-1_33_1.so.1.33.1, \
 		/usr/lib/libboost_thread-gcc-mt-d-1_33_1.so)
 endif
+endif # PTXCONF_BOOST_TARGET_INSTALL_SOLIBS
 
 	@$(call install_finish,boost)
 
-- 
ptxdist mailing list
[email protected]

Reply via email to