help-make
[Top][All Lists]
Advanced

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

Re: intermediate files


From: Oleksandr Gavenko
Subject: Re: intermediate files
Date: Thu, 21 Oct 2010 11:28:48 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101013 Thunderbird/3.1.5

On 21.10.2010 10:19, ali hagigat wrote:
Dear Oleksandr Gavenko,
In the makefile you wrote, the file, 'my.c.in', seems a regular file
you created! It does not seem to be an intermediate file created by
make.
I wrote

> rm my.c     #   THAT IS?

'my.c' is intermediate file. And it was created by 'cp' command, not by 'make' itself.
In "Chains of Implicit Rules" all intermediate files by default removed.

To preserve their deletion you can use .SECONDARY "Special Built-in Target Names".

You ask

> Can an intermediate file be created automatically by a
> makefile?(without .INTERMEDIATE target)

I don't use '.INTERMEDIATE' keyword.

Or may be I don't properly understand you.

I wonder if Mr.Paul Smith can verify that and please mention when
exactly make creates an intermediate file by a simple example.
Thank you.

From: Oleksandr Gavenko<address@hidden>
Subject: Re: intermediate files
Content-Type: text/plain; charset=UTF-8; format=flowed
Please don't put email address in message body (this cause growing spam).


On 20.10.2010 8:36, ali hagigat wrote:
Can an intermediate file be created automatically by a
makefile?(without .INTERMEDIATE target) Please write a simple example.
Thank you.

%.c: %.c.in
        cp $<  $@

%.o: %.c
        cp $<  $@

   $ echo hello>my.c.in
   $ make my.o
cp my.c.in my.c
cp my.c my.o
rm my.c     #   THAT IS?

From: ali hagigat<address@hidden>
Can an intermediate file be created automatically by a
makefile?(without .INTERMEDIATE target) Please write a simple example.
Thank you.


--
С уважением, Александр Гавенко.



reply via email to

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