Fix the dependencies for running configure.Have it depend on .client-defs.mk and only update that when the myconfig options change.

This commit is contained in:
slamm%netscape.com 1999-02-20 07:47:04 +00:00
parent 95ab1f5b10
commit ef93e66ce7
2 changed files with 22 additions and 8 deletions

View File

@ -61,15 +61,16 @@ mk_add_options() {
ac_echo_options() {
echo "# gmake"
echo "# This file is automatically generated. Do not edit."
echo "# Edit $MOZ_MYCONFIG instead."
echo "# This file is automatically generated for client.mk."
echo "# Do not edit. Edit $MOZ_MYCONFIG instead."
echo
eval "set -- $myconfig_ac_options"
for _opt
do
case "$_opt" in
--with-nspr=* ) echo MOZ_WITH_NSPR=`expr $_opt : ".*=\(.*\)"` ;;
--with-pthreads* ) echo MOZ_WITH_PTHREADS=1 ;;
--with-pthreads* ) echo MOZ_WITH_PTHREADS=1 ;;
--*-* ) echo "# $_opt is not used by client.mk" ;;
esac
done
eval "set -- $myconfig_mk_options"
@ -85,11 +86,24 @@ ac_echo_options() {
#
myconfig_ac_options=
myconfig_mk_options=
out_file=$1
tmp_file="$out_file-tmp$$"
trap "rm -f $tmp_file; exit 1" 1 2 15
find_myconfig
if [ ! -f $out_file ]; then
echo "# This file is automatically generated for client.mk." > $out_file
fi
if [ "$MOZ_MYCONFIG" ]
then
. $MOZ_MYCONFIG
ac_echo_options
ac_echo_options > $tmp_file
if cmp -s $tmp_file $out_file; then
rm $tmp_file
else
mv $tmp_file $out_file
fi
fi

View File

@ -85,8 +85,8 @@ endif
# (See build pages, http://www.mozilla.org/build/unix.html,
# for how to set up myconfig.sh.)
run_for_side_effects := \
$(shell build/autoconf/myconfig2defs.sh > .client-defs.mk)
-include .client-defs.mk
$(shell build/autoconf/myconfig2defs.sh $(TOPSRCDIR)/.client-defs.mk)
include $(TOPSRCDIR)/.client-defs.mk
ifdef MOZ_OBJDIR
OBJDIR := $(MOZ_OBJDIR)
@ -251,7 +251,7 @@ $(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
cd $(TOPSRCDIR); $(AUTOCONF)
endif
$(OBJDIR)/Makefile: nspr $(TOPSRCDIR)/configure $(TOPSRCDIR)/allmakefiles.sh
$(OBJDIR)/Makefile: $(TOPSRCDIR)/configure $(TOPSRCDIR)/allmakefiles.sh $(TOPSRCDIR)/.client-defs.mk
@if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); fi
@echo cd $(OBJDIR);
@echo ../configure $(CONFIG_FLAGS)
@ -270,7 +270,7 @@ endif
# Build it
#
build: $(OBJDIR)/Makefile
build: nspr $(OBJDIR)/Makefile
cd $(OBJDIR); $(MAKE);
# Build & install nspr. Classic build, no autoconf.