Add a --with-books-brand=BRAND configure switch in order
to choose the publican brand at build time. This is
especially useful for the website documentation where
we use a custom brand.
The default brand used when nothing is specified is
the standard 'common' publican brand.
---
books/PCP_PG/GNUmakefile | 7 +++++--
books/PCP_PG/publican.cfg | 4 ----
books/PCP_PG/publican.cfg.in | 4 ++++
books/PCP_TCS/GNUmakefile | 7 +++++--
books/PCP_TCS/publican.cfg | 4 ----
books/PCP_TCS/publican.cfg.in | 4 ++++
books/PCP_UAG/GNUmakefile | 7 +++++--
books/PCP_UAG/publican.cfg | 4 ----
books/PCP_UAG/publican.cfg.in | 4 ++++
configure | 21 +++++++++++++++++++++
configure.ac | 13 +++++++++++++
src/include/builddefs.in | 1 +
12 files changed, 62 insertions(+), 18 deletions(-)
delete mode 100644 books/PCP_PG/publican.cfg
create mode 100644 books/PCP_PG/publican.cfg.in
delete mode 100644 books/PCP_TCS/publican.cfg
create mode 100644 books/PCP_TCS/publican.cfg.in
delete mode 100644 books/PCP_UAG/publican.cfg
create mode 100644 books/PCP_UAG/publican.cfg.in
diff --git a/books/PCP_PG/GNUmakefile b/books/PCP_PG/GNUmakefile
index 1cd3aacedf9b..eca64bd0be2b 100644
--- a/books/PCP_PG/GNUmakefile
+++ b/books/PCP_PG/GNUmakefile
@@ -13,7 +13,7 @@ CFG = publican.cfg
CP = cp -rdp
LSRCFILES = $(XML) $(PUB) $(CFG) $(PDF)
LDIRDIRT = pdf html en-US tmp
-LDIRT = built.*
+LDIRT = built.* publican.cfg
CWD = $(shell pwd)
default: build-me
@@ -21,7 +21,7 @@ default: build-me
include $(BUILDRULES)
ifeq "$(BOOK_TOOLCHAIN)" "publican"
-built.$(BOOK_TOOLCHAIN): $(XML)
+built.$(BOOK_TOOLCHAIN): $(XML) $(CFG)
@rm -fr pdf html en-US tmp
@mkdir -p pdf html en-US tmp
$(CP) $(CWD)/$(PUB) en-US/
@@ -59,6 +59,9 @@ else
build-me:
endif
+publican.cfg : publican.cfg.in
+ $(SED) -e 's;@brand@;'$(BOOK_BRAND)';' $< > $@
+
install: default
$(INSTALL) -m 755 -d $(PCP_BOOKS_DIR)
$(INSTALL) -m 644 $(PDF) $(PCP_BOOKS_DIR)/$(PDF)
diff --git a/books/PCP_PG/publican.cfg b/books/PCP_PG/publican.cfg
deleted file mode 100644
index 0e5049b157cf..000000000000
--- a/books/PCP_PG/publican.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-debug: 1
-xml_lang: en-US
-brand: common
-condition: common
diff --git a/books/PCP_PG/publican.cfg.in b/books/PCP_PG/publican.cfg.in
new file mode 100644
index 000000000000..eaf4e8d483ff
--- /dev/null
+++ b/books/PCP_PG/publican.cfg.in
@@ -0,0 +1,4 @@
+debug: 1
+xml_lang: en-US
+brand: @brand@
+condition: common
diff --git a/books/PCP_TCS/GNUmakefile b/books/PCP_TCS/GNUmakefile
index 239eee80da9a..c61aeb730e4f 100644
--- a/books/PCP_TCS/GNUmakefile
+++ b/books/PCP_TCS/GNUmakefile
@@ -13,7 +13,7 @@ CFG = publican.cfg
CP = cp -rdp
LSRCFILES = $(XML) $(PUB) $(CFG) $(PDF)
LDIRDIRT = pdf html en-US tmp
-LDIRT = built.*
+LDIRT = built.* publican.cfg
CWD = $(shell pwd)
default: build-me
@@ -21,7 +21,7 @@ default: build-me
include $(BUILDRULES)
ifeq "$(BOOK_TOOLCHAIN)" "publican"
-built.$(BOOK_TOOLCHAIN): $(XML)
+built.$(BOOK_TOOLCHAIN): $(XML) $(CFG)
@rm -fr pdf html en-US tmp
@mkdir -p pdf html en-US tmp
$(CP) $(CWD)/$(PUB) en-US/
@@ -59,6 +59,9 @@ else
build-me:
endif
+publican.cfg : publican.cfg.in
+ $(SED) -e 's;@brand@;'$(BOOK_BRAND)';' $< > $@
+
install: default
# $(INSTALL) -m 755 -d $(PCP_BOOKS_DIR)
# $(INSTALL) -m 644 $(PDF) $(PCP_BOOKS_DIR)/$(PDF)
diff --git a/books/PCP_TCS/publican.cfg b/books/PCP_TCS/publican.cfg
deleted file mode 100644
index 0e5049b157cf..000000000000
--- a/books/PCP_TCS/publican.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-debug: 1
-xml_lang: en-US
-brand: common
-condition: common
diff --git a/books/PCP_TCS/publican.cfg.in b/books/PCP_TCS/publican.cfg.in
new file mode 100644
index 000000000000..eaf4e8d483ff
--- /dev/null
+++ b/books/PCP_TCS/publican.cfg.in
@@ -0,0 +1,4 @@
+debug: 1
+xml_lang: en-US
+brand: @brand@
+condition: common
diff --git a/books/PCP_UAG/GNUmakefile b/books/PCP_UAG/GNUmakefile
index 6221203d1da0..5242f4e8aac8 100644
--- a/books/PCP_UAG/GNUmakefile
+++ b/books/PCP_UAG/GNUmakefile
@@ -13,7 +13,7 @@ CFG = publican.cfg
CP = cp -rdp
LSRCFILES = $(XML) $(PUB) $(CFG) $(PDF)
LDIRDIRT = pdf html en-US tmp
-LDIRT = built.*
+LDIRT = built.* publican.cfg
CWD = $(shell pwd)
default: build-me
@@ -21,7 +21,7 @@ default: build-me
include $(BUILDRULES)
ifeq "$(BOOK_TOOLCHAIN)" "publican"
-built.$(BOOK_TOOLCHAIN): $(XML)
+built.$(BOOK_TOOLCHAIN): $(XML) $(CFG)
@rm -fr pdf html en-US tmp
@mkdir -p pdf html en-US tmp
$(CP) $(CWD)/$(PUB) en-US/
@@ -59,6 +59,9 @@ else
build-me:
endif
+publican.cfg : publican.cfg.in
+ $(SED) -e 's;@brand@;'$(BOOK_BRAND)';' $< > $@
+
install: default
$(INSTALL) -m 755 -d $(PCP_BOOKS_DIR)
$(INSTALL) -m 644 $(PDF) $(PCP_BOOKS_DIR)/$(PDF)
diff --git a/books/PCP_UAG/publican.cfg b/books/PCP_UAG/publican.cfg
deleted file mode 100644
index 0e5049b157cf..000000000000
--- a/books/PCP_UAG/publican.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-debug: 1
-xml_lang: en-US
-brand: common
-condition: common
diff --git a/books/PCP_UAG/publican.cfg.in b/books/PCP_UAG/publican.cfg.in
new file mode 100644
index 000000000000..eaf4e8d483ff
--- /dev/null
+++ b/books/PCP_UAG/publican.cfg.in
@@ -0,0 +1,4 @@
+debug: 1
+xml_lang: en-US
+brand: @brand@
+condition: common
diff --git a/configure b/configure
index 4d825cf69fed..201353682fde 100755
--- a/configure
+++ b/configure
@@ -738,6 +738,7 @@ LEXLIB
LEX_OUTPUT_ROOT
LEX
LN_S
+book_brand
book_toolchain
xmlto
XMLTO
@@ -911,6 +912,7 @@ with_qt
with_python
with_python3
with_books
+with_books_brand
with_papi
with_perfevent
with_manager
@@ -1604,6 +1606,9 @@ Optional Packages:
--with-python3 enable support for tools requiring Python3 (default
is on)
--with-books enable building of the PCP books (default is off)
+ --with-books-brand=BRAND
+ choose the docbook brand when building the PCP books
+ (default is common)
--with-papi[=DIR|=MODULE]
enable performance api counter pmda (default is on)
The optional argument may be a full path of a PAPI
@@ -2659,6 +2664,15 @@ fi
+# Check whether --with-books-brand was given.
+if test "${with_books_brand+set}" = set; then :
+ withval=$with_books_brand; do_books_brand=$withval;
PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --with-books-brand=$withval"
+else
+ do_books_brand=common
+fi
+
+
+
# Check whether --with-papi was given.
if test "${with_papi+set}" = set; then :
withval=$with_papi; do_papi=$withval; PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE
--with-papi=$withval"
@@ -8346,6 +8360,13 @@ then
fi
+book_brand="common"
+if test "$do_books_brand" != ""
+then
+ book_brand=$do_books_brand
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
diff --git a/configure.ac b/configure.ac
index fd2b62f669da..65e6f4969f56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,12 @@ AC_ARG_WITH([books],
[do_books=$withval; PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE
--with-books=$withval"],
[do_books=no])
+AC_ARG_WITH([books-brand],
+ [AC_HELP_STRING([--with-books-brand=BRAND],
+ [choose the docbook brand when building the PCP books
(default is common)])],
+ [do_books_brand=$withval; PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE
--with-books-brand=$withval"],
+ [do_books_brand=common])
+
AC_ARG_WITH([papi],
[AC_HELP_STRING([--with-papi@<:@=DIR|=MODULE@:>@],
[enable performance api counter pmda (default is on)
@@ -955,6 +961,13 @@ then
fi
AC_SUBST(book_toolchain)
+book_brand="common"
+if test "$do_books_brand" != ""
+then
+ book_brand=$do_books_brand
+fi
+AC_SUBST(book_brand)
+
dnl check if symbolic links are supported
AC_PROG_LN_S
if test $target_os = mingw; then
diff --git a/src/include/builddefs.in b/src/include/builddefs.in
index 34d9f4d9269e..2d5d77b4a0de 100644
--- a/src/include/builddefs.in
+++ b/src/include/builddefs.in
@@ -204,6 +204,7 @@ XMLTO = @xmlto@
DBLATEX = @dblatex@
PUBLICAN = @publican@
BOOK_TOOLCHAIN = @book_toolchain@
+BOOK_BRAND = @book_brand@
HAVE_GZIPPED_MANPAGES = @have_gzipped_manpages@
HAVE_BZIP2ED_MANPAGES = @have_bzip2ed_manpages@
--
2.3.6
|