From 88b24858d887278f4787081dacff2409259fcf42 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 29 Aug 2014 21:17:30 +1000 Subject: [PATCH] ctdb-build: Fix handling of public headers Add the header munging, add/package ctdb_version.h, create directory include/public. Signed-off-by: Martin Schwenke Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Mon Oct 6 14:56:07 CEST 2014 on sn-devel-104 --- ctdb/include/public/README.txt | 6 ++++++ ctdb/packaging/RPM/ctdb.spec.in | 1 + ctdb/wscript | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ctdb/include/public/README.txt diff --git a/ctdb/include/public/README.txt b/ctdb/include/public/README.txt new file mode 100644 index 00000000000..534e9b72415 --- /dev/null +++ b/ctdb/include/public/README.txt @@ -0,0 +1,6 @@ +DO NOT REMOVE + +This is a placeholder to allow for build rules putting public headers +in this directory. Using this directory allows us to ensure that our +public headers will work with external applications that make use of +Samba libraries diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index 42d70de8786..f6f5d8965d8 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -225,6 +225,7 @@ development libraries for ctdb %{_includedir}/ctdb_protocol.h %{_includedir}/ctdb_private.h %{_includedir}/ctdb_typesafe_cb.h +%{_includedir}/ctdb_version.h %package tests Summary: CTDB test suite diff --git a/ctdb/wscript b/ctdb/wscript index 3858ac7b667..2802b787a93 100755 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -218,6 +218,9 @@ def configure(conf): def build(bld): + # enable building of public headers in the build tree + bld.env.build_public_headers = 'include/public' + t = bld.SAMBA_GENERATOR('ctdb-version-header', target='include/ctdb_version.h', rule='../packaging/mkversion.sh ${TGT} %s' % (VERSION), @@ -326,7 +329,8 @@ def build(bld): ctdb_update_record.c ctdb_lock.c'''), includes='include include/internal', - public_headers='''include/ctdb.h + public_headers='''include/ctdb_version.h + include/ctdb.h include/ctdb_private.h include/ctdb_protocol.h include/ctdb_typesafe_cb.h''', -- 2.11.4.GIT