git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
blob 14bdda99d117ed8cca2dfe08d9f6ac757168adb7 3587 bytes (raw)
name: perl/Makefile 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
 
#
# Makefile for perl support modules and routine
#
# This Makefile generates "perl.mak", which contains the actual build and
# installation directions.
#
# PERL_PATH must be defined to be the path of the Perl interpreter to use.
#
# prefix must be defined as the Git installation prefix.
#
# perl_localedir must be defined as the path to the locale data.
#
# perllibdir may be optionally defined to override the default Perl module
# installation directory, which is relative to prefix. If perllibdir is not
# absolute, it will be treated as relative to prefix.
#
# NO_PERL_MAKEMAKER may be defined to use a built-in Makefile generation method
# instead of Perl MakeMaker.

makfile:=perl.mak
modules =

PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
prefix_SQ = $(subst ','\'',$(prefix))
localedir_SQ = $(subst ','\'',$(perl_localedir))

ifndef V
	QUIET = @
endif

# If a library directory is provided, and it is not an absolute path, resolve
# it relative to prefix.
ifneq ($(perllibdir),)
ifneq ($(filter /%,$(firstword $(perllibdir))),)
perllib_instdir = $(perllibdir)
else
perllib_instdir = $(prefix)/$(perllibdir)
endif
endif

all install instlibdir: $(makfile)
	$(QUIET)$(MAKE) -f $(makfile) $@

clean:
	$(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
	$(RM) ppport.h
	$(RM) $(makfile)
	$(RM) $(makfile).old
	$(RM) PM.stamp

$(makfile): PM.stamp

ifdef NO_PERL_MAKEMAKER

ifeq ($(perllib_instdir),)
perllib_instdir = $(prefix)/lib
endif

instdir_SQ = $(subst ','\'',$(perllib_instdir))

modules += Git
modules += Git/I18N
modules += Git/IndexInfo
modules += Git/Packet
modules += Git/SVN
modules += Git/SVN/Memoize/YAML
modules += Git/SVN/Fetcher
modules += Git/SVN/Editor
modules += Git/SVN/GlobSpec
modules += Git/SVN/Log
modules += Git/SVN/Migration
modules += Git/SVN/Prompt
modules += Git/SVN/Ra
modules += Git/SVN/Utils

$(makfile): ../GIT-CFLAGS ../GIT-PERL-DEFINES Makefile
	echo all: private-Error.pm Git.pm Git/I18N.pm > $@
	set -e; \
	for i in $(modules); \
	do \
		if test $$i = $${i%/*}; \
		then \
			subdir=; \
		else \
			subdir=/$${i%/*}; \
		fi; \
		echo '	$(RM) blib/lib/'$$i'.pm' >> $@; \
		echo '	mkdir -p blib/lib'$$subdir >> $@; \
		echo '	cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
	done
	echo '	$(RM) blib/lib/Error.pm' >> $@
	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
	echo '	cp private-Error.pm blib/lib/Error.pm' >> $@
	echo install: >> $@
	set -e; \
	for i in $(modules); \
	do \
		if test $$i = $${i%/*}; \
		then \
			subdir=; \
		else \
			subdir=/$${i%/*}; \
		fi; \
		echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
		echo '	mkdir -p "$$(DESTDIR)$(instdir_SQ)'$$subdir'"' >> $@; \
		echo '	cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
	done
	echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
	echo '	cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
	echo instlibdir: >> $@
	echo '	echo $(instdir_SQ)' >> $@

else

# This may be empty if perllibdir was empty.
instdir_SQ = $(subst ','\'',$(perllib_instdir))

MAKEMAKER_PARAMS = PREFIX='$(prefix_SQ)' INSTALL_BASE=''
ifneq ($(instdir_SQ),)
MAKEMAKER_PARAMS += LIB='$(instdir_SQ)'
endif
ifneq ($(localedir_SQ),)
MAKEMAKER_PARAMS += --localedir='$(localedir_SQ)'
endif

$(makfile): Makefile.PL ../GIT-CFLAGS ../GIT-PERL-DEFINES
	$(PERL_PATH) $< $(MAKEMAKER_PARAMS)

endif

# this is just added comfort for calling make directly in perl dir
# (even though GIT-CFLAGS aren't used yet. If ever)
../GIT-CFLAGS ../GIT-PERL-DEFINES:
	$(MAKE) -C .. $(@F)

debug log:

solving 14bdda99d ...
found 14bdda99d in https://public-inbox.org/git/20171202154730.26258-1-dnj@google.com/
found b2aeeb0d8 in https://public-inbox.org/git/20171127164055.93283-3-dnj@google.com/ ||
	https://public-inbox.org/git/20171129155637.89075-3-dnj@google.com/
found f657de20e in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100644 f657de20e3983af8f990114c24bddd2775845d88	perl/Makefile

applying [1/2] https://public-inbox.org/git/20171127164055.93283-3-dnj@google.com/
diff --git a/perl/Makefile b/perl/Makefile
index f657de20e..b2aeeb0d8 100644

Checking patch perl/Makefile...
Applied patch perl/Makefile cleanly.

skipping https://public-inbox.org/git/20171129155637.89075-3-dnj@google.com/ for b2aeeb0d8
index at:
100644 b2aeeb0d841db2e895c99092129fb5c89d4ff60c	perl/Makefile

applying [2/2] https://public-inbox.org/git/20171202154730.26258-1-dnj@google.com/
diff --git a/perl/Makefile b/perl/Makefile
index b2aeeb0d8..14bdda99d 100644

Checking patch perl/Makefile...
Applied patch perl/Makefile cleanly.

index at:
100644 14bdda99d117ed8cca2dfe08d9f6ac757168adb7	perl/Makefile

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).