#!/bin/sh
#
-# $Id: Clean.sh,v 1.13 2007/05/02 03:58:38 cph Exp $
+# $Id: Clean.sh,v 1.14 2007/05/03 03:40:02 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;;
esac
+. etc/functions.sh
+
+maybe_rm boot-compiler.com
+
if [ ${FULL} = yes ]; then
- echo "rm -f lib/*.com"
- rm -f lib/*.com
+ maybe_rm lib/*.com
fi
if [ ${C} = yes ]; then
- echo "rm -f liarc.stamp"
- rm -f liarc.stamp
+ maybe_rm liarc.stamp
fi
if [ ${DIST} = yes ]; then
- echo "rm -f Makefile config.cache config.log config.status"
- rm -f Makefile config.cache config.log config.status
+ maybe_rm Makefile config.cache config.log config.status
fi
if [ ${MAINTAINER} = yes ]; then
- echo "rm -rf configure lib autom4te.cache"
- rm -rf configure lib autom4te.cache
+ maybe_rm configure lib autom4te.cache
fi
for SUBDIR in ${SUBDIRS}; do
-# $Id: Makefile.in,v 1.32 2007/04/29 18:01:39 cph Exp $
+# $Id: Makefile.in,v 1.33 2007/05/03 03:40:07 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
$(srcdir)/etc/c-boot-compiler.sh
mostlyclean clean distclean maintainer-clean c-clean:
- -rm -f boot-compiler.com
$(srcdir)/Clean.sh $@ $(SUBDIRS)
tags TAGS:
#!/bin/sh
#
-# $Id: Clean.sh,v 1.17 2007/05/02 03:58:48 cph Exp $
+# $Id: Clean.sh,v 1.18 2007/05/03 03:40:12 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
CLEANSH=${TOPDIR}/etc/Clean.sh
"${CLEANSH}" "${1}"
+. "${TOPDIR}/etc/functions.sh"
+
for SUBDIR in back base fggen fgopt machine rtlbase rtlgen rtlopt; do
if [ -d "${SUBDIR}" ]; then
echo "making ${1} in ${SUBDIR}"
case ${1} in
distclean | maintainer-clean)
- rm -f machine compiler.cbf compiler.pkg compiler.sf
+ echo "rm -f machine compiler.cbf compiler.pkg compiler.sf make.com make.so"
+ rm -f machine compiler.cbf compiler.pkg compiler.sf make.com make.so
;;
esac
case ${1} in
maintainer-clean)
- rm -f machines/vax/dinstr[123].scm
+ for N in 1 2 3; do
+ maybe_unlink machines/vax/dinstr${N}.scm instr${N}.scm
+ done
;;
esac
#!/bin/sh
#
-# $Id: Clean.sh,v 1.14 2007/05/02 03:58:58 cph Exp $
+# $Id: Clean.sh,v 1.15 2007/05/03 03:40:17 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
fi
../etc/Clean.sh "${1}"
+. ../etc/functions.sh
-echo "rm -rf edwin.bld"
-rm -f edwin.bld
-echo "rm -f edwin-unx.crf edwin-w32.crf edwin-os2.crf"
-rm -f edwin-unx.crf edwin-w32.crf edwin-os2.crf
-echo "rm -f edwin-unx.pkd edwin-w32.pkd edwin-os2.pkd"
-rm -f edwin-unx.pkd edwin-w32.pkd edwin-os2.pkd
-echo "rm -f edwin-unx.fre edwin-w32.fre edwin-os2.fre"
-rm -f edwin-unx.fre edwin-w32.fre edwin-os2.fre
+maybe_rm edwin.bld
+maybe_rm edwin-unx.crf edwin-w32.crf edwin-os2.crf
+maybe_rm edwin-unx.pkd edwin-w32.pkd edwin-os2.pkd
+maybe_rm edwin-unx.fre edwin-w32.fre edwin-os2.fre
#!/bin/sh
#
-# $Id: Clean.sh,v 1.19 2007/05/02 03:59:03 cph Exp $
+# $Id: Clean.sh,v 1.20 2007/05/03 03:40:22 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
. "${TOPDIR}/etc/functions.sh"
if [ ${DIST} = yes ]; then
- if [ -f Makefile.in ] && [ -f Makefile ]; then
- echo "rm Makefile"
- rm Makefile
+ if [ -f Makefile.in ]; then
+ maybe_rm Makefile
fi
fi
for KEYWORD in ${KEYWORDS}; do
case ${KEYWORD} in
rm-bin)
- echo "rm -f *.bin *.ext"
- rm -f *.bin *.ext
+ maybe_rm *.bin *.ext
;;
rm-com)
- echo "rm -f *.com *.bci *.o *.so *.sl *.dylib"
- rm -f *.com *.bci *.o *.so *.sl *.dylib
+ maybe_rm *.com *.bci *.o *.so *.sl *.dylib
;;
rm-pkg)
- echo "rm -f *-unx.crf *-unx.fre *-unx.pkd"
- rm -f *-unx.crf *-unx.fre *-unx.pkd
- echo "rm -f *-w32.crf *-w32.fre *-w32.pkd"
- rm -f *-w32.crf *-w32.fre *-w32.pkd
- echo "rm -f *-os2.crf *-os2.fre *-os2.pkd"
- rm -f *-os2.crf *-os2.fre *-os2.pkd
+ maybe_rm *-unx.crf *-unx.fre *-unx.pkd
+ maybe_rm *-w32.crf *-w32.fre *-w32.pkd
+ maybe_rm *-os2.crf *-os2.fre *-os2.pkd
;;
rm-c)
- echo "rm -f *.c"
- rm -f *.c
+ maybe_rm *.c
;;
esac
done
#!/bin/sh
#
-# $Id: functions.sh,v 1.6 2007/01/05 21:19:25 cph Exp $
+# $Id: functions.sh,v 1.7 2007/05/03 03:40:27 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
rm "${1}"
fi
}
+
+maybe_rm ()
+{
+ FNS=
+ DIRS=
+ for FN in "${@}"; do
+ if [ ! -L "${FN}" ]; then
+ if [ -f "${FN}" ]; then
+ FNS="${FNS} ${FN}"
+ elif [ -d "${FN}" ]; then
+ DIRS="${DIRS} ${FN}"
+ fi
+ fi
+ done
+ if [ "${FNS}" ]; then
+ echo "rm -f ${FNS}"
+ rm -f ${FNS}
+ fi
+ if [ "${DIRS}" ]; then
+ echo "rm -rf ${DIRS}"
+ rm -rf ${DIRS}
+ fi
+}