Adding more/most files to protected list.
[shibboleth/cpp-sp.git] / configs / Makefile.am
1 ## $Id$ 
2
3 AUTOMAKE_OPTIONS = foreign
4
5 logdir=${localstatedir}/log/shibboleth
6 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
7 pkgsysconf_DATA = \
8         apache.config \
9         apache2.config \
10         inqueue.pem
11
12 # The config files are installed "special".  Unlike the entries in
13 # pkgsysconf_DATA, these files are installed as "foo.dist" and only
14 # installed as "foo" if "foo" does not already exist.  In other words,
15 # the config files will not overwrite existing versions.
16 CONFIGFILES = \
17         shibboleth.xml \
18         shibboleth.logger \
19         shire.logger \
20         shar.logger \
21         accessError.html \
22         rmError.html \
23         shireError.html \
24         AAP.xml \
25         IQ-sites.xml \
26         IQ-trust.xml \
27         shar.key \
28         shar.crt
29
30 #
31 # Some of these need building
32 #
33 do-build-file:
34         rm -f ${FILE}.tmp
35         sed < ${srcdir}/${FILE}.in > ${FILE}.tmp \
36             -e 's:@-PREFIX-@:${prefix}:' \
37             -e 's:@-LIBEXECDIR-@:${libexecdir}:' \
38             -e 's:@-PKGSYSCONFDIR-@:${pkgsysconfdir}:' \
39             -e 's:@-LOGDIR-@:${logdir}:'
40         cmp -s ${FILE} ${FILE}.tmp || mv ${FILE}.tmp ${FILE}
41         rm -f ${FILE}.tmp
42
43 apache.config: ${srcdir}/apache.config.in Makefile ${top_builddir}/config.status
44         $(MAKE) do-build-file FILE=$@
45
46 apache2.config: ${srcdir}/apache2.config.in Makefile ${top_builddir}/config.status
47         $(MAKE) do-build-file FILE=$@
48
49 shar.logger: ${srcdir}/shar.logger.in Makefile ${top_builddir}/config.status
50         $(MAKE) do-build-file FILE=$@
51
52 shire.logger: ${srcdir}/shire.logger.in Makefile ${top_builddir}/config.status
53         $(MAKE) do-build-file FILE=$@
54
55 shibboleth.xml: ${srcdir}/shibboleth.xml.in Makefile ${top_builddir}/config.status
56         $(MAKE) do-build-file FILE=$@
57
58 all-data-local: $(CONFIGFILES)
59
60 install-data-local:
61         $(mkinstalldirs) $(DESTDIR)$(logdir)
62         $(mkinstalldirs) $(DESTDIR)$(prefix)/data
63         $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
64         for f in $(CONFIGFILES); do \
65                 if test ! -f $(DESTDIR)${pkgsysconfdir}/$$f; then \
66                         $(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}; \
67                 fi; \
68                 $(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}/$$f.dist; \
69         done
70
71 CLEANFILES = \
72         apache.config \
73         apache2.config \
74         shar.logger \
75         shire.logger \
76         shibboleth.xml
77
78 EXTRA_DIST = .cvsignore \
79         shibboleth.xml.in \
80         shire.logger.in \
81         shar.logger.in \
82         apache.config.in \
83         apache2.config.in \
84         shibboleth.logger \
85         accessError.html \
86         rmError.html \
87         shireError.html \
88         AAP.xml \
89         IQ-sites.xml \
90         IQ-trust.xml \
91         inqueue.pem \
92         shar.key \
93         shar.crt