Re: secondary expansion changes

Boris Kolpackov <[email protected]>
Newsgroups gmane.comp.gnu.make.devel
Organization Code Synthesis Tools CC
Message-ID <[email protected]>
Hi Paul,

Paul D. Smith <[email protected]> writes:

> I'd really appreciate it if folks with larger, more complex secondary 
> expansion environments would give it a whirl.

There appears to be a regression in order-only prerequisite handling
when second expansion is on. Here is a test makefile, place it into
/tmp/:

.SECONDEXPANSION:

.PRECIOUS: %/.
%/.:
	mkdir -p $*

/tmp/%.so: | $$(dir $$@).
	@echo $^
	touch $@

all: /tmp/foo.so stamp

/tmp/foo.so: foo.o

foo.o:
	touch $@

.PHONY: stamp
stamp:
	@sleep 1
	touch stamp
	rm stamp

It shows two things that I also observe in my build system:

1. Order-only prerequisite ends up in $^ (see /tmp/%.so).

2. Order-only prerequisite is treated as a normal prerequisite. This
   is manifesting itself in rebuilds of /tmp/foo.so on subsequent
   executions of make even though both foo.o and foo.so are up to
   date. The reason for this is the stamp target which changes the
   directory timestamp after /tmp/foo.so has been updated. 

It looks like order-only prerequisites that are parsed during the
second expansion end up as normal prerequisite.


Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.