Bugzilla bug #29427: implemented the 'distclean' target and made

'realclean' and 'clobber_all' synonymous with 'distclean'.  This
patch is contributed by Chris Seawood <cls@seawood.org>. r=wtc@netscape.com
Modified files: Makefile, Makefile.in, configure, configure.in,
config/Makefile.in, config/config.mk, config/rules.mk
This commit is contained in:
wtc%netscape.com 2000-03-16 22:46:02 +00:00
parent 4b10c5a00b
commit c52840b576
7 changed files with 85 additions and 112 deletions

View File

@ -44,6 +44,10 @@ ifdef PR_CLIENT_BUILD_UNIX
endif
endif
distclean realclean clobber_all::
@echo "cd pr/tests; $(MAKE) $@"
@$(MAKE) -C pr/tests $@
release::
echo $(BUILD_NUMBER) > $(RELEASE_DIR)/$(BUILD_NUMBER)/version.df
@if test -f imports.df; then \

View File

@ -31,6 +31,8 @@ PR_CLIENT_BUILD = 1
PR_CLIENT_BUILD_UNIX = 1
endif
DIST_GARBAGE = config.cache config.log config.status dist
include $(topsrcdir)/config/rules.mk
#
@ -49,6 +51,12 @@ ifdef PR_CLIENT_BUILD_UNIX
endif
endif
# Delete config/autoconf.mk last because it is included by every makefile.
distclean realclean clobber_all::
@echo "cd pr/tests; $(MAKE) $@"
@$(MAKE) -C pr/tests $@
rm -f config/autoconf.mk
release::
echo $(BUILD_NUMBER) > $(RELEASE_DIR)/$(BUILD_NUMBER)/version.df
@if test -f imports.df; then \

View File

@ -27,6 +27,10 @@ include $(MOD_DEPTH)/config/autoconf.mk
# Indicate that this directory builds build tools.
INTERNAL_TOOLS = 1
# autoconf.mk must be deleted last (from the top-level directory)
# because it is included by every makefile.
DIST_GARBAGE = nsprincl.mk nsprincl.sh
include $(topsrcdir)/config/config.mk
CSRCS = nsinstall.c now.c

View File

@ -75,6 +75,10 @@ endif
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
ifdef USE_AUTOCONF
DIST_GARBAGE += Makefile
endif
DEFINES += -DFORCE_PR_LOG
ifeq ($(_PR_NO_CLOCK_TIMER),1)

View File

@ -151,7 +151,7 @@ endif
endif
ALL_TRASH = $(TARGETS) $(OBJS) $(filter-out . .., $(OBJDIR)) LOGS TAGS $(GARBAGE) \
$(NOSUCHFILE) \
$(DIST_GARBAGE) $(NOSUCHFILE) \
so_locations
ifdef DIRS
@ -189,8 +189,8 @@ clobber::
rm -rf $(OBJS) $(TARGETS) $(filter-out . ..,$(OBJDIR)) $(GARBAGE) so_locations $(NOSUCHFILE)
+$(LOOP_OVER_DIRS)
realclean clobber_all::
rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH)
distclean realclean clobber_all::
rm -rf $(wildcard *.OBJ *.OBJD) $(ALL_TRASH)
+$(LOOP_OVER_DIRS)
release:: export

131
nsprpub/configure vendored
View File

@ -3915,6 +3915,47 @@ fi
MAKEFILES="
Makefile
config/Makefile
config/autoconf.mk
config/nsprincl.mk
config/nsprincl.sh
lib/Makefile
lib/ds/Makefile
lib/libc/Makefile
lib/libc/include/Makefile
lib/libc/src/Makefile
pr/Makefile
pr/include/Makefile
pr/include/md/Makefile
pr/include/obsolete/Makefile
pr/include/private/Makefile
pr/src/Makefile
pr/src/io/Makefile
pr/src/linking/Makefile
pr/src/malloc/Makefile
pr/src/md/Makefile
pr/src/md/${PR_MD_ARCH_DIR}/Makefile
pr/src/memory/Makefile
pr/src/misc/Makefile
pr/src/threads/Makefile
pr/tests/Makefile
pr/tests/dll/Makefile
"
if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
elif test -n "$USE_PTHREADS"; then
MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
elif test -n "$USE_BTHREADS"; then
MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
fi
if test -n "$USE_CPLUS"; then
MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
fi
trap '' 1 2 15
cat > confcache <<\EOF
@ -4029,50 +4070,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "
Makefile
config/Makefile
config/autoconf.mk
config/nsprincl.mk
config/nsprincl.sh
lib/Makefile
lib/ds/Makefile
lib/libc/Makefile
lib/libc/include/Makefile
lib/libc/src/Makefile
lib/msgc/Makefile
lib/msgc/include/Makefile
lib/msgc/src/Makefile
lib/msgc/tests/Makefile
lib/prstreams/Makefile
lib/tests/Makefile
pr/Makefile
pr/include/Makefile
pr/include/md/Makefile
pr/include/obsolete/Makefile
pr/include/private/Makefile
pr/src/Makefile
pr/src/bthreads/Makefile
pr/src/cplus/Makefile
pr/src/cplus/tests/Makefile
pr/src/io/Makefile
pr/src/linking/Makefile
pr/src/malloc/Makefile
pr/src/md/Makefile
pr/src/md/beos/Makefile
pr/src/md/os2/Makefile
pr/src/md/unix/Makefile
pr/src/md/windows/Makefile
pr/src/memory/Makefile
pr/src/misc/Makefile
pr/src/pthreads/Makefile
pr/src/threads/Makefile
pr/src/threads/combined/Makefile
pr/tests/Makefile
pr/tests/dll/Makefile
pr/tests/w16gui/Makefile
tools/Makefile
" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@ -4215,49 +4213,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile
config/Makefile
config/autoconf.mk
config/nsprincl.mk
config/nsprincl.sh
lib/Makefile
lib/ds/Makefile
lib/libc/Makefile
lib/libc/include/Makefile
lib/libc/src/Makefile
lib/msgc/Makefile
lib/msgc/include/Makefile
lib/msgc/src/Makefile
lib/msgc/tests/Makefile
lib/prstreams/Makefile
lib/tests/Makefile
pr/Makefile
pr/include/Makefile
pr/include/md/Makefile
pr/include/obsolete/Makefile
pr/include/private/Makefile
pr/src/Makefile
pr/src/bthreads/Makefile
pr/src/cplus/Makefile
pr/src/cplus/tests/Makefile
pr/src/io/Makefile
pr/src/linking/Makefile
pr/src/malloc/Makefile
pr/src/md/Makefile
pr/src/md/beos/Makefile
pr/src/md/os2/Makefile
pr/src/md/unix/Makefile
pr/src/md/windows/Makefile
pr/src/memory/Makefile
pr/src/misc/Makefile
pr/src/pthreads/Makefile
pr/src/threads/Makefile
pr/src/threads/combined/Makefile
pr/tests/Makefile
pr/tests/dll/Makefile
pr/tests/w16gui/Makefile
tools/Makefile
"}
CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@ -4328,4 +4284,3 @@ chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

View File

@ -1077,7 +1077,7 @@ AC_SUBST(ULTRASPARC_FILTER_LIBRARY)
dnl ========================================================
dnl Generate output files.
dnl ========================================================
AC_OUTPUT([
MAKEFILES="
Makefile
config/Makefile
config/autoconf.mk
@ -1088,39 +1088,37 @@ lib/ds/Makefile
lib/libc/Makefile
lib/libc/include/Makefile
lib/libc/src/Makefile
lib/msgc/Makefile
lib/msgc/include/Makefile
lib/msgc/src/Makefile
lib/msgc/tests/Makefile
lib/prstreams/Makefile
lib/tests/Makefile
pr/Makefile
pr/include/Makefile
pr/include/md/Makefile
pr/include/obsolete/Makefile
pr/include/private/Makefile
pr/src/Makefile
pr/src/bthreads/Makefile
pr/src/cplus/Makefile
pr/src/cplus/tests/Makefile
pr/src/io/Makefile
pr/src/linking/Makefile
pr/src/malloc/Makefile
pr/src/md/Makefile
pr/src/md/beos/Makefile
pr/src/md/os2/Makefile
pr/src/md/unix/Makefile
pr/src/md/windows/Makefile
pr/src/md/${PR_MD_ARCH_DIR}/Makefile
pr/src/memory/Makefile
pr/src/misc/Makefile
pr/src/pthreads/Makefile
pr/src/threads/Makefile
pr/src/threads/combined/Makefile
pr/tests/Makefile
pr/tests/dll/Makefile
pr/tests/w16gui/Makefile
tools/Makefile
])
"
dnl lib/tests/Makefile
dnl pr/tests/w16gui/Makefile
dnl tools/Makefile
dnl lib/prstreams/tests/testprstrm/Makefile
dnl lib/tests/windows/makefile
if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
elif test -n "$USE_PTHREADS"; then
MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
elif test -n "$USE_BTHREADS"; then
MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
fi
if test -n "$USE_CPLUS"; then
MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
fi
AC_OUTPUT([$MAKEFILES])