develooper Front page | perl.perl5.porters | Postings from August 2019

[perl #134361] [PATCH] $(MINIPERL_EXE) shouldn't be required toexist for "rm"

Thread Previous
Tony Cook via RT
August 20, 2019 06:22
[perl #134361] [PATCH] $(MINIPERL_EXE) shouldn't be required toexist for "rm"
Message ID:
On Wed, 14 Aug 2019 23:19:58 -0700, wrote:
> Hi,
> $ man rm
>        -f, --force
>               ignore nonexistent files and arguments, never prompt
> $ rm doesnotexist ; echo $?
> rm: cannot remove 'doesnotexist': No such file or directory
> 1
> $ rm -f doesnotexist ; echo $?
> 0
> It's the nonzero exit code that causes `make` to think the build step
> failed. Or am I misunderstanding you?

	-@rm \$(MINIPERL_EXE)

The "-" at the front of the recipe means that the exit code of rm is ignored.  (The @ means the command isn't echoed.)

From the GNU make documentation:

   To ignore errors in a recipe line, write a '-' at the beginning of
the line's text (after the initial tab).  The '-' is discarded before
the line is passed to the shell for execution.

   For example,

             -rm -f *.o

This causes 'make' to continue even if 'rm' is unable to remove a file.


via perlbug:  queue: perl5 status: open

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About