INDEX user-friendliness and SMP speed-up patch

Oliver Eikemeier eikemeier at fillmore-labs.com
Mon Mar 15 05:04:35 PST 2004


Kris Kennaway wrote:

>>>+.if defined(BUILDING_INDEX)
>>>+describe: ${SUBDIR:S/^/describe./}
>>>+
>>>+.for i in ${SUBDIR}
>>>+describe.$i:
>>>+	@${MAKE} -B ${i:S/^/_/:S/$/.describe/} > 
>>>${INDEX_TMPDIR}/${INDEXFILE}.desc.${i}
>>>+.endfor
>>>+.else
>>>describe: ${SUBDIR:S/^/_/:S/$/.describe/}
>>>+.endif
>>
>>I always wondered why we don't have
>>
>>.PHONY describe
>>
>>and
>>
>>.PHONY describe.$i
>>
>>here. Any reasons for that?
> 
> Hmm, I'm not sure what that would do.

>From make(1):

  .PHONY      [...] Targets with this attribute are always considered to be out of date.

basically

  .PHONY: describe

means that make doesn't look for a file named `describe' first. Try

  touch describe; make describe

in any port with and without adding `.PHONY: describe' to the Makefile.
You can get some more info with

  make -d m describe

I know that the search path in ports make is usually very small, so it is
unlikely that you run into it. OTOH, go in any category directory and do

  mkdir -p describe; make describe

with and without adding `.PHONY: describe' to bsd.port.subdir.mk.

IMHO declaring targets as PHONY makes sense, even though these are border 
cases in the ports tree. I'll add that to PR 64233, since `extract patch 
configure build install package' are really meant to be stand-alone targets.

-Oliver



More information about the freebsd-ports mailing list