Hi,
I'm attaching the following files for what looks to be a bug in make:
- description.txt
- makefile
- post - This is a simple shell script called by make that echos the
argument passed to it.
INSTRUCTIONS:
- download files to a directory
- see 'description.txt' file
I would appreciate if you would let me know:
-- if you agree that this is a bug
-- if it is a bug, do you intent to fix it [Note: I think the fix is
an easy fix, so I hope that you will]
-- when and where will the fix be available [Note: I sure can use the
fix so if you have a patch release, I would like to know about it]
Thanks,
Jim Anderson
--
Jim Anderson
jim_ander...@jjajava.com
=========================================
Bug Description
=========================================
The bug is that I set the variable 'RM' equal to the value
'post', but it has no effect on make.
As I read section 10.3, "Variables Used by Implicit Rules",
if I set RM to 'post', then when implicit rules are invoked
by make, the command used should be 'post', not 'rm'. By
the way, the documentation says 'rm -f' is the default,
but 'rm' is being called.
_____________________________________________
=========================================
The makefile
=========================================
I am including a simple makefile, which illustrates my problem.
After downloading the attached files into the same directory:
1) chmod +x post
2) make
In words, the makefile:
sets RM = post
1) creates a .yyy file that will be used to create .zzz file
2) creates a .zzz file
3) gives notice that Z.yyy is available for future processing.
*** step 4 is a bug *** This is default behavior of make and
not part of my makefile
4) - make removes Z.yyy and it is no longer available.
_____________________________________________
NOTE: I have an intermediate file (i.e. the file with suffix .yyy)
which I would like to keep for later processing. But because it is
an intermediate file, make is running 'rm Z.yyy' as part of the
make process, with the assumption the an intermediate file is no
longer needed.
=========================================
VERSIONS
=========================================
-------------------------------------
O/S - BunsenLabs Linux
-------------------------------------
% uname -a
Linux roe 3.16.0-4-amd64 #1 SMP Debian 3.16.51-2 (2017-12-03) x86_64 GNU/Linux
-------------------------------------
make
-------------------------------------
% make --version
GNU Make 4.0
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
-------------------------------------
documentation
-------------------------------------
The documentation I'm using is the PDF version of:
"This is Edition 0.74, last updated 21 May 2016, of
The GNU Make Manual , for GNU make version 4.2."
RM = post
all: Z.zzz
@echo
@echo 3 RM $(RM)
$(RM) Z.yyy
@echo
@make clean 2>&1 > /dev/null
%.zzz: %.yyy
@echo 2 target z:y $@ depend $^
echo 2 YintoZ > $@
@echo
%.yyy:
clear
echo 1 create yyy file > $@
@echo
clean:
rm -f *.zzz
#! /bin/bash
echo $0: $1 should available to future processing.
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make