Branch: Tag:

2014-10-28

2014-10-28 22:28:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build: Improved support for --disable-binary.

Don't attempt to make depend in post_modules when cross-compiling
or --disable-binary, since a fresh pike is needed to generate the
sources there.

Fixes issues with source dists generated with --disable-binary
and an old system pike, where broken files would show up in
the resulting archive and not be regenerated on actual build.

1111:    $(MAKE) $(MAKE_FLAGS) depend || \    { test -f remake && $(MAKE) $(MAKE_FLAGS) depend; }; \    }) -  @if [ "x$(RUNPIKE)" != "x$(DEFAULT_RUNPIKE)" -o -x $(TMP_BUILDDIR)/pike ]; then \ +  @if [ "x$(RUNTPIKE)" = "x$(USE_TPIKE)" ]; then \ +  if [ -x $(TMP_BUILDDIR)/pike ]; then \    $(MAKE) $(MAKE_FLAGS) post_modules_depend; \    else \    echo "Skipping make depend in post_modules since a fresh pike is"; \    echo "needed to make the autogenerated sources there."; \    :; \ -  +  fi \ +  else \ +  echo "Skipping make depend in post_modules since a fresh pike is"; \ +  echo "needed to make the autogenerated sources there, and we are"; \ +  echo "cross-compiling or --disable-binary."; \ +  :; \    fi      post_modules_depend: -  @if [ "x$(RUNPIKE)" != "x$(DEFAULT_RUNPIKE)" -o -x $(TMP_BUILDDIR)/pike ]; then :; \ -  else $(MAKE) $(MAKE_FLAGS) $(MAKE_PARALLEL) pike@EXEEXT@; fi -  @( cd post_modules && { \ +  @if [ "x$(RUNTPIKE)" != "x$(USE_TPIKE)" ]; then :; \ +  echo "Skipping make depend in post_modules since a fresh pike is"; \ +  echo "needed to make the autogenerated sources there, and we are"; \ +  echo "cross-compiling or --disable-binary."; \ +  :; \ +  else \ +  if [ -x $(TMP_BUILDDIR)/pike ]; then :; \ +  else $(MAKE) $(MAKE_FLAGS) $(MAKE_PARALLEL) pike@EXEEXT@; \ +  fi; \ +  ( cd post_modules && { \    rm -f remake; \    $(MAKE) $(MAKE_FLAGS) depend || \    { test -f remake && $(MAKE) $(MAKE_FLAGS) depend; }; \ -  }) +  }); \ +  fi      #   # Pike internal targets