| 1 | ## Cherokee: Makefile.am -*- makefile -*- |
|---|
| 2 | |
|---|
| 3 | SUBDIRS = m4 www icons themes qa doc . admin contrib cherokee cget windows dbslayer |
|---|
| 4 | SUFFIXES = .sample.pre .sample .h.pre .h |
|---|
| 5 | ACLOCAL_AMFLAGS = -I m4 |
|---|
| 6 | |
|---|
| 7 | bin_SCRIPTS = cherokee-config |
|---|
| 8 | |
|---|
| 9 | # M4 macro file for inclusion with autoconf |
|---|
| 10 | m4datadir = "$(datadir)/aclocal" |
|---|
| 11 | m4data_DATA = cherokee.m4 |
|---|
| 12 | |
|---|
| 13 | # Man pag |
|---|
| 14 | man_MANS = \ |
|---|
| 15 | cherokee.1 \ |
|---|
| 16 | cherokee-config.1 \ |
|---|
| 17 | cherokee-tweak.1 \ |
|---|
| 18 | cherokee-admin.1 \ |
|---|
| 19 | cherokee-worker.1 |
|---|
| 20 | |
|---|
| 21 | # pkg-config |
|---|
| 22 | pkgconfigdir = $(libdir)/pkgconfig |
|---|
| 23 | pkgconfig_DATA = cherokee.pc |
|---|
| 24 | |
|---|
| 25 | # Configuration files |
|---|
| 26 | cherokeeconfdir = $(sysconfdir)/cherokee |
|---|
| 27 | cherokeeadmindir = $(datadir)/cherokee/admin |
|---|
| 28 | |
|---|
| 29 | .h.pre.h: |
|---|
| 30 | sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%datadir%|${datadir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%libdir%|${libdir}|g; s|%localstatedir%|${localstatedir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%phpcgi%|${PHPCGI}|g" $< > $@ |
|---|
| 31 | .sample.pre.sample: |
|---|
| 32 | sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%datadir%|${datadir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%libdir%|${libdir}|g; s|%localstatedir%|${localstatedir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%phpcgi%|${PHPCGI}|g" $< > $@ |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | CONSTANTS_PRE = \ |
|---|
| 36 | constants.h.pre |
|---|
| 37 | |
|---|
| 38 | CONSTANTS = \ |
|---|
| 39 | $(CONSTANTS_PRE:.h.pre=.h) |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | CONFS_PRE = \ |
|---|
| 43 | cherokee.conf.sample.pre \ |
|---|
| 44 | performance.conf.sample.pre |
|---|
| 45 | |
|---|
| 46 | CONFS = \ |
|---|
| 47 | $(CONFS_PRE:.sample.pre=.sample) |
|---|
| 48 | |
|---|
| 49 | WINDOWS_PORT_FILES = \ |
|---|
| 50 | config.h.win32 |
|---|
| 51 | |
|---|
| 52 | CLEANFILES = \ |
|---|
| 53 | $(CONFS) \ |
|---|
| 54 | $(CONSTANTS) |
|---|
| 55 | |
|---|
| 56 | DISTCLEANFILES = \ |
|---|
| 57 | cherokee.pc |
|---|
| 58 | |
|---|
| 59 | COMPILATION_TESTS = \ |
|---|
| 60 | debian_testing.sh \ |
|---|
| 61 | debian_testing_chroot.sh |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | EXTRA_DIST = \ |
|---|
| 65 | http-cherokee.xml \ |
|---|
| 66 | cherokee.spec \ |
|---|
| 67 | cherokee.spec.in \ |
|---|
| 68 | SUNWcherokee.spec \ |
|---|
| 69 | pam.d_cherokee \ |
|---|
| 70 | cherokee.pc.in \ |
|---|
| 71 | $(m4data_DATA) \ |
|---|
| 72 | $(CONFS_PRE) \ |
|---|
| 73 | $(CONSTANTS_PRE) \ |
|---|
| 74 | $(man_MANS) \ |
|---|
| 75 | $(WINDOWS_PORT_FILES) \ |
|---|
| 76 | $(COMPILATION_TESTS) |
|---|
| 77 | |
|---|
| 78 | all-local: $(CONSTANTS) $(CONFS) |
|---|
| 79 | |
|---|
| 80 | install-data-local-config: |
|---|
| 81 | @$(mkinstalldirs) $(DESTDIR)$(pkgincludedir); |
|---|
| 82 | $(INSTALL_DATA) $(top_builddir)/config.h $(DESTDIR)$(pkgincludedir)/cherokee-config.h |
|---|
| 83 | |
|---|
| 84 | uninstall-local-config: |
|---|
| 85 | @if test -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; then \ |
|---|
| 86 | echo "rm -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h"; \ |
|---|
| 87 | $(RM) -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; \ |
|---|
| 88 | fi |
|---|
| 89 | |
|---|
| 90 | install-data-local: $(CONFS) install-data-local-config |
|---|
| 91 | @$(mkinstalldirs) $(DESTDIR)$(localstatedir) |
|---|
| 92 | @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run |
|---|
| 93 | @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/log |
|---|
| 94 | @$(mkinstalldirs) $(DESTDIR)$(cherokeeconfdir) |
|---|
| 95 | @$(mkinstalldirs) $(DESTDIR)$(cherokeeconfdir)/ssl |
|---|
| 96 | @$(mkinstalldirs) $(DESTDIR)$(cherokeeadmindir) |
|---|
| 97 | @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \ |
|---|
| 98 | echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \ |
|---|
| 99 | else \ |
|---|
| 100 | $(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \ |
|---|
| 101 | fi |
|---|
| 102 | $(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeadmindir)/cherokee.conf.sample |
|---|
| 103 | @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \ |
|---|
| 104 | echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \ |
|---|
| 105 | else \ |
|---|
| 106 | $(INSTALL_DATA) $(top_builddir)/performance.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \ |
|---|
| 107 | fi |
|---|
| 108 | @if test -d $(DESTDIR)$(sysconfdir)/pam.d && test ! -d $(DESTDIR)$(sysconfdir)/pam.d/cherokee ; then \ |
|---|
| 109 | $(INSTALL_DATA) $(top_srcdir)/pam.d_cherokee $(DESTDIR)$(sysconfdir)/pam.d/cherokee; \ |
|---|
| 110 | fi |
|---|
| 111 | $(mkinstalldirs) $(DESTDIR)$(localstatedir) |
|---|
| 112 | |
|---|
| 113 | uninstall-local: uninstall-local-config |
|---|
| 114 | @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \ |
|---|
| 115 | echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \ |
|---|
| 116 | $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \ |
|---|
| 117 | fi |
|---|
| 118 | @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \ |
|---|
| 119 | echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \ |
|---|
| 120 | $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \ |
|---|
| 121 | fi |
|---|
| 122 | |
|---|
| 123 | test: |
|---|
| 124 | $(MAKE) -C qa test |
|---|