From ec688b4723a041044226358bcd4dd6e2da39da49 Mon Sep 17 00:00:00 2001 From: Luca Muscariello Date: Thu, 23 Feb 2017 17:01:02 +0100 Subject: Initial commit: cframework. Longbow and Libparc Change-Id: I90378dbd30da6033b20fb1f829b3b822cf366c59 Signed-off-by: Luca Muscariello --- libparc/parc/HeaderDoc/gen_parc_docset.sh | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 libparc/parc/HeaderDoc/gen_parc_docset.sh (limited to 'libparc/parc/HeaderDoc/gen_parc_docset.sh') diff --git a/libparc/parc/HeaderDoc/gen_parc_docset.sh b/libparc/parc/HeaderDoc/gen_parc_docset.sh new file mode 100644 index 00000000..3a4dbbd4 --- /dev/null +++ b/libparc/parc/HeaderDoc/gen_parc_docset.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# Copyright (c) 2017 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SETTING +# location of XCODE docset +DOCSET_DIR=../Docset/com.parc.csl.parc.docset + +# location of html code document, generated by headerdoc2html +DOCUMENT_DIR=$DOCSET_DIR/Contents/Resources/Documents + +# location of hautelook templates, Info.plist Nodes.xml +DOCSET_TEMPLATE_DIR=./ + +# location of our source code, where headerdoc2html will spider through +SOURCE_DIR=../algol/ + +# clear screen +clear + +# delete old docset and start from fresh, this will kill XCODE if its running. good for development only, comment out for production. +rm -rf $DOCSET_DIR + +# create document directory +mkdir -p $DOCUMENT_DIR + +# generate html code document for source code. -j will recognize java comment tag ex. /** */ +# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/HeaderDoc/usage/usage.html#//apple_ref/doc/uid/TP40001215-CH337-SW2 +headerdoc2html --config-file headerDoc2HTML.config --class-as-composite -j -o $DOCUMENT_DIR $SOURCE_DIR +#headerdoc2html -j -o $DOCUMENT_DIR $SOURCE_DIR/*.h + +# generate main index file. -d will generate Tokens.xml for us. +# +# http://opensource.apple.com/source/headerdoc/ +# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/HeaderDoc/usage/usage.html#//apple_ref/doc/uid/TP40001215-CH337-SW1 +# +gatherheaderdoc -d $DOCUMENT_DIR + +# copy required template files for apple docset +cp $DOCSET_TEMPLATE_DIR/Info.plist $DOCSET_DIR/Contents/ +cp $DOCSET_TEMPLATE_DIR/Nodes.xml $DOCSET_DIR/Contents/Resources/ +cp $DOCUMENT_DIR/Tokens.xml $DOCSET_DIR/Contents/Resources/ + +# create and validate apple docset indexes +/Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil index -verbose -debug $DOCSET_DIR +/Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil validate -verbose -debug $DOCSET_DIR + -- cgit 1.2.3-korg