bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]


From: Henrik Carlqvist
Subject: Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]
Date: Mon, 14 Sep 2020 18:40:59 +0200

On Mon, 14 Sep 2020 12:15:58 +0200
Bruno Haible <bruno@clisp.org> wrote:

> Henrik Carlqvist wrote:
> > 2) Don't mention some of the extra targets:
> > ===========================================
> > all : copy1
> >  
> > copy1: Makefile
> >     install -c -m 644 Makefile copy1
> >     install -c -m 644 Makefile copy2
> >     install -c -m 644 Makefile copy3
> >     install -c -m 644 Makefile copy4
> > ===========================================
> 
> Fails (D) and (E). => Not a solution to the problem.
> 
> Bruno
> 

Ok, assuming that solution 1 did not meet your requirements, lets give it
another shot:

===========================================
COPIES=copy1 copy2 copy3 copy4

.INTERMEDIATE: dummy

all: $(COPIES)

$(COPIES): %: dummy
        $(RM) $<

dummy: Makefile
        install -c -m 644 Makefile copy1
        install -c -m 644 Makefile copy2
        install -c -m 644 Makefile copy3
        install -c -m 644 Makefile copy4
        touch $@
===========================================

I create an extra file "dummy" for a short time in an attempt to live up to
all your requirements.

regards Henrik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]