2001-11-03 21:57:45 +00:00
|
|
|
# Top-level makefile for MBSE BBS package
|
2001-11-03 22:32:01 +00:00
|
|
|
# $Id$
|
2001-11-03 21:57:45 +00:00
|
|
|
|
|
|
|
include Makefile.global
|
|
|
|
|
|
|
|
OTHER = AUTHORS ChangeLog COPYING DEBUG CRON.sh FILE_ID.DIZ.in \
|
2002-05-11 19:52:56 +00:00
|
|
|
INSTALL.in Makefile Makefile.global.in NEWS \
|
2002-06-01 13:46:50 +00:00
|
|
|
ChangeLog_1998 ChangeLog_1999 ChangeLog_2000 ChangeLog_2001 \
|
2002-05-11 20:22:41 +00:00
|
|
|
README SETUP.sh TODO UPGRADE aclocal.m4 \
|
2002-04-10 20:29:57 +00:00
|
|
|
checkbasic config.h.in configure configure.in
|
2001-11-03 21:57:45 +00:00
|
|
|
TARFILE = ${PACKAGE}-${VERSION}.tar.gz
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
|
|
all depend:
|
|
|
|
@if [ -z ${MBSE_ROOT} ] ; then \
|
|
|
|
echo; echo " MBSE_ROOT is not set!"; echo; exit 3; \
|
|
|
|
else \
|
|
|
|
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
install:
|
|
|
|
@./checkbasic
|
|
|
|
@if [ "`id -un`" != "root" ] ; then \
|
|
|
|
echo; echo " Must be root to install!"; echo; exit 3; \
|
|
|
|
fi
|
2001-11-25 12:18:18 +00:00
|
|
|
@if [ -z ${PREFIX} ] ; then \
|
|
|
|
echo; echo "PREFIX is not set!"; echo; exit 3; \
|
|
|
|
fi
|
2001-11-03 21:57:45 +00:00
|
|
|
@if [ ! -d ${PREFIX}/bin ] ; then \
|
|
|
|
mkdir ${PREFIX}/bin ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/bin ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/etc ] ; then \
|
|
|
|
mkdir ${PREFIX}/etc ; \
|
|
|
|
mkdir ${PREFIX}/etc/maptabs ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/etc ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/etc/maptabs ; \
|
|
|
|
fi
|
2001-11-10 17:14:16 +00:00
|
|
|
@chmod 0775 ${PREFIX}/etc
|
2002-01-25 20:21:50 +00:00
|
|
|
@if [ -f ${PREFIX}/etc/lastcall.data ] ; then \
|
|
|
|
chmod 0660 ${PREFIX}/etc/lastcall.data ; \
|
|
|
|
fi
|
|
|
|
@if [ -f ${PREFIX}/etc/sysinfo.data ] ; then \
|
|
|
|
chmod 0660 ${PREFIX}/etc/sysinfo.data ; \
|
|
|
|
fi
|
2001-11-03 21:57:45 +00:00
|
|
|
@if [ ! -d ${PREFIX}/doc ] ; then \
|
|
|
|
mkdir ${PREFIX}/doc ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/doc ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/fdb ] ; then \
|
|
|
|
mkdir ${PREFIX}/fdb ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/fdb ; \
|
|
|
|
fi
|
2001-11-10 17:14:16 +00:00
|
|
|
@chmod 0775 ${PREFIX}/fdb
|
2001-11-03 21:57:45 +00:00
|
|
|
@if [ ! -d ${PREFIX}/log ] ; then \
|
|
|
|
mkdir ${PREFIX}/log ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/log ; \
|
|
|
|
fi
|
2001-12-07 22:19:55 +00:00
|
|
|
@chmod 0775 ${PREFIX}/log
|
2001-11-03 21:57:45 +00:00
|
|
|
@if [ ! -d ${PREFIX}/magic ] ; then \
|
|
|
|
mkdir ${PREFIX}/magic ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/magic ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/sema ] ; then \
|
|
|
|
mkdir ${PREFIX}/sema ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/sema ; \
|
|
|
|
fi
|
2001-11-25 12:18:18 +00:00
|
|
|
@chmod 0777 ${PREFIX}/sema
|
2001-11-03 21:57:45 +00:00
|
|
|
@if [ ! -d ${PREFIX}/var ] ; then \
|
|
|
|
mkdir ${PREFIX}/var ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/var ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/tmp ] ; then \
|
|
|
|
mkdir ${PREFIX}/tmp ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/tmp ; \
|
|
|
|
fi
|
2001-11-25 12:18:18 +00:00
|
|
|
@chmod 0775 ${PREFIX}/tmp
|
2001-11-03 21:57:45 +00:00
|
|
|
@if [ ! -d ${PREFIX}/dutch ] ; then \
|
|
|
|
mkdir ${PREFIX}/dutch ; \
|
|
|
|
mkdir ${PREFIX}/dutch/txtfiles ; \
|
|
|
|
mkdir ${PREFIX}/dutch/menus ; \
|
|
|
|
mkdir ${PREFIX}/dutch/macro ; \
|
|
|
|
${CHOWN} -R ${OWNER}.${GROUP} ${PREFIX}/dutch ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/english ] ; then \
|
|
|
|
mkdir ${PREFIX}/english ; \
|
|
|
|
mkdir ${PREFIX}/english/txtfiles ; \
|
|
|
|
mkdir ${PREFIX}/english/menus ; \
|
|
|
|
mkdir ${PREFIX}/english/macro ; \
|
|
|
|
${CHOWN} -R ${OWNER}.${GROUP} ${PREFIX}/english ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/italian ] ; then \
|
|
|
|
mkdir ${PREFIX}/italian ; \
|
|
|
|
mkdir ${PREFIX}/italian/txtfiles ; \
|
|
|
|
mkdir ${PREFIX}/italian/menus ; \
|
|
|
|
mkdir ${PREFIX}/italian/macro ; \
|
|
|
|
${CHOWN} -R ${OWNER}.${GROUP} ${PREFIX}/italian ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/spanish ] ; then \
|
|
|
|
mkdir ${PREFIX}/spanish ; \
|
|
|
|
mkdir ${PREFIX}/spanish/txtfiles ; \
|
|
|
|
mkdir ${PREFIX}/spanish/menus ; \
|
|
|
|
mkdir ${PREFIX}/spanish/macro ; \
|
|
|
|
${CHOWN} -R ${OWNER}.${GROUP} ${PREFIX}/spanish ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/galego ] ; then \
|
|
|
|
mkdir ${PREFIX}/galego ; \
|
|
|
|
mkdir ${PREFIX}/galego/txtfiles ; \
|
|
|
|
mkdir ${PREFIX}/galego/menus ; \
|
|
|
|
mkdir ${PREFIX}/galego/macro ; \
|
|
|
|
${CHOWN} -R ${OWNER}.${GROUP} ${PREFIX}/galego ; \
|
|
|
|
fi
|
2001-12-06 19:48:00 +00:00
|
|
|
@if [ ! -d ${PREFIX}/german ] ; then \
|
|
|
|
mkdir ${PREFIX}/german; \
|
|
|
|
mkdir ${PREFIX}/german/txtfiles ; \
|
|
|
|
mkdir ${PREFIX}/german/menus ; \
|
|
|
|
mkdir ${PREFIX}/german/macro ; \
|
|
|
|
${CHOWN} -R ${OWNER}.${GROUP} ${PREFIX}/german; \
|
|
|
|
fi
|
2001-12-25 17:57:32 +00:00
|
|
|
@if [ ! -d ${PREFIX}/ftp ] ; then \
|
|
|
|
mkdir ${PREFIX}/ftp ; \
|
|
|
|
mkdir ${PREFIX}/ftp/pub ; \
|
|
|
|
mkdir ${PREFIX}/ftp/incoming ; \
|
2002-01-26 15:37:24 +00:00
|
|
|
mkdir ${PREFIX}/ftp/pub/local ; \
|
2001-12-25 17:57:32 +00:00
|
|
|
${CHOWN} `id -un`.`id -gn` ${PREFIX}/ftp ; \
|
|
|
|
chmod 0755 ${PREFIX}/ftp ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/ftp/pub ; \
|
|
|
|
chmod 0755 ${PREFIX}/ftp/pub ; \
|
|
|
|
${CHOWN} `id -un`.`id -gn` ${PREFIX}/ftp/incoming ; \
|
|
|
|
chmod 0755 ${PREFIX}/ftp/incoming ; \
|
2002-01-26 15:37:24 +00:00
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/ftp/pub/local ; \
|
|
|
|
chmod 0755 ${PREFIX}/ftp/pub/local ; \
|
2001-12-25 17:57:32 +00:00
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/var/bso ] ; then \
|
|
|
|
mkdir ${PREFIX}/var/nodelist ; \
|
|
|
|
mkdir ${PREFIX}/var/bso ; \
|
|
|
|
mkdir ${PREFIX}/var/bso/outbound ; \
|
|
|
|
mkdir ${PREFIX}/var/msgs; \
|
|
|
|
mkdir ${PREFIX}/var/badtic ; \
|
|
|
|
mkdir ${PREFIX}/var/ticqueue ; \
|
|
|
|
mkdir ${PREFIX}/var/mail ; \
|
|
|
|
${CHOWN} -R ${OWNER}.${GROUP} ${PREFIX}/var ; \
|
|
|
|
chmod -R 0750 ${PREFIX}/var ; \
|
2001-11-03 21:57:45 +00:00
|
|
|
fi
|
2002-02-08 14:25:34 +00:00
|
|
|
@if [ ! -d ${PREFIX}/var/unknown ] ; then \
|
|
|
|
mkdir ${PREFIX}/var/unknown ; \
|
|
|
|
mkdir ${PREFIX}/var/inbound ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/var/unknown ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/var/inbound ; \
|
|
|
|
chmod 0750 ${PREFIX}/var/unknown ; \
|
|
|
|
chmod 0750 ${PREFIX}/var/inbound ; \
|
|
|
|
fi
|
2002-02-04 10:47:44 +00:00
|
|
|
@chmod 0770 ${PREFIX}/var
|
|
|
|
@chmod 0770 ${PREFIX}/var/mail
|
2002-02-10 20:57:58 +00:00
|
|
|
@if [ ! -d ${PREFIX}/var/arealists ] ; then \
|
|
|
|
mkdir ${PREFIX}/var/arealists ; \
|
|
|
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/var/arealists ; \
|
|
|
|
chmod 0750 ${PREFIX}/var/arealists ; \
|
|
|
|
fi
|
2002-02-09 15:59:49 +00:00
|
|
|
@if [ -x ${BINDIR}/mbfbgen ]; then \
|
|
|
|
rm ${BINDIR}/mbfbgen; \
|
|
|
|
echo "removed ${BINDIR}/mbfbgen"; \
|
|
|
|
fi
|
|
|
|
@if [ -x ${BINDIR}/fbutil ]; then \
|
|
|
|
rm ${BINDIR}/fbutil ; \
|
|
|
|
echo "removed ${BINDIR}/fbutil "; \
|
|
|
|
fi
|
2001-11-03 21:57:45 +00:00
|
|
|
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done
|
|
|
|
|
|
|
|
dist tar: ${TARFILE}
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f .filelist core ${TARFILE}
|
|
|
|
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done;
|
|
|
|
|
|
|
|
${TARFILE}: .filelist
|
|
|
|
cd ..; rm -f ${TARFILE}; \
|
|
|
|
${TAR} cvTf ./${PACKAGE}-${VERSION}/.filelist - | gzip >${TARFILE}
|
|
|
|
|
|
|
|
crontab:
|
|
|
|
sh ./CRON.sh
|
|
|
|
|
|
|
|
.filelist filelist:
|
|
|
|
(for f in ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$$f; done) >.filelist
|
|
|
|
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} filelist && cat filelist >>../.filelist) || exit; done;
|
|
|
|
|