source: branches/port5/GDEHELP/Makefile.helpfiles

Last change on this file was 8203, checked in by westram, 13 years ago
  • removed molphy (protml)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1# -*-Mode: Makefile;-*-  (emacs! this is a makefile!)
2
3.SUFFIXES: .doc .help .html
4
5# GENHELPDEST, GENDOCDEST and HELPFILELIST are passed from 'Makefile'
6
7HELP_NAMES=$(shell cat $(HELPFILELIST))
8HELP_TARGETS=$(addprefix $(GENHELPDEST)/,$(HELP_NAMES))
9HELP_PLAIN=./HELP_PLAIN
10HELP_WRITTEN=./HELP_WRITTEN
11HEADER=arb_help.head
12
13all: info forcedoc $(HELP_TARGETS)
14
15info:
16        @echo "----------------------------------------------------------------"
17        @echo "Collecting documentation for external programs used in GDE menus"
18#       @echo "HELP_TARGETS=$(HELP_TARGETS)"
19
20# ------------------------------------------------------------
21# rules to generate helpfiles
22# we need rules here for each helpfile specified on an 'itemhelp' line in GDE menus.
23
24ARBHOME=..
25GDE=$(ARBHOME)/GDE
26
27CLUSTALW=$(GDE)/CLUSTALW
28CLUSTALW_HELP=$(CLUSTALW)/clustalw_help
29CLUSTALW_DOC=$(CLUSTALW)/clustalw.doc
30
31$(GENHELPDEST)/clustalw.help: $(CLUSTALW_HELP) $(CLUSTALW_DOC)
32        ./genhelptree.sh $@ "$(subst .help,,$(notdir $@))" $(HEADER) $^
33
34AXML_HELP=$(GDE)/AxML/AxML.doc
35FASTDNAML_DOC=$(GDE)/FASTDNAML/fastDNAml.doc
36
37$(GENHELPDEST)/dnaml.help: $(AXML_HELP) $(FASTDNAML_DOC)
38        ./genhelptree.sh $@ "$(subst .help,,$(notdir $@))" $(HEADER) $^
39
40READSEQ=$(ARBHOME)/READSEQ
41READSEQ_DOC_NAMES=Readme Formats Readseq.help
42READSEQ_DOCS=$(addprefix $(READSEQ)/,$(READSEQ_DOC_NAMES))
43
44$(GENHELPDEST)/readseq.help: $(READSEQ_DOCS)
45        ./genhelptree.sh $@ "$(subst .help,,$(notdir $@))" $(HEADER) $^
46
47PHYLIP_DISTANCE_HELP_NAMES=fitch kitsch neighbor dnadist protdist
48PHYLIP_DISTANCE_HELPS=$(addsuffix .doc,$(addprefix $(GENDOCDEST)/,$(PHYLIP_DISTANCE_HELP_NAMES)))
49
50$(GENHELPDEST)/phylip_distance.help: $(PHYLIP_DISTANCE_HELPS)
51        ./genhelptree.sh $@ "$(subst .help,,$(notdir $@))" $(HEADER) $^
52
53# all help files in ./HELP_PLAIN are automatically found
54
55$(GENHELPDEST)/%.help: $(HELP_PLAIN)/%.help $(HEADER)
56        ./genhelp.sh $@ "$(subst .help,,$(notdir $@))" $(HEADER) $<
57
58# all help files in ./HELP_DOC_GEN are automatically found
59
60$(GENHELPDEST)/%.help: $(GENDOCDEST)/%.doc $(HEADER)
61        ./genhelp.sh $@ "$(subst .help,,$(notdir $@))" $(HEADER) $<
62
63# ------------------------------------------------------------
64# rules to generate plain doc from provided html files
65
66HELP_TREEPUZZLE=../GDE/TREEPUZZLE/doc
67HELP_PHYLIP=../GDE/PHYLIP/doc
68HELP_PHYML=../GDE/PHYML
69
70FORCED_DOC_NAMES=proml dnapars protpars phyml
71LYNX_PARA=-dump -nolist -display_charset=iso-8859-1
72
73$(GENDOCDEST)/%.doc: $(HELP_PHYLIP)/%.html Makefile.helpfiles
74        lynx $(LYNX_PARA) $< | sed -e 's/©/(C)/' > $@
75        test -s $@ || (echo $@ not generated or empty && rm $@ && false)
76
77$(GENDOCDEST)/treepuzzle.doc: $(HELP_TREEPUZZLE)/manual.html Makefile.helpfiles
78        lynx $(LYNX_PARA) $< | sed -e 's/©/(C)/' > $@
79        test -s $@ || (echo $@ not generated or empty && rm $@ && false)
80
81$(GENDOCDEST)/phyml.doc: $(HELP_PHYML)/usersguide_phyliplike.html Makefile.helpfiles
82        lynx $(LYNX_PARA) $< | sed -e 's/©/(C)/' > $@
83        test -s $@ || (echo $@ not generated or empty && rm $@ && false)
84
85FORCED_DOCS=$(addsuffix .doc,$(addprefix $(GENDOCDEST)/,$(FORCED_DOC_NAMES)))
86forcedoc: $(FORCED_DOCS)
87
88# ------------------------------------------------------------
89# default rule to raise error if no rule is given to generate a helpfile.
90# dont warn if there's a help file in HELP_WRITTEN
91# (files there are processed by ../HELP_SOURCE/genhelp/Makefile )
92
93$(GENHELPDEST)/%.help:
94        @( test -f $(HELP_WRITTEN)/$(notdir $@) ) \
95        || \
96        ( \
97                echo "Makefile.helpfiles:18: Error: No rule to make $(notdir $@) (to which is referred to in a GDE menu)" ; \
98                grep -n $(notdir $@) MENUS/*.menu ; \
99                false )
100
101clean:
102        rm -f $(GENHELPDEST)/*.help
103        rm -f $(GENDOCDEST)/*.doc
Note: See TracBrowser for help on using the repository browser.