diff --git a/nsprpub/Makefile b/nsprpub/Makefile index e92f2d403e4..61a916a1ca3 100644 --- a/nsprpub/Makefile +++ b/nsprpub/Makefile @@ -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 \ diff --git a/nsprpub/Makefile.in b/nsprpub/Makefile.in index 8ff221b8e79..ae4ff2070be 100644 --- a/nsprpub/Makefile.in +++ b/nsprpub/Makefile.in @@ -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 \ diff --git a/nsprpub/config/Makefile.in b/nsprpub/config/Makefile.in index a000414347d..4302c6e1de3 100644 --- a/nsprpub/config/Makefile.in +++ b/nsprpub/config/Makefile.in @@ -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 diff --git a/nsprpub/config/config.mk b/nsprpub/config/config.mk index 4f7863f2d1d..1985c50b4b3 100644 --- a/nsprpub/config/config.mk +++ b/nsprpub/config/config.mk @@ -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) diff --git a/nsprpub/config/rules.mk b/nsprpub/config/rules.mk index b885c33ef40..b474c0754c4 100644 --- a/nsprpub/config/rules.mk +++ b/nsprpub/config/rules.mk @@ -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 diff --git a/nsprpub/configure b/nsprpub/configure index 56a87989643..23d5ba2446b 100755 --- a/nsprpub/configure +++ b/nsprpub/configure @@ -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 <> $CONFIG_STATUS <> $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 - diff --git a/nsprpub/configure.in b/nsprpub/configure.in index aa7fa6a0ea3..1554f5482d4 100644 --- a/nsprpub/configure.in +++ b/nsprpub/configure.in @@ -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])