From 2ab6cacda91f7db4507e3ff11c2aca4fb96e32c8 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 14 Dec 2003 12:28:56 +0000 Subject: [PATCH] Makefile cleanup --- ChangeLog | 1 + Makefile | 38 +++++++++++++++++--------------------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79b71924..0151febb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ v0.39.4 08-Dec-2003 general: Added French language file created by Francois Thunus. This translation is not yet complete. + Cleanup in main makefile, added help. upgrade: If you didn't change anything of the language defaults then diff --git a/Makefile b/Makefile index 6d2f7716..3a643419 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,18 @@ all depend: for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done; \ fi +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 "" + install: @./checkbasic @if [ "`id -un`" != "root" ] ; then \ @@ -37,12 +49,8 @@ install: ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/etc ; \ fi @chmod 0775 ${PREFIX}/etc - @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 + @chmod -f 0660 ${PREFIX}/etc/lastcall.data + @chmod -f 0660 ${PREFIX}/etc/sysinfo.data @if [ ! -d ${PREFIX}/doc ] ; then \ mkdir ${PREFIX}/doc ; \ ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/doc ; \ @@ -174,8 +182,8 @@ install: rmdir ${PREFIX}/var/inbound/tmp ; \ echo "Removed ${PREFIX}/var/inbound/tmp" ; \ fi - chmod 0770 ${PREFIX}/var/rules - chmod 0770 ${PREFIX}/var/run + @chmod 0770 ${PREFIX}/var/rules + @chmod 0770 ${PREFIX}/var/run @if [ ! -d ${PREFIX}/var/unknown ] ; then \ mkdir ${PREFIX}/var/unknown ; \ mkdir ${PREFIX}/var/inbound ; \ @@ -191,23 +199,11 @@ install: ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/arealists ; \ chmod 0750 ${PREFIX}/var/arealists ; \ fi - @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 - @if [ -x ${BINDIR}/mbchat ]; then \ - rm ${BINDIR}/mbchat ; \ - echo "removed ${BINDIR}/mbchat"; \ - fi @if [ -x ${BINDIR}/mbtelnetd ]; then \ rm ${BINDIR}/mbtelnetd ; \ echo "removed ${BINDIR}/mbtelnetd"; \ fi - for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done + @for d in ${SUBDIRS}; do (cd $$d && ${MAKE} -w $@) || exit; done dist tar: ${TARFILE}