mirror of
https://github.com/git/git.git
synced 2024-06-02 17:36:09 +02:00
Git.pm: assorted build related fixes.
- We passed our own *.a archives as LIBS to the submake that runs in perl/; separate LIBS and EXTLIBS and pass the latter which tells what the system libraries are used. - The quoting of preprocesor symbol definitions passed down to perl/ submake was loose and we lost double quotes around include directives. Use *_SQ to quote them properly. - The installation location of perl/ submake is not architecture neutral anymore, so use SITEARCH instead of SITELIB. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
523bbaa458
commit
d595a473ee
26
Makefile
26
Makefile
|
@ -235,7 +235,7 @@ BUILTIN_OBJS = \
|
||||||
builtin-update-ref.o
|
builtin-update-ref.o
|
||||||
|
|
||||||
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
|
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
|
||||||
LIBS = $(GITLIBS) -lz
|
EXTLIBS = -lz
|
||||||
|
|
||||||
#
|
#
|
||||||
# Platform specific tweaks
|
# Platform specific tweaks
|
||||||
|
@ -393,14 +393,14 @@ ifdef NEEDS_LIBICONV
|
||||||
else
|
else
|
||||||
ICONV_LINK =
|
ICONV_LINK =
|
||||||
endif
|
endif
|
||||||
LIBS += $(ICONV_LINK) -liconv
|
EXTLIBS += $(ICONV_LINK) -liconv
|
||||||
endif
|
endif
|
||||||
ifdef NEEDS_SOCKET
|
ifdef NEEDS_SOCKET
|
||||||
LIBS += -lsocket
|
EXTLIBS += -lsocket
|
||||||
SIMPLE_LIB += -lsocket
|
SIMPLE_LIB += -lsocket
|
||||||
endif
|
endif
|
||||||
ifdef NEEDS_NSL
|
ifdef NEEDS_NSL
|
||||||
LIBS += -lnsl
|
EXTLIBS += -lnsl
|
||||||
SIMPLE_LIB += -lnsl
|
SIMPLE_LIB += -lnsl
|
||||||
endif
|
endif
|
||||||
ifdef NO_D_TYPE_IN_DIRENT
|
ifdef NO_D_TYPE_IN_DIRENT
|
||||||
|
@ -463,7 +463,7 @@ ifdef MOZILLA_SHA1
|
||||||
LIB_OBJS += mozilla-sha1/sha1.o
|
LIB_OBJS += mozilla-sha1/sha1.o
|
||||||
else
|
else
|
||||||
SHA1_HEADER = <openssl/sha.h>
|
SHA1_HEADER = <openssl/sha.h>
|
||||||
LIBS += $(LIB_4_CRYPTO)
|
EXTLIBS += $(LIB_4_CRYPTO)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -489,9 +489,13 @@ PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
|
||||||
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
|
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
|
||||||
GIT_PYTHON_DIR_SQ = $(subst ','\'',$(GIT_PYTHON_DIR))
|
GIT_PYTHON_DIR_SQ = $(subst ','\'',$(GIT_PYTHON_DIR))
|
||||||
|
|
||||||
|
LIBS = $(GITLIBS) $(EXTLIBS)
|
||||||
|
|
||||||
ALL_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' $(COMPAT_CFLAGS)
|
ALL_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' $(COMPAT_CFLAGS)
|
||||||
LIB_OBJS += $(COMPAT_OBJS)
|
LIB_OBJS += $(COMPAT_OBJS)
|
||||||
export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
|
export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
|
||||||
|
|
||||||
|
|
||||||
### Build rules
|
### Build rules
|
||||||
|
|
||||||
all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk
|
all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk
|
||||||
|
@ -615,11 +619,15 @@ $(XDIFF_LIB): $(XDIFF_OBJS)
|
||||||
rm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS)
|
rm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS)
|
||||||
|
|
||||||
|
|
||||||
perl/Makefile: perl/Git.pm perl/Makefile.PL
|
PERL_DEFINE = $(ALL_CFLAGS) -DGIT_VERSION='"$(GIT_VERSION)"'
|
||||||
|
PERL_DEFINE_SQ = $(subst ','\'',$(PERL_DEFINE))
|
||||||
|
PERL_LIBS = $(EXTLIBS)
|
||||||
|
PERL_LIBS_SQ = $(subst ','\'',$(PERL_LIBS))
|
||||||
|
perl/Makefile: perl/Git.pm perl/Makefile.PL GIT-CFLAGS
|
||||||
(cd perl && $(PERL_PATH) Makefile.PL \
|
(cd perl && $(PERL_PATH) Makefile.PL \
|
||||||
PREFIX="$(prefix)" \
|
PREFIX='$(prefix_SQ)' \
|
||||||
DEFINE="$(ALL_CFLAGS) -DGIT_VERSION=\\\"$(GIT_VERSION)\\\"" \
|
DEFINE='$(PERL_DEFINE_SQ)' \
|
||||||
LIBS="$(LIBS)")
|
LIBS='$(PERL_LIBS_SQ)')
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
$(MAKE) -C Documentation all
|
$(MAKE) -C Documentation all
|
||||||
|
|
|
@ -29,7 +29,7 @@ report_xs(const char *prefix, const char *err, va_list params)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void NORETURN
|
||||||
die_xs(const char *err, va_list params)
|
die_xs(const char *err, va_list params)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
|
@ -37,13 +37,12 @@ die_xs(const char *err, va_list params)
|
||||||
croak(str);
|
croak(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static void
|
||||||
error_xs(const char *err, va_list params)
|
error_xs(const char *err, va_list params)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
str = report_xs("error: ", err, params);
|
str = report_xs("error: ", err, params);
|
||||||
warn(str);
|
warn(str);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ use ExtUtils::MakeMaker;
|
||||||
sub MY::postamble {
|
sub MY::postamble {
|
||||||
return <<'MAKE_FRAG';
|
return <<'MAKE_FRAG';
|
||||||
instlibdir:
|
instlibdir:
|
||||||
@echo $(INSTALLSITELIB)
|
@echo $(INSTALLSITEARCH)
|
||||||
|
|
||||||
MAKE_FRAG
|
MAKE_FRAG
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue