aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-02-17 13:37:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-02-17 13:37:20 +0200
commit7f2d3541641b7b3aa097e9b7cab4647bc8fad065 (patch)
tree430760cfac22e1eb94810b168f6f8f008bc9d0be
parent2585e4bac168d41f29fae06911bcfd9d20a4dbb6 (diff)
Link to boost data_time library in boost example
-rw-r--r--boost/makefile7
-rw-r--r--build/import/libboost/date-time/rules.make51
-rw-r--r--build/import/libboost/date-time/stub.make36
3 files changed, 92 insertions, 2 deletions
diff --git a/boost/makefile b/boost/makefile
index 1444e46..5d7e0e2 100644
--- a/boost/makefile
+++ b/boost/makefile
@@ -33,20 +33,23 @@ $(call import,\
$(scf_root)/import/libboost/header-only/stub.make,\
cpp-options: boost.l.cpp-options)
+$(call import,\
+ $(scf_root)/import/libboost/date-time/stub.make,\
+ l: boost_date_time.l)
+
ifdef db_id
$(call import,\
$(scf_root)/import/libodb-$(db_id)/stub.make,\
l: odb_db.l,cpp-options: odb_db.l.cpp-options)
endif
-
ifeq ($(odb_db.l.cpp-options),)
odb_db.l.cpp-options := $(out_base)/.unbuildable
endif
# Build.
#
-$(driver): $(cxx_obj) $(odb_db.l) $(odb_boost.l) $(odb.l)
+$(driver): $(cxx_obj) $(odb_db.l) $(odb_boost.l) $(odb.l) $(boost_date_time.l)
$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base)
$(cxx_obj) $(cxx_od): $(odb.l.cpp-options) $(odb_boost.l.cpp-options) \
$(odb_db.l.cpp-options) $(boost.l.cpp-options)
diff --git a/build/import/libboost/date-time/rules.make b/build/import/libboost/date-time/rules.make
new file mode 100644
index 0000000..b9ea87b
--- /dev/null
+++ b/build/import/libboost/date-time/rules.make
@@ -0,0 +1,51 @@
+# file : build/import/libboost/date-time/rules.make
+# author : Boris Kolpackov <boris@kolpackov.net>
+# copyright : Copyright (c) 2005-2011 Boris Kolpackov
+# license : GNU GPL v2; see accompanying LICENSE file
+
+$(dcf_root)/import/libboost/%: root := $(libboost_root)
+
+$(dcf_root)/import/libboost/date-time/date-time.l: \
+ | $(dcf_root)/import/libboost/date-time/.
+
+ifeq ($(libboost_type),archive)
+
+ifeq ($(libboost_system),y)
+$(dcf_root)/import/libboost/date-time/date-time.l: \
+ $(libboost_root)/stage/lib/libboost_date_time$(libboost_suffix).a \
+ $(libboost_root)/stage/lib/libboost_system$(libboost_suffix).a
+else
+$(dcf_root)/import/libboost/date-time/date-time.l: \
+ $(libboost_root)/stage/lib/libboost_date_time$(libboost_suffix).a
+endif
+ @echo $^ >$@
+
+else
+
+ifeq ($(libboost_system),y)
+$(dcf_root)/import/libboost/date-time/date-time.l: \
+ $(libboost_root)/stage/lib/libboost_date_time$(libboost_suffix).so \
+ $(libboost_root)/stage/lib/libboost_system$(libboost_suffix).so
+else
+$(dcf_root)/import/libboost/date-time/date-time.l: \
+ $(libboost_root)/stage/lib/libboost_date_time$(libboost_suffix).so
+endif
+ @echo $^ >$@
+ @echo rpath:$(root)/stage/lib >>$@
+
+endif
+
+
+$(dcf_root)/import/libboost/date-time/date-time.l.cpp-options: \
+ | $(dcf_root)/import/libboost/date-time/.
+ @echo include: -I$(root) >$@
+
+ifndef %foreign%
+
+disfigure::
+ $(call message,rm $(dcf_root)/import/libboost/date-time/date-time.l,\
+rm -f $(dcf_root)/import/libboost/date-time/date-time.l)
+ $(call message,,\
+rm -f $(dcf_root)/import/libboost/date-time/date-time.l.cpp-options)
+
+endif
diff --git a/build/import/libboost/date-time/stub.make b/build/import/libboost/date-time/stub.make
new file mode 100644
index 0000000..66d1989
--- /dev/null
+++ b/build/import/libboost/date-time/stub.make
@@ -0,0 +1,36 @@
+# file : build/import/libboost/date-time/stub.make
+# author : Boris Kolpackov <boris@kolpackov.net>
+# copyright : Copyright (c) 2005-2011 Boris Kolpackov
+# license : GNU GPL v2; see accompanying LICENSE file
+
+$(call include-once,$(scf_root)/import/libboost/configuration-rules.make,$(dcf_root))
+
+libboost_installed :=
+
+$(call -include,$(dcf_root)/import/libboost/configuration-dynamic.make)
+
+ifdef libboost_installed
+
+ifeq ($(libboost_installed),y)
+
+ifeq ($(libboost_system),y)
+$(call export,l: -lboost_date_time$(libboost_suffix) -lboost_system$(libboost_suffix),cpp_options: )
+else
+$(call export,l: -lboost_date_time$(libboost_suffix),cpp_options: )
+endif
+
+else
+
+$(call include-once,$(scf_root)/import/libboost/date-time/rules.make,$(dcf_root))
+
+$(call export,\
+ l: $(dcf_root)/import/libboost/date-time/date-time.l,\
+ cpp-options: $(dcf_root)/import/libboost/date-time/date-time.l.cpp-options)
+
+endif
+
+else
+
+.NOTPARALLEL:
+
+endif