summaryrefslogtreecommitdiff
path: root/doc/api/Makefile.am
blob: 5db7b102790d7cd15c935c0be15ff31e6c62ab24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
if CREATE_API_DOCS
noinst_DATA = html
endif

EXTRA_DIST = classpath-copyright.xml

dist-hook: 
	-$(mkinstalldirs) $(distdir)
	@if [ -d $(srcdir)/xslt ]; then \
	  echo $(CP) -R $(srcdir)/xslt $(distdir); \
	  $(CP) -R $(srcdir)/xslt $(distdir); \
	fi
	@if [ -d html ]; then \
	  echo $(CP) -R html $(distdir); \
	  $(CP) -R html $(distdir); \
	else \
	  echo "Error: did not configure --enable-gjdoc"; exit 1; \
	fi

htmllist := $(shell $(FIND) html | grep -v "^html$$")

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api
	@list='$(htmllist)'; for p in $$list; do \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  if test -f "$$p"; then \
	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f"; \
	    $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/api/$$f; \
	  elif test -d "$$p"; then \
	    $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api/$$f; \
          fi; \
        done

uninstall-local:
	@list='$(htmllist)'; for p in $$list; do \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  if test -f "$$p"; then \
	    echo " rm -f $(DESTDIR)$(pkgdatadir)/api/$$f"; \
	    rm -f $(DESTDIR)$(pkgdatadir)/api/$$f; \
          fi; \
        done

html: create_xml create_catalog create_html

packages := $(shell cd $(top_srcdir) && $(FIND) java javax -type d ! -regex .*CVS | tr '/' '.' )
#| grep -v "^java\$" )
date := $(shell $(DATE))

clean:
	-rm -rf xml
	-rm -rf html
	-rm -f gjdoccatalog.xml
	-rm -f gjdoc_rawcomment.cache

create_xml:
	-$(MKDIR) xml > /dev/null 2>&1
	$(GJDOC) -sourcepath \
		"$(top_srcdir):$(top_srcdir)/vm/reference" \
		-doclet gnu.classpath.tools.doclets.xmldoclet.Driver \
		-d xml $(packages) 
	-touch create_xml

create_catalog:
	$(XMLCATALOG) --noout --create \
		--add "public" \
		"-//GNU//DTD Gjdoc XML V0.1.1//EN" \
		http://www.gnu.org/software/cp-tools/dtd/gjdoc.dtd \
		--add "rewriteSystem" \
		http://www.gnu.org/software/cp-tools/dtd/ \
		file:///usr/local/share/gjdoc/dtd/ \
		gjdoccatalog.xml 
	-touch create_catalog

create_html:
	-$(MKDIR) html > /dev/null 2>&1
	-$(CP) -Ru $(srcdir)/xslt/common html
	$(XSLTPROC) \
		--novalid \
		--param verbose "1" \
		--param now "'$(date)'" \
		--param copyrightfile "'$(srcdir)/classpath-copyright.xml'" \
		--param windowtitle "'GNU Classpath CVS'" \
		--param targetdir "'html'" \
		"$(srcdir)/xslt/gjdocxml2html.xsl" \
		"xml/index.xml"
	-touch create_html