build: separately build the docs for the NSIS installer
[adg.git] / Makefile.am
blob5adb21a8ec4a83d7538ffdd63228c7d12fa0e490
1 include $(top_srcdir)/build/Makefile.am.common
3 xml2txt_stylesheet=             $(abs_srcdir)/docs/docbook2txt.xsl
4 xml2txt_command=                $(AM_V_GEN)if test -x $(XSLTPROC) ; then : ; else \
5                                   echo ' *WARN  libxslt-1.0.19 or later is required to generate $@' ; \
6                                   touch $@ ; \
7                                   exit 0 ; \
8                                 fi ; \
9                                 $(XSLTPROC) --novalid -o $@ $(xml2txt_stylesheet)
10 ACLOCAL_AMFLAGS=                -I build
11 AM_DISTCHECK_CONFIGURE_FLAGS=   --enable-pango \
12                                 --enable-gtk-doc \
13                                 --enable-test-framework \
14                                 --enable-introspection \
15                                 --with-gtk \
16                                 --with-glade-catalogdir
18 BUILT_SOURCES=                  ChangeLog \
19                                 README \
20                                 NEWS \
21                                 TODO \
22                                 CONTRIBUTING \
23                                 HACKING
25 EXTRA_DIST=                     COPYING \
26                                 ChangeLog-0.2.1 \
27                                 INSTALL \
28                                 THANKS \
29                                 adg.doap \
30                                 build/configure-win32 \
31                                 build/configure-win64 \
32                                 build/adg-header.bmp \
33                                 build/adg-welcome.bmp \
34                                 build/adg.ico \
35                                 build/gschemas.compiled \
36                                 build/config.rpath \
37                                 $(BUILT_SOURCES)
38 CLEANFILES=                     test-report.xml \
39                                 test-report.html \
40                                 perf-report.xml \
41                                 perf-report.html \
42                                 full-report.xml \
43                                 full-report.html
45 SUBDIRS=                        src
47 if HAVE_GTK
48 SUBDIRS+=                       demo
49 endif
51 SUBDIRS+=                       po \
52                                 docs
55 if OS_WINDOWS
57 INSTALLER=adg-$(PACKAGE_VERSION)-win$(PACKAGE_ARCH).exe
59 installer: $(INSTALLER)
61 .phony: installer
63 # The installer needs the docs but the MinGW toolchain does not have
64 # gtk-doc installed. Issue #148: http://dev.entidi.com/p/adg/issues/148/
65 _host/docs/adg/html/index.html:
66         -mkdir _host ; \
67         cd _host && \
68         $(abs_srcdir)/configure \
69                 --prefix= \
70                 --disable-dependency-tracking \
71                 --disable-fast-install \
72                 --disable-nls \
73                 --disable-introspection \
74                 --disable-test-framework \
75                 --enable-gtk-doc \
76                 --enable-gtk-doc-html && \
77         make -j7 ; \
78         cd ..
80 clean-local:
81         -rm -fr _host
83 $(INSTALLER): _host/docs/adg/html/index.html
84         $(MAKENSIS) -NOCD $(srcdir)/build/adg.nsi
86 mostlyclean-local:
87         -rm $(INSTALLER)
89 endif
92 # Creating ChangeLog files from git log:
93 # idea stolen from cairo/build/Makefile.am.changelog
94 ChangeLog:
95         $(AM_V_GEN)if test -d "$(abs_srcdir)/.git"; then \
96           ( cd "$(abs_srcdir)" && git log --stat > $@ ) ; \
97         else \
98           echo ' *WARN  A git checkout is required to generate $@' ; \
99           touch $@ ; \
100         fi
102 # Autogenerated text docs
103 README: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/README.xml
104         $(xml2txt_command) $(abs_srcdir)/docs/adg/README.xml
106 NEWS: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/NEWS.xml
107         $(xml2txt_command) $(abs_srcdir)/docs/adg/NEWS.xml
109 TODO: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/TODO.xml
110         $(xml2txt_command) $(abs_srcdir)/docs/adg/TODO.xml
112 CONTRIBUTING: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/CONTRIBUTING.xml
113         $(xml2txt_command) $(abs_srcdir)/docs/adg/CONTRIBUTING.xml
115 HACKING: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/HACKING.xml
116         $(xml2txt_command) $(abs_srcdir)/docs/adg/HACKING.xml