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 \
|
2004-04-04 13:49:05 +00:00
|
|
|
INSTALL.in Makefile Makefile.global.in NEWS cpuflags \
|
2002-06-01 13:46:50 +00:00
|
|
|
ChangeLog_1998 ChangeLog_1999 ChangeLog_2000 ChangeLog_2001 \
|
2006-07-23 10:13:30 +00:00
|
|
|
ChangeLog_2002 ChangeLog_2003 ChangeLog_2004 ChangeLog_2005 \
|
|
|
|
README SETUP.sh \
|
2005-11-13 19:38:13 +00:00
|
|
|
TODO UPGRADE aclocal.m4 checkbasic config.h.in configure \
|
|
|
|
configure.in \
|
2004-09-25 15:17:53 +00:00
|
|
|
paths.h.in README.Gentoo
|
2003-10-26 10:34:21 +00:00
|
|
|
TARFILE = ${PACKAGE}-${VERSION}.tar.bz2
|
2001-11-03 21:57:45 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2003-12-14 12:28:56 +00:00
|
|
|
help:
|
|
|
|
@echo " Help for MBSE BBS make:"
|
|
|
|
@echo ""
|
|
|
|
@echo "make [all] Compile all sources"
|
|
|
|
@echo "make install Install everything (must be root)"
|
|
|
|
@echo "make depend Update source dependencies"
|
|
|
|
@echo "make dist Create distribution archive"
|
|
|
|
@echo "make clean Clean sourcetree and configuration"
|
|
|
|
@echo "make crontab Install default crontab for mbse"
|
|
|
|
@echo "make filelist Create filelist for make dist"
|
|
|
|
@echo ""
|
|
|
|
|
2001-11-03 21:57:45 +00:00
|
|
|
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
|
2004-08-11 20:28:36 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0755 ${PREFIX}
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/bin
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/etc
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/etc/dosemu
|
2003-12-22 19:40:21 +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
|
2004-08-11 20:28:36 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/log
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/tmp
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/home
|
2005-05-08 20:29:49 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0755 ${PREFIX}/share
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0755 ${PREFIX}/share/doc
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0755 ${PREFIX}/share/doc/html
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0755 ${PREFIX}/share/doc/tags
|
2004-09-14 21:04:46 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int
|
2007-02-17 12:14:16 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/menus
|
2007-02-18 16:41:14 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/menus/en
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/menus/es
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/menus/nl
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/menus/de
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/menus/gl
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/menus/zh
|
2007-02-17 12:14:16 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/macro
|
2007-02-18 16:41:14 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/macro/en
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/macro/es
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/macro/nl
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/macro/de
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/macro/gl
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/macro/zh
|
2007-02-17 12:14:16 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/txtfiles
|
2007-02-18 16:41:14 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/txtfiles/en
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/txtfiles/es
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/txtfiles/nl
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/txtfiles/de
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/txtfiles/gl
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/int/txtfiles/zh
|
2004-09-14 21:20:29 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0775 ${PREFIX}/ftp
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0775 ${PREFIX}/ftp/pub
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0775 ${PREFIX}/ftp/pub/local
|
2004-08-11 20:28:36 +00:00
|
|
|
@${INSTALL} -d -o ${ROWNER} -g ${RGROUP} -m 0750 ${PREFIX}/ftp/incoming
|
2005-03-14 22:32:38 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0775 ${PREFIX}/var
|
2004-08-11 20:28:36 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/arealists
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/badtic
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/boxes
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/bso
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/bso/outbound
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/boxes
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/dosemu
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/dosemu/c
|
2004-09-09 21:12:37 +00:00
|
|
|
@if [ ! -d ${PREFIX}/var/fdb ] && [ -d ${PREFIX}/fdb ]; then \
|
|
|
|
echo "Migrate files database..." ; \
|
|
|
|
${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/fdb ; \
|
|
|
|
mv ${PREFIX}/fdb/file*.data ${PREFIX}/var/fdb ; \
|
|
|
|
echo "...done. You may remove ${PREFIX}/fdb" ; \
|
|
|
|
fi
|
2004-09-14 20:11:20 +00:00
|
|
|
@if [ ! -d ${PREFIX}/var/magic ] && [ -d ${PREFIX}/magic ]; then \
|
|
|
|
echo "Migrate magic filenames..." ; \
|
|
|
|
${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/magic ; \
|
|
|
|
mv ${PREFIX}/magic/* ${PREFIX}/var/magic ; \
|
|
|
|
rmdir ${PREFIX}/magic ; \
|
|
|
|
echo "...done." ; \
|
|
|
|
fi
|
2004-09-09 21:12:37 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/fdb
|
2004-08-11 20:28:36 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/hatch
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/inbound
|
2004-09-27 15:26:22 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/magic
|
2004-08-11 20:28:36 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/mail
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/msgs
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/nodelist
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/queue
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/rules
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/run
|
2005-03-14 22:32:38 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0775 ${PREFIX}/var/sema
|
2004-08-11 20:28:36 +00:00
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/ticqueue
|
|
|
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/unknown
|
2005-03-14 22:32:38 +00:00
|
|
|
@chmod 0775 ${PREFIX}/var
|
|
|
|
@chmod 0775 ${PREFIX}/var/sema
|
2003-11-26 19:12:21 +00:00
|
|
|
@if [ -x ${BINDIR}/mbtelnetd ]; then \
|
|
|
|
rm ${BINDIR}/mbtelnetd ; \
|
|
|
|
echo "removed ${BINDIR}/mbtelnetd"; \
|
|
|
|
fi
|
2003-12-14 12:28:56 +00:00
|
|
|
@for d in ${SUBDIRS}; do (cd $$d && ${MAKE} -w $@) || exit; done
|
2004-04-03 19:02:43 +00:00
|
|
|
@if [ -d ${PREFIX}/doc ] ; then \
|
|
|
|
echo; echo "If there is nothing important in ${PREFIX}/doc" ; \
|
|
|
|
echo "you may remove that obsolete directory." ; \
|
|
|
|
fi
|
2007-02-17 12:14:16 +00:00
|
|
|
@for d in de en es fr gl it nl; do \
|
|
|
|
if [ -d ${PREFIX}/share/int/$$d ] ; then \
|
|
|
|
rmdir ${PREFIX}/share/int/$$d ; \
|
|
|
|
echo "Removed directory ${PREFIX}/share/int/$$d" ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
2004-09-14 21:00:50 +00:00
|
|
|
@rm -rf ${PREFIX}/sema
|
2005-12-03 14:52:34 +00:00
|
|
|
@rm -rf ${PREFIX}/tmp/arc
|
2004-09-14 21:00:50 +00:00
|
|
|
|
2004-08-11 19:37:30 +00:00
|
|
|
|
2001-11-03 21:57:45 +00:00
|
|
|
dist tar: ${TARFILE}
|
|
|
|
|
|
|
|
clean:
|
2003-01-06 13:44:30 +00:00
|
|
|
rm -f .filelist core ${TARFILE} paths.h config.h
|
2001-11-03 21:57:45 +00:00
|
|
|
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done;
|
|
|
|
|
|
|
|
${TARFILE}: .filelist
|
2004-08-18 13:51:55 +00:00
|
|
|
cd ..; ln -s ${PACKAGE} ${PACKAGE}-${VERSION} ; rm -f ${TARFILE}; \
|
|
|
|
${TAR} cvTf ./${PACKAGE}-${VERSION}/.filelist - | bzip2 >${TARFILE} ; \
|
|
|
|
rm -f ${PACKAGE}-${VERSION}
|
2001-11-03 21:57:45 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|