Paul, You are mistaken, because if you remove: .INTERMEDIATE: my.gch Make will consider my.gch as an intermediate file! please look at the result by make:
kkkkkkkk hhhhhhhhhh rm my.gch On Mon, Nov 8, 2010 at 5:06 PM, Paul Smith <[email protected]> wrote: > On Mon, 2010-11-08 at 09:21 +0330, ali hagigat wrote: >> .INTERMEDIATE does not work correctly: >> >> The following makefile is run with: >> root> make my.all >> Why the file, my.gch is created (it is not removed!) while it is an >> intermediate file? >> >> .INTERMEDIATE: my.gch >> %.all: %.gch >> �...@echo hhhhhhhhhh >> %.gch: >> �...@echo kkkkkkkk >> �...@touch $@ > > Please choose just one mailing list. > > I'm not sure I agree with your assessment that GNU make is not working > correctly, although I do agree that this behavior is a gray area and not > well-described by the manual. > > For GNU make, a target that has no prerequisites is out of date if and > only if the target does not exist. An intermediate file is a target > that is a link between two other targets, where if the first is newer > than the last, the middle does not need to be built. > > What does that mean for this case where there is no "last" target? > Obviously make will not consider that file to be intermediate on its > own, but can a file with no prerequisites be treated as intermediate if > you explicitly declare it to be so? > > The answer, based on GNU make's behavior, appears to be no it can't. > > -- > ------------------------------------------------------------------------------- > Paul D. Smith <[email protected]> Find some GNU make tips at: > http://www.gnu.org http://make.mad-scientist.net > "Please remain calm...I may be mad, but I am a professional." --Mad Scientist > > _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
