Only generate depends if the compiler supports it.
For assembly files, AS_DEPENDS needs to be set. As usually AS is set to CC, it can be done using AS_DEPENDS = ${CC_DEPENDS}.
This commit is contained in:
parent
514e0e32be
commit
bd9b6c0825
2 changed files with 38 additions and 3 deletions
|
@ -60,6 +60,10 @@ PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
|
|||
INSTALL_LIB = @INSTALL_LIB@
|
||||
UNINSTALL_LIB = @UNINSTALL_LIB@
|
||||
CLEAN_LIB = @CLEAN_LIB@
|
||||
CC_DEPENDS = @CC_DEPENDS@
|
||||
CXX_DEPENDS = @CXX_DEPENDS@
|
||||
OBJC_DEPENDS = @OBJC_DEPENDS@
|
||||
OBJCXX_DEPENDS = @OBJCXX_DEPENDS@
|
||||
LN_S = @LN_S@
|
||||
MKDIR_P = mkdir -p
|
||||
INSTALL = @INSTALL@
|
||||
|
@ -126,9 +130,35 @@ depend: pre-depend ${SRCS}
|
|||
test -f .deps || regen=1; \
|
||||
for i in ${SRCS}; do \
|
||||
case $$i in \
|
||||
*.c | *.cc | *.cxx | *.m | *.mm | *.S) \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
*.c) \
|
||||
if test x"${CC_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
*.cc | *.cxx) \
|
||||
if test x"${CXX_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
*.m) \
|
||||
if test x"${OBJC_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
*.mm) \
|
||||
if test x"${OBJCXX_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
*.S) \
|
||||
if test x"${AS_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
esac; \
|
||||
done; \
|
||||
|
|
|
@ -22,6 +22,11 @@ dnl POSSIBILITY OF SUCH DAMAGE.
|
|||
dnl
|
||||
|
||||
AC_DEFUN([BUILDSYS_INIT], [
|
||||
AC_SUBST(CC_DEPENDS, $GCC)
|
||||
AC_SUBST(CXX_DEPENDS, $GXX)
|
||||
AC_SUBST(OBJC_DEPENDS, $GOBJC)
|
||||
AC_SUBST(OBJCXX_DEPENDS, $GOBJCXX)
|
||||
|
||||
AC_PATH_PROG(TPUT, tput)
|
||||
|
||||
AS_IF([test x"$TPUT" != x""], [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue