]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add targets to build Xcode docsets.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 6 Dec 2008 04:21:12 +0000 (04:21 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 6 Dec 2008 04:21:12 +0000 (04:21 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@8163 7a7537e8-13f0-0310-91df-b6672ffda945

cups/Makefile
filter/Makefile
tools/makedocset [new file with mode: 0755]

index 2c9536c7e8c6f71113d4defdd00dfca237708b04..9d8b8d455584d314e13c604e7d367df0b143a4ec 100644 (file)
@@ -614,6 +614,42 @@ framedhelp:
                backchannel.c backend.h backend.c sidechannel.c sidechannel.h
 
 
+docsets:
+       echo Generating CUPS API documentation sets...
+       ../tools/makedocset --docset org.cups.overview.docset \
+               --title "Introduction to CUPS Programming" \
+               --header api-overview.header --intro api-overview.shtml
+       ../tools/makedocset --docset org.cups.array.docset \
+               --title "Array API" \
+               --header api-array.header --intro api-array.shtml \
+               array.h array.c
+       ../tools/makedocset --docset org.cups.cups.docset \
+               --title "CUPS API" \
+               --header api-cups.header --intro api-cups.shtml \
+               cups.h dest.c language.c notify.c \
+               options.c tempfile.c usersys.c \
+               util.c
+       ../tools/makedocset --docset org.cups.filedir.docset \
+               --title "File and Directory APIs" \
+               --header api-filedir.header --intro api-filedir.shtml \
+               file.h file.c dir.h dir.c
+       ../tools/makedocset --docset org.cups.ppd.docset \
+               --title "PPD API" \
+               --header api-ppd.header --intro api-ppd.shtml \
+               ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c \
+               page.c ppd.c
+       ../tools/makedocset --docset org.cups.httpipp.docset \
+               --title "HTTP and IPP APIs" \
+               --header api-httpipp.header --intro api-httpipp.shtml \
+               http.h ipp.h auth.c getdevices.c getputfile.c encode.c \
+               http.c http-addr.c http-support.c ipp.c ipp-support.c \
+               md5passwd.c request.c
+       ../tools/makedocset --docset org.cups.filter.docset \
+               --title "Filter and Backend Programming" \
+               --header api-filter.header --intro api-filter.shtml \
+               backchannel.c backend.h backend.c sidechannel.c sidechannel.h
+
+
 #
 # Dependencies...
 #
index 63422ba826f090f30f2746c7e493ce086b06ca92..120ac58c51b27b2f845ea25cc6f90662641edd08 100644 (file)
@@ -232,6 +232,13 @@ framedhelp:
                --header api-raster.header --intro api-raster.shtml \
                ../cups/raster.h interpret.c raster.c
 
+docsets:
+       echo Generating CUPS API documentation sets...
+       ../tools/makedocset --docset org.cups.raster.docset \
+               --title "Raster API" \
+               --header api-raster.header --intro api-raster.shtml \
+               ../cups/raster.h interpret.c raster.c
+
 
 #
 # bannertops
diff --git a/tools/makedocset b/tools/makedocset
new file mode 100755 (executable)
index 0000000..c757e5a
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/sh
+#
+# "$Id$"
+#
+# Script to make Xcode documentation sets.
+#
+
+docversion="1.4.`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`"
+docset=""
+sources=""
+header=""
+intro=""
+title=""
+
+while test $# -gt 0; do
+       arg="$1"
+       shift
+
+       case "$arg" in
+               --docset)
+                       docset="$1"
+                       shift
+                       ;;
+               --header)
+                       header="$1"
+                       shift
+                       ;;
+               --intro)
+                       intro="$1"
+                       shift
+                       ;;
+               --title)
+                       title="$1"
+                       shift
+                       ;;
+               *)
+                       sources="$sources $arg"
+                       ;;
+       esac
+done
+
+echo "<h1>$title</h1>" >"$header.ds"
+cat "$header" >>"$header.ds"
+
+mxmldoc --docset "$docset" --docversion "$docversion" \
+       --feedname cups.org --feedurl http://www.cups.org/docsets.atom \
+       --title "$title" --css ../doc/cups-printable.css \
+       --header "$header.ds" --intro "$intro" $sources || exit 1
+rm -f "$header.ds"
+
+if test ! -d ../docsets; then
+       mkdir ../docsets
+fi
+
+xar="`basename \"$docset\" .docset`.xar"
+
+/Developer/usr/bin/docsetutil package --output "../docsets/$xar" \
+       --atom ../docsets/docsets.atom \
+       --download-url "http://www.cups.org/docsets/$xar" "$docset" || exit 1
+
+rm -rf "$docset"
+
+
+#
+# End of "$Id$".
+#