[pve-devel] r6443 - pve-cluster/trunk/data/PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Aug 10 11:23:16 CEST 2011


Author: dietmar
Date: 2011-08-10 11:23:16 +0200 (Wed, 10 Aug 2011)
New Revision: 6443

Modified:
   pve-cluster/trunk/data/PVE/Makefile.am
   pve-cluster/trunk/data/PVE/Makefile.in
   pve-cluster/trunk/data/PVE/pvecm
Log:
generate manual page


Modified: pve-cluster/trunk/data/PVE/Makefile.am
===================================================================
--- pve-cluster/trunk/data/PVE/Makefile.am	2011-08-10 08:50:20 UTC (rev 6442)
+++ pve-cluster/trunk/data/PVE/Makefile.am	2011-08-10 09:23:16 UTC (rev 6443)
@@ -1,4 +1,3 @@
-
 bin_SCRIPTS = pvecm
 
 IPCC.c: IPCC.xs
@@ -11,6 +10,11 @@
 perlbin_PROGRAMS = IPCC.so
 perlbindir = /usr/lib/perl5/auto/PVE/IPCC/
 
+%.1.gz: %
+	perl -I.. ./$* printmanpod|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@
+
+man1_MANS = pvecm.1.gz
+
 IPCC_so_SOURCES = IPCC.c ppport.h
 
 pvelib_DATA = IPCC.pm Cluster.pm
@@ -19,4 +23,4 @@
 install-exec-hook:
 	perl -I.. ./pvecm verifyapi
 
-CLEANFILES = IPCC.c *~
+CLEANFILES = IPCC.c *~ *.1.gz

Modified: pve-cluster/trunk/data/PVE/Makefile.in
===================================================================
--- pve-cluster/trunk/data/PVE/Makefile.in	2011-08-10 08:50:20 UTC (rev 6442)
+++ pve-cluster/trunk/data/PVE/Makefile.in	2011-08-10 09:23:16 UTC (rev 6443)
@@ -46,7 +46,7 @@
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(perlbindir)" "$(DESTDIR)$(bindir)" \
-	"$(DESTDIR)$(pvelibdir)"
+	"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pvelibdir)"
 PROGRAMS = $(perlbin_PROGRAMS)
 am_IPCC_so_OBJECTS = IPCC.$(OBJEXT)
 IPCC_so_OBJECTS = $(am_IPCC_so_OBJECTS)
@@ -85,6 +85,9 @@
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(IPCC_so_SOURCES)
 DIST_SOURCES = $(IPCC_so_SOURCES)
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man1_MANS)
 DATA = $(pvelib_DATA)
 ETAGS = etags
 CTAGS = ctags
@@ -194,13 +197,14 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-bin_SCRIPTS = pvecm pvecert
+bin_SCRIPTS = pvecm
 LDADD = $(QB_LIBS)
 perlbindir = /usr/lib/perl5/auto/PVE/IPCC/
+man1_MANS = pvecm.1.gz
 IPCC_so_SOURCES = IPCC.c ppport.h
 pvelib_DATA = IPCC.pm Cluster.pm
 pvelibdir = /usr/share/perl5/PVE
-CLEANFILES = IPCC.c *~
+CLEANFILES = IPCC.c *~ *.1.gz
 all: all-am
 
 .SUFFIXES:
@@ -331,6 +335,40 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man1: $(man1_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+	@list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+	{ for i in $$list; do echo "$$i"; done; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	test -z "$$files" || { \
+	  echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+	  cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
 install-pvelibDATA: $(pvelib_DATA)
 	@$(NORMAL_INSTALL)
 	test -z "$(pvelibdir)" || $(MKDIR_P) "$(DESTDIR)$(pvelibdir)"
@@ -405,6 +443,19 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -436,9 +487,9 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
 installdirs:
-	for dir in "$(DESTDIR)$(perlbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pvelibdir)"; do \
+	for dir in "$(DESTDIR)$(perlbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pvelibdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -489,7 +540,8 @@
 
 info-am:
 
-install-data-am: install-perlbinPROGRAMS install-pvelibDATA
+install-data-am: install-man install-perlbinPROGRAMS \
+	install-pvelibDATA
 
 install-dvi: install-dvi-am
 
@@ -506,7 +558,7 @@
 
 install-info-am:
 
-install-man:
+install-man: install-man1
 
 install-pdf: install-pdf-am
 
@@ -535,9 +587,11 @@
 
 ps-am:
 
-uninstall-am: uninstall-binSCRIPTS uninstall-perlbinPROGRAMS \
-	uninstall-pvelibDATA
+uninstall-am: uninstall-binSCRIPTS uninstall-man \
+	uninstall-perlbinPROGRAMS uninstall-pvelibDATA
 
+uninstall-man: uninstall-man1
+
 .MAKE: install-am install-exec-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
@@ -547,12 +601,13 @@
 	install-data install-data-am install-dvi install-dvi-am \
 	install-exec install-exec-am install-exec-hook install-html \
 	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-perlbinPROGRAMS install-ps \
-	install-ps-am install-pvelibDATA install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-binSCRIPTS uninstall-perlbinPROGRAMS \
+	install-man1 install-pdf install-pdf-am \
+	install-perlbinPROGRAMS install-ps install-ps-am \
+	install-pvelibDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+	ps ps-am tags uninstall uninstall-am uninstall-binSCRIPTS \
+	uninstall-man uninstall-man1 uninstall-perlbinPROGRAMS \
 	uninstall-pvelibDATA
 
 
@@ -560,6 +615,9 @@
 	xsubpp IPCC.xs > IPCC.xsc
 	mv IPCC.xsc IPCC.c
 
+%.1.gz: %
+	perl -I.. ./$* printmanpod|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@
+
 install-exec-hook:
 	perl -I.. ./pvecm verifyapi
 

Modified: pve-cluster/trunk/data/PVE/pvecm
===================================================================
--- pve-cluster/trunk/data/PVE/pvecm	2011-08-10 08:50:20 UTC (rev 6442)
+++ pve-cluster/trunk/data/PVE/pvecm	2011-08-10 09:23:16 UTC (rev 6443)
@@ -1,5 +1,4 @@
 #!/usr/bin/perl -w
-
 use strict;
 use Getopt::Long;
 use Socket;
@@ -632,6 +631,22 @@
 
 PVE::Cluster::cfs_update();
 
-PVE::CLIHandler::handle_cmd($cmddef, "pvecm", $cmd, \@ARGV);
+PVE::CLIHandler::handle_cmd($cmddef, "pvecm", $cmd, \@ARGV, undef, $0);
 
 exit 0;
+
+__END__
+
+=head1 NAME
+
+pvecm - Proxmox VE cluster manager toolkit
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+pvecm is a program to manage the cluster configuration. It can be used
+to create a new cluster, join nodes to a cluster, leave the cluster,
+get status information and do various other cluster related tasks.
+
+



More information about the pve-devel mailing list