- # $Id: Makefile.am,v 1.50 2000/06/03 16:01:51 mrsam Exp $
- #
- # Copyright 1998 - 2000 Double Precision, Inc. See COPYING for
- # distribution information.
- @SET_MAKE@
- SUBDIRS=images html
- htmllibdir=@htmllibdir@
- scriptdir=@scriptdir@
- script_SCRIPTS=sendit.sh cleancache.pl ldapsearch
- sysconf_DATA=ldapaddressbook
- noinst_DATA=SECURITY BUGS TODO SECURITY.html BUGS.html TODO.html
- #
- # Because cgibindir is not based on prefix, we must conditionally install
- # bin_PROGRAMS in install-exec-local, otherwise make distcheck will fail.
- #
- noinst_PROGRAMS=sqwebmail
- COMMONDEPENDENCIES=$(LIBOBJS) ../maildir/libmaildir.a
- ../rfc2045/librfc2045.a ../rfc822/librfc822.a
- ../http11/libhttp11.a ../cgi/libcgi.a
- ../authlib/libauth.a
- ../ldapaddressbook/libaddressbook.a
- ../random128/librandom128.a ../md5/libmd5.a ../numlib/libnumlib.a
- @dblibrary@
- COMMONLDADD=$(COMMONDEPENDENCIES) `cat ../authlib/libauth.dep` @LIBDB@ @LIBGDBM@
- sqwebmail_LDADD=$(COMMONLDADD) @LIBVCHKPW@
- sqwebmail_DEPENDENCIES=$(COMMONDEPENDENCIES)
- ISPELLSOURCES=sqispell.c ispell.c ispell.h
- BUILT_SOURCES=htmllibdir.h
- EXTRA_DIST=$(noinst_DATA) sqwebmail.pamconf
- strdup.c strcasecmp.c strncasecmp.c
- $(ISPELLSOURCES)
- #CFLAGS += -Dmalloc=my_malloc -Drealloc=my_realloc -Dfree=my_free -Dstrdup=my_strdup -Dcalloc=my_calloc
- if ISPELL
- SQISPELLSOURCES=$(ISPELLSOURCES)
- endif
- sqwebmail_SOURCES=addressbook.c addressbook.h attachments.c auth.c auth.h
- buf.c buf.h filter.c filter.h
- folder.c folder.h html.c html.h logincache.c logincache.h
- maildir.c maildir.h newmsg.c newmsg.h newmsg_create.c
- newmsg_newdraft.c pref.c pref.h
- sqconfig.c sqconfig.h sqwebmail.c sqwebmail.h token.c
- ldaplist.c
- token.h $(SQISPELLSOURCES)
- SECURITY: SECURITY.html
- rm -f SECURITY
- lynx -dump -nolist $(srcdir)/SECURITY.html >SECURITY
- BUGS: BUGS.html
- rm -f BUGS
- lynx -dump -nolist $(srcdir)/BUGS.html >BUGS
- TODO: TODO.html
- rm -f TODO
- lynx -dump -nolist $(srcdir)/TODO.html >TODO
- install-perms:
- @$(MAKE) -$(MAKEFLAGS) install-perms-recursive
- @$(MAKE) -$(MAKEFLAGS) install-perms-local
- install-perms-recursive:
- @>permissions.dat
- @SUBDIRS="$(SUBDIRS)" ; for f in $$SUBDIRS ; do ( cd $$f && $(MAKE) $(AM_MAKEFLAGS) install-perms ) ; cat /dev/null >>$$f/permissions.dat ; cat $$f/permissions.dat >>permissions.dat ; done
- install-perms-local: install-perms-cache
- @echo "$(htmllibdir) 555 bin bin" >>permissions.dat
- @echo "$(scriptdir)/sendit.sh 755 bin bin" >>permissions.dat
- @echo "$(scriptdir)/ldapsearch 755 bin bin" >>permissions.dat
- @echo "$(sysconfdir)/ldapaddressbook 644 root root config" >>permissions.dat
- htmllibdir.h: config.status
- echo '#define HTMLLIBDIR "$(htmllibdir)/html"' >htmllibdir.h
- echo '#define SENDITSH "$(scriptdir)/sendit.sh"' >>htmllibdir.h
- echo '#define NOCHANGINGFROM "$(sysconfdir)/nochangingfrom"' >>htmllibdir.h
- echo '#define USEXSENDER "$(sysconfdir)/usexsender"' >>htmllibdir.h
- echo '#define LOGINDOMAINLIST "$(sysconfdir)/logindomainlist"' >>htmllibdir.h
- echo '#define MAXMSGSIZE @MAXMSGSIZE@' >>htmllibdir.h
- echo '#define IMGPATH "@imageurl@"' >>htmllibdir.h
- if test -d $(srcdir)/../courier
- ; then
- echo '#define HOSTNAMEFILE "$(sysconfdir)/defaultdomain"' >>htmllibdir.h
- ; else
- echo '#define HOSTNAMEFILE "$(sysconfdir)/hostname"' >>htmllibdir.h
- ; fi
- echo '#define LDAPADDRESSBOOK "$(sysconfdir)/ldapaddressbook"' >>htmllibdir.h
- echo '#define LDAPSEARCH "$(scriptdir)/ldapsearch"' >>htmllibdir.h
- echo '#define MODULEFILE "$(sysconfdir)/authmodulelist"' >>htmllibdir.h
- echo '#define NOIMAGES "$(sysconfdir)/noimages"' >>htmllibdir.h
- ldapsearch: ../ldapaddressbook/ldapsearch
- cp ../ldapaddressbook/ldapsearch .
- ldapaddressbook: ../ldapaddressbook/ldapaddressbook
- cp $(srcdir)/../ldapaddressbook/ldapaddressbook .
- install-data-local: cache-reminder
- configure-check:
- @echo "URL to the image directory is @imageurl@"
- if HASCACHE
- install-perms-cache:
- @echo "$(scriptdir)/cleancache.pl 755 bin bin" >>permissions.dat
- @echo "@cachedir@ 700 @cacheowner@ root" >>permissions.dat
- cache-reminder:
- -$(mkinstalldirs) $(DESTDIR)@cachedir@
- test -w /etc || exit 0; chown @cacheowner@ $(DESTDIR)@cachedir@
- @rm -f cron.cmd
- @echo '#! @SHELL@' >cron.cmd
- @echo 'su -c "$(scriptdir)/cleancache.pl" @cacheowner@' >>cron.cmd
- @chmod 555 cron.cmd
- @cp /dev/null sqwebmail.msg
- @echo '-----------------------------------------------------------' >>sqwebmail.msg
- @echo 'You must now create the following cron job that runs at' >>sqwebmail.msg
- @echo 'regular intervals:' >>sqwebmail.msg
- @echo '' >>sqwebmail.msg
- @echo 'su -c "$(scriptdir)/cleancache.pl" @cacheowner@' >>sqwebmail.msg
- @echo '' >>sqwebmail.msg
- @echo '-----------------------------------------------------------' >>sqwebmail.msg
- @echo '(note - your su command may use slightly different arguments)' >>sqwebmail.msg
- @echo '' >>sqwebmail.msg
- @echo '' >>sqwebmail.msg
- else
- cache-reminder:
- @rm -f cron.cmd
- @cp /dev/null sqwebmail.msg
- install-perms-cache:
- endif