summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/build/m4/check_doc.m41
-rw-r--r--source4/build/m4/env.m41
-rw-r--r--source4/build/smb_build/config_mk.pm3
-rw-r--r--source4/build/smb_build/makefile.pm73
-rw-r--r--source4/gtk/config.mk1
-rw-r--r--source4/lib/ldb/config.mk9
-rw-r--r--source4/lib/registry/config.mk4
-rw-r--r--source4/lib/talloc/config.mk1
-rw-r--r--source4/script/installman.sh71
-rw-r--r--source4/script/uninstallman.sh28
-rw-r--r--source4/torture/config.mk4
-rw-r--r--source4/utils/config.mk2
12 files changed, 107 insertions, 91 deletions
diff --git a/source4/build/m4/check_doc.m4 b/source4/build/m4/check_doc.m4
new file mode 100644
index 0000000000..2aaf9596de
--- /dev/null
+++ b/source4/build/m4/check_doc.m4
@@ -0,0 +1 @@
+AC_PATH_PROG(XSLTPROC, xsltproc)
diff --git a/source4/build/m4/env.m4 b/source4/build/m4/env.m4
index c272247661..7d43f920dd 100644
--- a/source4/build/m4/env.m4
+++ b/source4/build/m4/env.m4
@@ -21,3 +21,4 @@ sinclude(build/m4/check_cc.m4)
sinclude(build/m4/check_ld.m4)
sinclude(build/m4/check_shld.m4)
sinclude(build/m4/check_types.m4)
+sinclude(build/m4/check_doc.m4)
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index 12d62437e3..2194e3d596 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -25,7 +25,8 @@ my %attribute_types = (
"RELEASE_VERSION" => "string",
"ENABLE" => "bool",
"TARGET_CFLAGS" => "list",
- "CMD" => "string"
+ "CMD" => "string",
+ "MANPAGE" => "string"
);
###########################################################
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index d38572e951..fc4c7fd2b9 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -61,17 +61,15 @@ LOCKDIR = @lockdir@
# the directory where pid files go
PIDDIR = @piddir@
-PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
-PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\"
-PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\"
-PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
-PATH_FLAGS4 = $(PATH_FLAGS3) -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
-PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
- -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\"
-PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\"
-PATH_FLAGS7 = $(PATH_FLAGS6) -DSWATDIR=\"$(SWATDIR)\"
-PATH_FLAGS = $(PATH_FLAGS7) $(PASSWD_FLAGS)
-
+MANDIR = @mandir@
+
+PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\" \
+ -DBINDIR=\"$(BINDIR)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
+ -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DLIBDIR=\"$(LIBDIR)\" \
+ -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\" \
+ -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
+ -DSWATDIR=\"$(SWATDIR)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
+ -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
__EOD__
return $output;
@@ -94,6 +92,8 @@ STLD_FLAGS=-rc
SHLD=@CC@
SHLD_FLAGS=@LDSHFLAGS@ @LDFLAGS@ -Lbin
+XSLTPROC=@XSLTPROC@
+
__EOD__
}
@@ -117,7 +117,7 @@ sub _prepare_SUFFIXES($)
$output = << '__EOD__';
.SUFFIXES:
-.SUFFIXES: .c .o .h .h.gch .a .so
+.SUFFIXES: .c .o .h .h.gch .a .so .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml
__EOD__
@@ -156,6 +156,38 @@ test-noswrap: all
__EOD__
}
+sub _prepare_man_rule($)
+{
+ my $suffix = shift;
+
+ return << "__EOD__";
+.$suffix.xml.$suffix:
+ \$(XSLTPROC) -o \$@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \$<
+
+__EOD__
+}
+
+sub _prepare_manpages($)
+{
+ my $ctx = shift;
+
+ my @mp_list = ();
+
+ foreach (values %$ctx) {
+ if (defined($_->{MANPAGE}) and $_->{MANPAGE} ne "") {
+ push (@mp_list, $_->{MANPAGE});
+ }
+ }
+
+ my $mp = join(' ', @mp_list);
+ return << "__EOD__";
+MANPAGES = $mp
+
+manpages: \$(MANPAGES)
+
+__EOD__
+}
+
sub _prepare_dummy_MAKEDIR()
{
my $ctx = shift;
@@ -534,6 +566,7 @@ realdistclean: distclean removebackup
-rm -f include/config.h.in
-rm -f include/version.h
-rm -f configure
+ -rm -f $(MANPAGES)
__EOD__
return $output;
@@ -586,9 +619,10 @@ showlayout:
@echo " libdir: $(LIBDIR)"
@echo " vardir: $(VARDIR)"
@echo " privatedir: $(PRIVATEDIR)"
- @echo " piddir: $(PIDDIR)"
+ @echo " piddir: $(PIDDIR)"
@echo " lockdir: $(LOCKDIR)"
@echo " swatdir: $(SWATDIR)"
+ @echo " mandir: $(MANDIR)"
showflags:
@echo "Samba will be compiled with flags:"
@@ -654,6 +688,9 @@ installdat: installdirs
installswat: installdirs
@$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
+installman: installdirs
+ @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
+
uninstall: uninstallbin uninstalltorture uninstallldb uninstallreg
uninstallbin:
@@ -668,6 +705,9 @@ uninstallldb:
uninstallreg:
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(REG_PROGS)
+uninstallman:
+ @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
+
# Swig extensions
swig: scripting/swig/_tdb.so scripting/swig/_dcerpc.so
@@ -769,6 +809,13 @@ sub _prepare_makefile_in($$)
$output .= _prepare_std_CC_rule("c","o",'@PICFLAG@',"Compiling","Rule for std objectfiles");
$output .= _prepare_std_CC_rule("h","h.gch",'@PICFLAG@',"Precompiling","Rule for precompiled headerfiles");
+ $output .= _prepare_man_rule("1");
+ $output .= _prepare_man_rule("3");
+ $output .= _prepare_man_rule("5");
+ $output .= _prepare_man_rule("7");
+
+ $output .= _prepare_manpages($CTX);
+
$output .= _prepare_target_settings($CTX);
$output .= _prepare_rule_lists($CTX);
diff --git a/source4/gtk/config.mk b/source4/gtk/config.mk
index 34ee0315cb..e895269c15 100644
--- a/source4/gtk/config.mk
+++ b/source4/gtk/config.mk
@@ -17,6 +17,7 @@ REQUIRED_SUBSYSTEMS = CHARSET LIBBASIC EXT_LIB_gtk RPC_NDR_SAMR
[BINARY::gregedit]
OBJ_FILES = gtk/tools/gregedit.o
REQUIRED_SUBSYSTEMS = CONFIG LIBCMDLINE REGISTRY GTKSMB
+MANPAGE = gtk/man/gregedit.1
# End BINARY gregedit
################################################
diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk
index 61bd8f0152..39de5ea1c0 100644
--- a/source4/lib/ldb/config.mk
+++ b/source4/lib/ldb/config.mk
@@ -74,6 +74,7 @@ ADD_OBJ_FILES = \
REQUIRED_SUBSYSTEMS = \
LIBREPLACE LIBTALLOC LDBSAMBA
NOPROTO = YES
+MANPAGE = lib/ldb/man/man3/ldb.3
#
# End SUBSYSTEM LIBLDB
################################################
@@ -110,10 +111,11 @@ REQUIRED_SUBSYSTEMS = LIBLDB LIBCMDLINE LIBBASIC
################################################
# Start BINARY ldbadd
[BINARY::ldbadd]
-OBJ_FILES= \
+OBJ_FILES = \
lib/ldb/tools/ldbadd.o
REQUIRED_SUBSYSTEMS = \
LIBLDB_CMDLINE
+MANPAGE = lib/ldb/man/man1/ldbadd.1
# End BINARY ldbadd
################################################
@@ -124,6 +126,7 @@ OBJ_FILES= \
lib/ldb/tools/ldbdel.o
REQUIRED_SUBSYSTEMS = \
LIBLDB_CMDLINE
+MANPAGE = lib/ldb/man/man1/ldbdel.1
# End BINARY ldbdel
################################################
@@ -134,6 +137,7 @@ OBJ_FILES= \
lib/ldb/tools/ldbmodify.o
REQUIRED_SUBSYSTEMS = \
LIBLDB_CMDLINE
+MANPAGE = lib/ldb/man/man1/ldbmodify.1
# End BINARY ldbmodify
################################################
@@ -144,6 +148,7 @@ OBJ_FILES= \
lib/ldb/tools/ldbsearch.o
REQUIRED_SUBSYSTEMS = \
LIBLDB_CMDLINE
+MANPAGE = lib/ldb/man/man1/ldbsearch.1
# End BINARY ldbsearch
################################################
@@ -154,6 +159,7 @@ OBJ_FILES= \
lib/ldb/tools/ldbedit.o
REQUIRED_SUBSYSTEMS = \
LIBLDB_CMDLINE
+MANPAGE = lib/ldb/man/man1/ldbedit.1
# End BINARY ldbedit
################################################
@@ -164,6 +170,7 @@ OBJ_FILES= \
lib/ldb/tools/ldbrename.o
REQUIRED_SUBSYSTEMS = \
LIBLDB_CMDLINE
+MANPAGE = lib/ldb/man/man1/ldbrename.1
# End BINARY ldbrename
################################################
diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk
index af9fb83bab..ab699a8ac0 100644
--- a/source4/lib/registry/config.mk
+++ b/source4/lib/registry/config.mk
@@ -98,6 +98,7 @@ OBJ_FILES= \
lib/registry/tools/regdiff.o
REQUIRED_SUBSYSTEMS = \
CONFIG LIBCMDLINE REGISTRY
+MANPAGE = lib/registry/man/regdiff.1
# End BINARY regdiff
################################################
@@ -108,6 +109,7 @@ OBJ_FILES= \
lib/registry/tools/regpatch.o
REQUIRED_SUBSYSTEMS = \
CONFIG LIBCMDLINE REGISTRY
+MANPAGE = lib/registry/man/regpatch.1
# End BINARY regpatch
################################################
@@ -118,6 +120,7 @@ OBJ_FILES= \
lib/registry/tools/regshell.o
REQUIRED_SUBSYSTEMS = \
CONFIG LIBCMDLINE REGISTRY
+MANPAGE = lib/registry/man/regshell.1
# End BINARY regshell
################################################
@@ -128,5 +131,6 @@ OBJ_FILES= \
lib/registry/tools/regtree.o
REQUIRED_SUBSYSTEMS = \
CONFIG LIBCMDLINE REGISTRY
+MANPAGE = lib/registry/man/regtree.1
# End BINARY regtree
################################################
diff --git a/source4/lib/talloc/config.mk b/source4/lib/talloc/config.mk
index fe8f0e929f..a1032a6e41 100644
--- a/source4/lib/talloc/config.mk
+++ b/source4/lib/talloc/config.mk
@@ -6,6 +6,7 @@ INIT_OBJ_FILES = \
REQUIRED_SUBSYSTEMS = \
LIBREPLACE
NOPROTO = YES
+MANPAGE = lib/talloc/talloc.3
#
# End SUBSYSTEM LIBTALLOC
################################################
diff --git a/source4/script/installman.sh b/source4/script/installman.sh
index 5b6bba69ed..00c7114396 100644
--- a/source4/script/installman.sh
+++ b/source4/script/installman.sh
@@ -1,64 +1,22 @@
#!/bin/sh
-#5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values
-#
-# 13 Aug 2001 Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl>
-# modified to accomodate international man pages (inspired
-# by Japanese edition's approach)
MANDIR=$1
-SRCDIR=$2/
-langs=$3
-
-if [ $# -ge 4 ] ; then
- GROFF=$4 # sh cmd line, including options
-fi
-
-
-for lang in $langs; do
- if [ "X$lang" = Xen ]; then
- echo Installing default man pages in $MANDIR/
- lang=.
- else
- echo Installing \"$lang\" man pages in $MANDIR/lang/$lang
- fi
-
- langdir=$MANDIR/$lang
- for d in $MANDIR $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do
- if [ ! -d $d ]; then
- mkdir $d
- if [ ! -d $d ]; then
- echo Failed to make directory $d, does $USER have privileges?
- exit 1
- fi
+shift 1
+MANPAGES=$*
+
+for I in $MANPAGES
+do
+ SECTION=`echo $I | grep -o '.$'`
+ DIR="$MANDIR/man$SECTION"
+ if [ ! -d "$DIR" ]
+ then
+ mkdir "$DIR"
fi
- done
-
- for sect in 1 5 7 8 ; do
- for m in $langdir/man$sect ; do
- for s in $SRCDIR../docs/manpages/$lang/*$sect; do
- FNAME=$m/`basename $s`
-
- # Test for writability. Involves
- # blowing away existing files.
-
- if (rm -f $FNAME && touch $FNAME); then
- rm $FNAME
- if [ "x$GROFF" = x ] ; then
- cp $s $m # Copy raw nroff
- else
- echo "\t$FNAME" # groff'ing can be slow, give the user
- # a warm fuzzy.
- $GROFF $s > $FNAME # Process nroff, because man(1) (on
- # this system) doesn't .
- fi
- chmod 0644 $FNAME
- else
- echo Cannot create $FNAME... does $USER have privileges?
- fi
- done
- done
- done
+
+ echo "Installing manpage \"$I\" in $DIR"
+ cp $I $DIR
done
+
cat << EOF
======================================================================
The man pages have been installed. You may uninstall them using the command
@@ -68,4 +26,3 @@ man pages and shell scripts.
EOF
exit 0
-
diff --git a/source4/script/uninstallman.sh b/source4/script/uninstallman.sh
index 3126709831..72b523ed9e 100644
--- a/source4/script/uninstallman.sh
+++ b/source4/script/uninstallman.sh
@@ -1,30 +1,20 @@
#!/bin/sh
-#4 July 96 Dan.Shearer@UniSA.edu.au
-#
-# 13 Aug 2001 Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl>
-# modified to accomodate international man pages (inspired
-# by Japanese edition's approach)
-
+# 4 July 96 Dan.Shearer@UniSA.edu.au
+# Updated for Samba4 by Jelmer Vernooij
MANDIR=$1
-SRCDIR=$2
-langs=$3
-
-for lang in $langs; do
- echo Uninstalling \"$lang\" man pages from $MANDIR/$lang
+shift 1
+MANPAGES=$*
- for sect in 1 5 7 8 ; do
- for m in $MANDIR/$lang/man$sect ; do
- for s in $SRCDIR/../docs/manpages/$lang/*$sect; do
- FNAME=$m/`basename $s`
+for I in $MANPAGES
+do
+ SECTION=`echo $I | grep -o '.$'`
+ FNAME=$MANDIR/man$SECTION/$I
if test -f $FNAME; then
echo Deleting $FNAME
rm -f $FNAME
test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges?
- fi
- done
- done
- done
+ fi
done
cat << EOF
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index f574b0277f..fa15f692b6 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -224,6 +224,7 @@ REQUIRED_SUBSYSTEMS = \
CONFIG \
LIBCMDLINE \
LIBBASIC
+MANPAGE = torture/man/smbtorture.1
# End BINARY smbtorture
#################################
@@ -239,6 +240,7 @@ REQUIRED_SUBSYSTEMS = \
LIBBASIC \
LIBCMDLINE \
RPC
+MANPAGE = torture/man/gentest.1
# End BINARY gentest
#################################
@@ -253,6 +255,7 @@ REQUIRED_SUBSYSTEMS = \
LIBBASIC \
LIBCMDLINE \
RPC
+MANPAGE = torture/man/masktest.1
# End BINARY masktest
#################################
@@ -268,5 +271,6 @@ REQUIRED_SUBSYSTEMS = \
LIBBASIC \
LIBCMDLINE \
RPC
+MANPAGE = torture/man/locktest.1
# End BINARY locktest
#################################
diff --git a/source4/utils/config.mk b/source4/utils/config.mk
index 1854042d65..1af174e94e 100644
--- a/source4/utils/config.mk
+++ b/source4/utils/config.mk
@@ -11,6 +11,7 @@ REQUIRED_SUBSYSTEMS = \
LIBBASIC \
NDR_ALL \
RPC
+MANPAGE = utils/man/ndrdump.1
# FIXME: ndrdump shouldn't have to depend on RPC...
# End BINARY ndrdump
#################################
@@ -26,6 +27,7 @@ REQUIRED_SUBSYSTEMS = \
LIBBASIC \
LIBSMB \
RPC
+MANPAGE = utils/man/ntlm_auth.1
# End BINARY ntlm_auth
#################################