upload source
[external/xmlsec1.git] / docs / Makefile.am
1 NULL =
2
3 SUBDIRS=api
4
5 TARGET_DIR=@XMLSEC_DOCDIR@
6
7 EXTRA_DIST=\
8         images \
9         xmlsec.xsl \
10         $(NULL)
11
12 # just do nothing
13 all:
14
15 docs: api-docs-create docs-format
16
17 api-docs-create:
18         @(cd api; \
19             $(MAKE) docs; \
20             echo "Cleaning up result files"; \
21             perl ../../scripts/remove-gtkdoclink.pl `find . -name "*.html" -print` \
22         )
23
24 api-docs-clean:
25         @(cd api; $(MAKE) clean)
26
27 docs-format:
28         @(echo "Formatting html documents"; \
29         for i in `find . -name "*.html" -print`; \
30         do \
31             top_folder=`echo $$i | sed 's#/[^/]*$$#/#' | sed 's#\./##' | \
32                         sed 's#[^/]*/#../#g'`; \
33             echo "Processing $$i ($$top_folder)"; \
34             xsltproc --html --stringparam topfolder "$$top_folder" \
35                      --output $$i.tmp ./xmlsec.xsl $$i; \
36             if [ $$? != 0 ]; \
37             then \
38                 echo "ERROR: processing file $$i"; \
39                 exit 1; \
40             fi; \
41             mv $$i.tmp $$i; \
42         done)
43
44 dist-hook:
45         @$(CP) -p $(srcdir)/*.html $(distdir)
46
47 install-data-local: 
48         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
49         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/images
50         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/api
51         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/api/images
52         -@INSTALL@ -m 0644 $(srcdir)/*.html $(DESTDIR)$(TARGET_DIR)
53         -@INSTALL@ -m 0644 $(srcdir)/images/*.gif $(srcdir)/images/*.png $(DESTDIR)$(TARGET_DIR)/images
54         -@INSTALL@ -m 0644 $(srcdir)/api/*.html $(srcdir)/api/*.png $(srcdir)/api/*.sgml $(DESTDIR)$(TARGET_DIR)/api
55         -@INSTALL@ -m 0644 $(srcdir)/api/images/*.png $(DESTDIR)$(TARGET_DIR)/api/images
56
57 uninstall-local:
58         @rm -rf $(DESTDIR)$(TARGET_DIR)