OSDN Git Service

add docs dist rules
[ccunit/ccunit.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 #    Copyright (C) 2003 TSUTSUMI Kikuo.
3 #    This file is part of the CCUnit Library.
4
5 #    The CCUnit Library is free software; you can redistribute it and/or
6 #    modify it under the terms of the GNU Lesser General Public License
7 #    as published by the Free Software Foundation; either version 2.1 of
8 #    the License, or (at your option) any later version.
9
10 #    The CCUnit Library is distributed in the hope that it will be
11 #    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 #    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #    GNU Lesser General Public License for more details.
14
15 #    You should have received a copy of the GNU Lesser General Public
16 #    License along with the CCUnit Library; see the file COPYING.LESSER.
17 #    If not, write to the Free Software Foundation, Inc., 59 Temple
18 #    Place - Suite 330, Boston, MA 02111-1307, USA.  
19
20 ## $Id$
21
22 ACLOCAL_AMFLAGS = -I config
23
24 SUBDIRS=. src tests
25 DIST_SUBDIRS= $(SUBDIRS) doc
26 AM_CFLAGS=-I$(top_srcdir)/src -Wall -Werror
27 AM_LDFLAGS=-L$(top_srcdir)/src/ccunit
28 CLEANFILES=*~ .*~ ./\#*\# *.log configure.scan *.tar.gz *.tar.bz2 *.zip \
29         config/*~ config/.*~
30
31 EXTRA_DIST = BUGS ChangeLog ChangeLog.0 \
32         config/arg_with_doxygen.m4 \
33         config/ac_create_prefix_config_h.m4
34
35 docs:
36         cd doc; $(MAKE) docs
37
38 distdocdir=$(PACKAGE)-$(VERSION)-doc
39
40 dist-docs: distdocdir
41         cd doc; $(MAKE) dist-docs
42         $(AMTAR) chof - $(distdocdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdocdir).tar.gz
43         $(AMTAR) chof - $(distdocdir) | bzip2 -9 -c >$(distdocdir).tar.bz2
44         -rm -f $(distdocdir).zip
45         zip -rq $(distdocdir).zip $(distdocdir)
46         { test ! -d $(distdocdir) \
47           || { find $(distdocdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
48                 && rm -fr $(distdocdir); }; }
49
50 distdocdir: docs
51         { test ! -d $(distdocdir) \
52           || { find $(distdocdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
53                 && rm -fr $(distdocdir); }; }
54         mkdir $(distdocdir)
55         $(mkinstalldirs) $(distdocdir)/html