Changeset View
Changeset View
Standalone View
Standalone View
head/share/mk/meta.autodep.mk
| Show All 17 Lines | |||||
| _this ?= ${.PARSEFILE} | _this ?= ${.PARSEFILE} | ||||
| .if !target(__${_this}__) | .if !target(__${_this}__) | ||||
| __${_this}__: .NOTMAIN | __${_this}__: .NOTMAIN | ||||
| .-include <local.autodep.mk> | .-include <local.autodep.mk> | ||||
| .if defined(SRCS) | .if defined(SRCS) | ||||
| # it would be nice to be able to query .SUFFIXES | # it would be nice to be able to query .SUFFIXES | ||||
| OBJ_EXTENSIONS+= .o .po .lo .pico | OBJ_EXTENSIONS+= .o .po .lo .pico .nossppico | ||||
| # explicit dependencies help short-circuit .SUFFIX searches | # explicit dependencies help short-circuit .SUFFIX searches | ||||
| SRCS_DEP_FILTER+= N*.[hly] | SRCS_DEP_FILTER+= N*.[hly] | ||||
| .for s in ${SRCS:${SRCS_DEP_FILTER:O:u:ts:}} | .for s in ${SRCS:${SRCS_DEP_FILTER:O:u:ts:}} | ||||
| .for e in ${OBJ_EXTENSIONS:O:u} | .for e in ${OBJ_EXTENSIONS:O:u} | ||||
| .if !target(${s:T:R}$e) | .if !target(${s:T:R}$e) | ||||
| ${s:T:R}$e: $s | ${s:T:R}$e: $s | ||||
| .endif | .endif | ||||
| ▲ Show 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | .depend: .NOMETA $${.MAKE.META.CREATED} ${_this} | ||||
| while read t d; do \ | while read t d; do \ | ||||
| case "$$d:" in $$t) continue;; esac; \ | case "$$d:" in $$t) continue;; esac; \ | ||||
| case "$$t$$d" in ${SUPPRESS_DEPEND:U.:O:u:ts|}) continue;; esac; \ | case "$$t$$d" in ${SUPPRESS_DEPEND:U.:O:u:ts|}) continue;; esac; \ | ||||
| echo $$t $$d; \ | echo $$t $$d; \ | ||||
| done > $@.${.MAKE.PID} | done > $@.${.MAKE.PID} | ||||
| @case "${.MAKE.META.FILES:T:M*.po.*}" in \ | @case "${.MAKE.META.FILES:T:M*.po.*}" in \ | ||||
| *.po.*) mv $@.${.MAKE.PID} $@;; \ | *.po.*) mv $@.${.MAKE.PID} $@;; \ | ||||
| *) { cat $@.${.MAKE.PID}; \ | *) { cat $@.${.MAKE.PID}; \ | ||||
| sed 's,\.pico:,.o:,;s,\.o:,.po:,' $@.${.MAKE.PID}; } | sort -u > $@; \ | sed 's,\.nossppico:,.o:,;s,\.pico:,.o:,;s,\.o:,.po:,' $@.${.MAKE.PID}; } | sort -u > $@; \ | ||||
| rm -f $@.${.MAKE.PID};; \ | rm -f $@.${.MAKE.PID};; \ | ||||
| esac | esac | ||||
| .else | .else | ||||
| # make sure this exists | # make sure this exists | ||||
| .depend: | .depend: | ||||
| # do _not_ assume that .depend is in any fit state for us to use | # do _not_ assume that .depend is in any fit state for us to use | ||||
| CAT_DEPEND = /dev/null | CAT_DEPEND = /dev/null | ||||
| .if ${.MAKE.LEVEL} > 0 | .if ${.MAKE.LEVEL} > 0 | ||||
| ▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines | |||||