From 52c423baefd461f72b7d32b731fdfe4034f96c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 8 Jun 2005 10:00:31 +0000 Subject: [PATCH] coreutils man documentation git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13008 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/coreutils/man/Jamfile | 38 ++++++++++++++++++- .../man/{coreutils.xml => coreutils.src} | 0 2 files changed, 36 insertions(+), 2 deletions(-) rename src/bin/coreutils/man/{coreutils.xml => coreutils.src} (100%) diff --git a/src/bin/coreutils/man/Jamfile b/src/bin/coreutils/man/Jamfile index da1703a640..76504ccbfd 100644 --- a/src/bin/coreutils/man/Jamfile +++ b/src/bin/coreutils/man/Jamfile @@ -1,6 +1,6 @@ SubDir OBOS_TOP src bin coreutils man ; -Man2Docs +local manpages = basename.1 cat.1 chgrp.1 @@ -92,4 +92,38 @@ whoami.1 yes.1 ; -Includes [ FGristFiles coreutils.xml ] : [ FGristFiles basename.xml cat.xml date.xml cut.xml ] ; +Man2Docs $(manpages) ; + +rule GenerateChapterXML +{ + local sources = $(3) ; + local template = [ FGristFiles $(2) ] ; + local target = [ FGristFiles $(1) ] ; + + MakeLocate $(target) : [ FDirName $(OBOS_OBJECT_TARGET) documentation Shell_Tools ] ; + SEARCH on $(template) = $(SEARCH_SOURCE) ; + + local xmls = [ FGristFiles $(sources:S=.xml) ] ; + Includes $(target) : $(xmls) ; + Depends files : $(target) ; + Depends $(target) : $(template) ; + XMLS on $(target) = "\ +" ; + GenerateChapterXML1 $(target) : $(template) ; + LocalClean clean : $(target) ; +} + +actions GenerateChapterXML1 +{ + head -5 $(2) > $(1) ; + cat << EOF >> $(1) + $(XMLS) + EOF + tail -2 $(2) >> $(1) ; +} + + +GenerateChapterXML coreutils.xml : + coreutils.src + : $(manpages) ; + diff --git a/src/bin/coreutils/man/coreutils.xml b/src/bin/coreutils/man/coreutils.src similarity index 100% rename from src/bin/coreutils/man/coreutils.xml rename to src/bin/coreutils/man/coreutils.src