1 # Copyright (C) 2002, 2003, 2004 Simon Josefsson. -*- makefile -*-
3 # This file is part of GNU Libidn.
5 # GNU Libidn is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU Lesser General Public License as
7 # published by the Free Software Foundation; either version 2.1 of
8 # the License, or (at your option) any later version.
10 # GNU Libidn is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with GNU Libidn; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 BUILT_SOURCES = Makefile.gdoc
21 Makefile.gdoc: $(top_builddir)/configure Makefile.am Makefile.gdoci $(GDOC_SRC)
22 echo '# This file is automatically generated. DO NOT EDIT! -*- makefile -*-' > Makefile.gdoc
24 echo 'gdoc_TEXINFOS =' >> Makefile.gdoc
25 echo 'gdoc_MANS =' >> Makefile.gdoc
27 for file in $(GDOC_SRC); do \
28 shortfile=`basename $$file`; \
29 echo "#" >> Makefile.gdoc; \
30 echo "### $$shortfile" >> Makefile.gdoc; \
31 echo "#" >> Makefile.gdoc; \
32 echo "gdoc_TEXINFOS += $(GDOC_TEXI_PREFIX)$$shortfile.texi" >> Makefile.gdoc; \
33 echo "$(GDOC_TEXI_PREFIX)$$shortfile.texi: $$file" >> Makefile.gdoc; \
34 echo 'TABmkdir -p `dirname $$@`' | sed "s/TAB/ /" >> Makefile.gdoc; \
35 echo 'TAB$$(PERL) $$(top_srcdir)/doc/gdoc -texinfo $$(GDOC_TEXI_EXTRA_ARGS) $$< > $$@' | sed "s/TAB/ /" >> Makefile.gdoc; \
36 echo >> Makefile.gdoc; \
37 functions=`$(PERL) $(srcdir)/gdoc -listfunc $$file`; \
38 for function in $$functions; do \
39 echo "# $$shortfile: $$function" >> Makefile.gdoc; \
40 echo "gdoc_TEXINFOS += $(GDOC_TEXI_PREFIX)$$function.texi" >> Makefile.gdoc; \
41 echo "$(GDOC_TEXI_PREFIX)$$function.texi: $$file" >> Makefile.gdoc; \
42 echo 'TABmkdir -p `dirname $$@`' | sed "s/TAB/ /" >> Makefile.gdoc; \
43 echo 'TAB$$(PERL) $$(top_srcdir)/doc/gdoc -texinfo $$(GDOC_TEXI_EXTRA_ARGS) -function'" $$function"' $$< > $$@' | sed "s/TAB/ /" >> Makefile.gdoc; \
44 echo >> Makefile.gdoc; \
45 echo "gdoc_MANS += $(GDOC_MAN_PREFIX)$$function.3" >> Makefile.gdoc; \
46 echo "$(GDOC_MAN_PREFIX)$$function.3: $$file" >> Makefile.gdoc; \
47 echo 'TABmkdir -p `dirname $$@`' | sed "s/TAB/ /" >> Makefile.gdoc; \
48 echo 'TAB$$(PERL) $$(top_srcdir)/doc/gdoc -man $$(GDOC_MAN_EXTRA_ARGS) -function'" $$function"' $$< > $$@' | sed "s/TAB/ /" >> Makefile.gdoc; \
49 echo >> Makefile.gdoc; \
51 echo >> Makefile.gdoc; \