perl/Makefile: treat a missing PM.stamp as if empty

'make clean', or a 'git clean -dfx' will delete the PM stamp file,
so it cannot be a direct target in such clean conditions, resulting
in an error.

Normally the PM.stamp is recreated by the git/Makefile, except when
a dry-run is requested, for example, as used in the msysgit msvc-build
script which implements the compat/vcbuild/README using
contrib/buildsystems. The script msvc-build is introduced later in this
series.

Protect the PM.stamp target when the PM.stamp file does not exist,
allowing a Git 'Makefile -n' to succeed on a clean repo.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
This is development of the original "[PATCH 4/17] Makefile: a dry-run
can error out if no perl. Document the issue" 2015-06-25,
(http://marc.info/?l=git&m=143519054716960&w=2), which simply documented
the issue and then used NO_PERL to avoid the problem. See follow on
email thread for some discussion.
This commit is contained in:
Philip Oakley
2015-07-19 15:59:04 +01:00
committed by Johannes Schindelin
parent 474155f32a
commit 18105f855a

View File

@@ -22,7 +22,9 @@ clean:
$(RM) $(makfile).old
$(RM) PM.stamp
ifneq (,$(wildcard PM.stamp))
$(makfile): PM.stamp
endif
ifdef NO_PERL_MAKEMAKER
instdir_SQ = $(subst ','\'',$(prefix)/lib)