Subversion Repositories TruePreview

[/] [tags/] [TruePreview-1.2/] [headerdoc.make] - Blame information for rev 30

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1 jhriggs
# Copyright (c) 2009, Jim Riggs, Christian Serving, L.L.C.
2
# All rights reserved.
3
#
4
# Redistribution and use in source and binary forms, with or without
5
# modification, are permitted provided that the following conditions are
6
# met:
7
#     * Redistributions of source code must retain the above copyright
8
#       notice, this list of conditions and the following disclaimer.
9
#     * Redistributions in binary form must reproduce the above
10
#       copyright notice, this list of conditions and the following
11
#       disclaimer in the documentation and/or other materials provided
12
#       with the distribution.
13
#     * Neither the name of Christian Serving, L.L.C. nor the names of
14
#       its contributors may be used to endorse or promote products
15
#       derived from this software without specific prior written
16
#       permission.
17
#
18
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 
30
##
31
# headerdoc.make
32
# Copyright (c) 2009 Jim Riggs, Christian Serving, L.L.C. All rights reserved.
33
#
34
# @(#) $Id: headerdoc.make 18 2009-10-09 12:21:32Z jhriggs $
35
##
36
 
37 3 jhriggs
SRC_DIR := $(PROJECT_DIR)/Source
38
HDR_DIR := $(PROJECT_DIR)/headerdoc
39
TMP_DIR := $(shell mktemp -d -t headerdoc)
40 1 jhriggs
 
41 3 jhriggs
HEADERDOC := headerdoc2html -C -t -u -o $(HDR_DIR)
42
GATHERHEADERDOC := gatherheaderdoc $(TMP_DIR)/headerdoc index.html
43 1 jhriggs
 
44 18 jhriggs
DOCS := $(patsubst $(SRC_DIR)/%.h,$(HDR_DIR)/%_h/index.html,$(wildcard $(SRC_DIR)/*.h))
45 1 jhriggs
 
46 3 jhriggs
$(HDR_DIR)/index.html : $(DOCS)
47
  cp -Rp $(HDR_DIR) $(TMP_DIR)/
48
  find $(TMP_DIR)/headerdoc -type d -name '.svn' -exec rm -rf {} +
49 1 jhriggs
  $(GATHERHEADERDOC)
50 3 jhriggs
  cp -R $(TMP_DIR)/headerdoc/ $(HDR_DIR)/
51
  rm -rf $(TMP_DIR)
52 1 jhriggs
 
53 18 jhriggs
$(DOCS) : $(HDR_DIR)/%_h/index.html : $(SRC_DIR)/%.h
54 1 jhriggs
  $(HEADERDOC) $?