bugmake - Bugs: bug #15492, Intermediateness of multiple...

 
 

bug #15492: Intermediateness of multiple targets in pattern rules

Submitter:  None
Submitted:  Fri 20 Jan 2006 08:15:54 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  3.81 Operating System:  POSIX-Based
Fixed Release:  4.4 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 02 Jan 2023 09:22:42 PM UTC, comment #2: 

This was fixed in GNU Make 4.4.  Current behavior:

$ make
cp Makefile test.source
head test.source > test.intermediate1
tail test.source > test.intermediate2
cat test.intermediate1 test.intermediate2 > test.final
rm test.source test.intermediate2 test.intermediate1

Note that both test.intermediate1 and test.intermediate2 are removed as intermediate.

Paul D. Smith <psmith>
Group administrator
  Spam posted by sevanath
Fri 20 Jan 2006 08:15:54 PM UTC, original submission:  

# The question is whether %.intermediate2 should be marked as
# an intermediate target automatically without adding it as a
# prerequisite of .INTERMEDIATE.
#
# Since %.intermediate1 is marked as intermediate and since
# pattern rules with multiple targets are defined as generating
# all targets after execution, I believe that %.intermediate2
# should receive the same treatment as %.intermediate1 and be
# marked as intermediate.
#
# To see the basic behavior, simply run make with this file
# named as "Makefile".
#
# Run 'make set-intermediate=t' to see the behavior I expect
# to see by default: both %.intermediate1 and %.intermediate2
# are deleted by make.

name := test

all: $(name).final

%.final: %.intermediate1 %.intermediate2
        cat $^ > $@

$(if $(set-intermediate),$(eval .INTERMEDIATE: $(name).intermediate2))
%.intermediate1 %.intermediate2: %.source
        head $< > $*.intermediate1
        tail $< > $*.intermediate2

%.source: Makefile
        cp $< $@

.PHONY: clean
clean:
        rm -f $(name).*

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2157:  Makefile added by None (995B - text/plain - Makefile with tabs (hopefully) preserved)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Updated the item)
  • -email is unavailable- added by sevanath (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-02 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
    2013-10-09 psmith Component Version4.0 3.81
    2006-01-20 None Attached File- Added Makefile, #3297

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code