# be sure to check ALL_DEP_SRCS against *what it would be if SRCS and
# EXTRADEPSRCS are both empty*
-.depend-verify-srcdir:
+$(BUILDTOP)/.depend-verify-srcdir:
@if test "$(srcdir)" = "." ; then \
echo 1>&2 error: cannot build dependencies with srcdir=. ; \
echo 1>&2 "(can't distinguish generated files from source files)" ; \
exit 1 ; \
else \
- if test -r .depend-verify-srcdir; then :; \
- else (set -x; touch .depend-verify-srcdir); fi \
+ if test -r $(BUILDTOP)/.depend-verify-srcdir; then :; \
+ else (set -x; touch $(BUILDTOP)/.depend-verify-srcdir); fi \
fi
-.depend-verify-et: depend-verify-et-$(COM_ERR_VERSION)
+$(BUILDTOP)/.depend-verify-et: depend-verify-et-$(COM_ERR_VERSION)
depend-verify-et-k5:
- @if test -r .depend-verify-et; then :; \
- else (set -x; touch .depend-verify-et); fi
+ @if test -r $(BUILDTOP)/.depend-verify-et; then :; \
+ else (set -x; touch $(BUILDTOP)/.depend-verify-et); fi
depend-verify-et-sys:
@echo 1>&2 error: cannot build dependencies using system et package
@exit 1
-.depend-verify-ss: depend-verify-ss-$(SS_VERSION)
+$(BUILDTOP)/.depend-verify-ss: depend-verify-ss-$(SS_VERSION)
depend-verify-ss-k5:
- @if test -r .depend-verify-ss; then :; \
- else (set -x; touch .depend-verify-ss); fi
+ @if test -r $(BUILDTOP)/.depend-verify-ss; then :; \
+ else (set -x; touch $(BUILDTOP)/.depend-verify-ss); fi
depend-verify-ss-sys:
@echo 1>&2 error: cannot build dependencies using system ss package
@exit 1
-.depend-verify-db: depend-verify-db-$(DB_VERSION)
+$(BUILDTOP)/.depend-verify-db: depend-verify-db-$(DB_VERSION)
depend-verify-db-k5:
- @if test -r .depend-verify-db; then :; \
- else (set -x; touch .depend-verify-db); fi
+ @if test -r $(BUILDTOP)/.depend-verify-db; then :; \
+ else (set -x; touch $(BUILDTOP)/.depend-verify-db); fi
depend-verify-db-sys:
@echo 1>&2 error: cannot build dependencies using system db package
@exit 1
-.depend-verify-gcc: depend-verify-gcc-@HAVE_GCC@
+$(BUILDTOP)/.depend-verify-gcc: depend-verify-gcc-@HAVE_GCC@
depend-verify-gcc-yes:
- @if test -r .depend-verify-gcc; then :; \
- else (set -x; touch .depend-verify-gcc); fi
+ @if test -r $(BUILDTOP)/.depend-verify-gcc; then :; \
+ else (set -x; touch $(BUILDTOP)/.depend-verify-gcc); fi
depend-verify-gcc-no:
@echo 1>&2 error: The '"depend"' rules are written for gcc.
@echo 1>&2 Please use gcc, or update the rules to handle your compiler.
@exit 1
-DEP_CFG_VERIFY = .depend-verify-srcdir \
- .depend-verify-et .depend-verify-ss .depend-verify-db
-DEP_VERIFY = $(DEP_CFG_VERIFY) .depend-verify-gcc
+DEP_CFG_VERIFY = $(BUILDTOP)/.depend-verify-srcdir \
+ $(BUILDTOP)/.depend-verify-et $(BUILDTOP)/.depend-verify-ss \
+ $(BUILDTOP)/.depend-verify-db
+DEP_VERIFY = $(DEP_CFG_VERIFY) $(BUILDTOP)/.depend-verify-gcc
.d: $(ALL_DEP_SRCS) $(DEP_CFG_VERIFY) depend-dependencies
if test "$(ALL_DEP_SRCS)" != " " ; then \
# Generate a script for dropping in the appropriate make variables, using
# directory-specific parameters. General substitutions independent of local
# make variables happen in depfix.sed.
-.depfix2.sed: .depend-verify-gcc Makefile $(SRCTOP)/util/depgen.sed
+.depfix2.sed: $(BUILDTOP)/.depend-verify-gcc Makefile $(SRCTOP)/util/depgen.sed
x=`$(CC) -print-libgcc-file-name` ; \
echo '$(SRCTOP)' '$(myfulldir)' '$(srcdir)' '$(BUILDTOP)' "$$x" | sed -f $(SRCTOP)/util/depgen.sed > .depfix2.tmp
mv -f .depfix2.tmp .depfix2.sed
# library objects happen to be built. It's mostly harmless.
.depend: .d .depfix2.sed $(SRCTOP)/util/depfix.sed
sed -f .depfix2.sed < .d | sed -f $(SRCTOP)/util/depfix.sed | \
- (if test "x$(STLIBOBJS)" != "x"; then $(DEPLIBOBJNAMEFIX) ; else cat; fi ) \
- > .depend
+ (if test "x$(STLIBOBJS)" != "x"; then $(DEPLIBOBJNAMEFIX) ; else cat; fi ) | \
+ sed -e '/^$$/d' > .depend
depend-update-makefile: .depend depend-recurse
if test -n "$(SRCS)" ; then \