Skip to content
Snippets Groups Projects
Commit 0a25e8ed authored by slamm%netscape.com's avatar slamm%netscape.com
Browse files

Improve recovering from conflicting objdir/srcdir builds. Add cleansrcdir...

Improve recovering from conflicting objdir/srcdir builds. Add cleansrcdir target to client.mk. Update the objdir vs. srcdir build instructions in configure.
parent 5cb578f7
No related branches found
No related tags found
No related merge requests found
......@@ -35,12 +35,21 @@ if [ ! -f configure.in ]; then
exit 1
fi
MOZ_EDITOR=1 MOZ_MAILNEWS=1 . allmakefiles.sh
if [ -f mailnews/makefiles ]; then
MOZ_MAIL_NEWS=1
export MOZ_MAIL_NEWS
fi
if [ -d editor ]; then
MOZ_EDITOR=1
export MOZ_EDITOR
fi
. allmakefiles.sh
rm -fr $MAKEFILES \
config-defs.h \
config.cache \
config.log \
config.status \
$NULL
echo "Removed all files generated by configure." 2>&1
......@@ -265,7 +265,22 @@ clean realclean:
cd $(OBJDIR); $(MAKE) $@
rm -fr $(ALL_TRASH)
cleansrcdir:
@cd $(TOPSRCDIR); \
if [ -f Makefile ]; then \
$(MAKE) realclean && _skip_find=1; \
fi; \
if [ ! "$$_skip_find" ]; then \
echo "Removing object files from srcdir..."; \
rm -fr `find . -type d \( -name .deps -print -o -name CVS \
-o -exec test ! -d {}/CVS \; \) -prune \
-o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \
fi; \
echo "Removing files generated by configure..."; \
build/autoconf/clean-config.sh;
# (! IS_FIRST_CHECKOUT)
endif
.PHONY: checkout depend build clean realclean pull_all build_all clobber clobber_all pull_and_build_all
.PHONY: checkout depend build clean realclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all
......@@ -67,35 +67,37 @@ MISSING_X=
MISSING_MOTIF=
MISSING_GTK=
dnl Check for invalid object directory setup.
dnl If the tree has already been built in topsrcdir,
dnl do not allow it to be built in a separate object
dnl directory unless the src tree is cleaned up.
dnl ========================================================
dnl Do not allow a separate objdir build if a srcdir build exists.
dnl ==============================================================
_topsrcdir=`cd \`dirname $0\`; pwd`
_objdir=`pwd`
if test "$_topsrcdir" != "$_objdir"
then
# Check for a couple representative files in the source tree
_conflict_files=
for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do
if test -f $file; then
cat 1>&2 <<-EOF
Error: Your source tree contains the file,
$file
This is an indication that you previously built in the source
tree. Files built in the source tree can confuse the separate
objdir build.
You can clean up the source tree with the following steps:
1. cd $_topsrcdir
2. gmake realclean; build/autoconf/clean-config.sh
EOF
exit 1
break
_conflict_files="$_conflict_files $file"
fi
done
if test "$_conflict_files"; then
echo "***"
echo "* Your source tree contains these files:"
for file in $_conflict_files; do
echo "* $file"
done
cat 1>&2 <<-EOF
* This indicates that you previously built in the source tree.
* A source tree build can confuse the separate objdir build.
*
* To clean up the source tree:
* 1. cd $_topsrcdir
* 2. gmake -f client.mk cleansrcdir
***
EOF
exit 1
break
fi
fi
dnl Checks for programs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment