[PATCH v2 01/16] perl/Makefile: treat a missing PM.stamp as if empty

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

 



'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@xxxxxxx>
---
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.
---
 perl/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/perl/Makefile b/perl/Makefile
index 15d96fc..5b86aac 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -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)
-- 
2.4.2.windows.1.5.gd32afb6

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]