~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to .pc/htmlgen-fakeroot/include/Make/Html.make

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#NOTE: parts of the header are generated in ../../lib/gis/parser.c
 
2
 
 
3
HTMLDIR = $(ARCH_DISTDIR)/docs/html
 
4
 
 
5
# generic html rules for all commands
 
6
 
 
7
ifdef CROSS_COMPILING
 
8
 
 
9
htmlcmd:
 
10
 
 
11
htmlscript:
 
12
 
 
13
htmletc:
 
14
 
 
15
htmldir:
 
16
 
 
17
htmlmulti:
 
18
 
 
19
else
 
20
 
 
21
htmlgen = \
 
22
        $(MODULE_TOPDIR)/tools/mkhtml.sh $(PGM) ; \
 
23
        $(MKDIR) $(HTMLDIR) ; \
 
24
        $(INSTALL_DATA) $(PGM).tmp.html $(HTMLDIR)/$(PGM).html ; \
 
25
        for file in  *.png *.jpg ; do \
 
26
                head -n 1 $$file | grep '^\#!' > /dev/null ; \
 
27
                if [ $$? -ne 0 ] ; then \
 
28
                   $(INSTALL_DATA) $$file $(HTMLDIR) ; \
 
29
                fi \
 
30
                done 2> /dev/null ; true
 
31
 
 
32
htmldesc = \
 
33
        GISRC=$(RUN_GISRC) \
 
34
        GISBASE=$(RUN_GISBASE) \
 
35
        PATH="$(BIN):$$PATH" \
 
36
        $(LD_LIBRARY_PATH_VAR)="$(BIN):$(ARCH_LIBDIR):$($(LD_LIBRARY_PATH_VAR))" \
 
37
        LC_ALL=C $(1) --html-description < /dev/null | grep -v '</body>\|</html>' > $(PGM).tmp.html ; true
 
38
 
 
39
$(HTMLDIR)/$(PGM).html: $(HTMLSRC)
 
40
        if [ "$(HTMLSRC)" != "" ] ; then $(call htmldesc,$<) ; fi
 
41
        $(call htmlgen)
 
42
 
 
43
# html rules for cmd commands
 
44
htmlcmd:
 
45
        $(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=$(BIN)/$(PGM)$(EXE)
 
46
 
 
47
# html rules for scripts
 
48
htmlscript:
 
49
        $(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=$(SCRIPTDIR)/$(PGM)
 
50
 
 
51
# html rules for ETC commands
 
52
htmletc:
 
53
        $(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=$(ETC)/$(PGM)$(EXE)
 
54
 
 
55
# html rules for intro pages in directories
 
56
htmldir:
 
57
        $(MAKE) $(HTMLDIR)/$(PGM).html
 
58
 
 
59
# html rules for multiple commands
 
60
htmlmulti:
 
61
        for prog in $(PROGRAMS) ; do $(MAKE) htmlcmd PGM=$$prog ; done
 
62
 
 
63
endif
 
64
 
 
65
.PHONY: htmlcmd htmletc htmlscript htmldir htmlmulti