xref: /petsc/systems/Apple/OSX/bin/makedocs (revision a211788b13239c16d45a92650c57588aec0b3cfc)
1#!/bin/sh
2#
3# This script adds documentation to the Apple Mac OS X framework for PETSc created with makeframework
4#
5#After running makeframework and generating the PETSc documention then just run this script
6#    3) you can also use the framework inside Xcode by simply indicating the targets dependence on the PETSc framework
7#
8#
9cd ${PETSC_DIR}/${PETSC_ARCH}
10rm -rf PETSc.docset
11mkdir PETSc.docset
12mkdir PETSc.docset/Contents
13mkdir PETSc.docset/Contents/Resources
14mkdir PETSc.docset/Contents/Resources/Documents
15cat <<EOF > PETSc.docset/Contents/Info.plist
16<?xml version="1.0" encoding="UTF-8"?>
17<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
18<plist version="1.0">
19<dict>
20        <key>CFBundleName</key>
21        <string>PETSc Documentation</string>
22	<key>CFBundleIdentifier</key>
23	<string>gov.anl.mcs.PETSc.docset</string>
24        <key>DocSetPublisherIdentifier</key>
25        <string>gov.anl.mcs.PETSc.documentation</string>
26        <key>DocSetPublisherName</key>
27        <string>PETSc</string>
28</dict>
29</plist>
30EOF
31
32cat <<EOF > PETSc.docset/Contents/Resources/Nodes.xml
33<?xml version="1.0" encoding="UTF-8"?>
34<DocSetNodes version="1.0">
35    <TOC>
36        <Node type="file">
37            <Name>All PETSc manual pages</Name>
38            <Path>manualpages</Path>
39            <File>singleindex.html</File>
40        </Node>
41    </TOC>
42</DocSetNodes>
43EOF
44
45cp -r ${LOC}/docs/manualpages PETSc.docset/Contents/Resources/Documents
46
47/Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil index -debug -verbose -skip-api  PETSc.docset
48
49
50