summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 523bbaa)
raw | patch | inline | side by side (parent: 523bbaa)
author | Petr Baudis <pasky@suse.cz> | |
Sun, 25 Jun 2006 01:35:12 +0000 (18:35 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 3 Jul 2006 00:14:42 +0000 (17:14 -0700) |
- 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>
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>
Makefile | patch | blob | history | |
perl/Git.xs | patch | blob | history | |
perl/Makefile.PL | patch | blob | history |
diff --git a/Makefile b/Makefile
index a76526aa6c76451ac84e7a348ccd2888bc1d6f5c..1371e79df271e25845bd0dd0e9993a10b69119ff 100644 (file)
--- a/Makefile
+++ b/Makefile
builtin-update-ref.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
-LIBS = $(GITLIBS) -lz
+EXTLIBS = -lz
#
# Platform specific tweaks
else
ICONV_LINK =
endif
- LIBS += $(ICONV_LINK) -liconv
+ EXTLIBS += $(ICONV_LINK) -liconv
endif
ifdef NEEDS_SOCKET
- LIBS += -lsocket
+ EXTLIBS += -lsocket
SIMPLE_LIB += -lsocket
endif
ifdef NEEDS_NSL
- LIBS += -lnsl
+ EXTLIBS += -lnsl
SIMPLE_LIB += -lnsl
endif
ifdef NO_D_TYPE_IN_DIRENT
LIB_OBJS += mozilla-sha1/sha1.o
else
SHA1_HEADER = <openssl/sha.h>
- LIBS += $(LIB_4_CRYPTO)
+ EXTLIBS += $(LIB_4_CRYPTO)
endif
endif
endif
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
GIT_PYTHON_DIR_SQ = $(subst ','\'',$(GIT_PYTHON_DIR))
+LIBS = $(GITLIBS) $(EXTLIBS)
+
ALL_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' $(COMPAT_CFLAGS)
LIB_OBJS += $(COMPAT_OBJS)
export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
+
+
### Build rules
all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk
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 \
- PREFIX="$(prefix)" \
- DEFINE="$(ALL_CFLAGS) -DGIT_VERSION=\\\"$(GIT_VERSION)\\\"" \
- LIBS="$(LIBS)")
+ PREFIX='$(prefix_SQ)' \
+ DEFINE='$(PERL_DEFINE_SQ)' \
+ LIBS='$(PERL_LIBS_SQ)')
doc:
$(MAKE) -C Documentation all
diff --git a/perl/Git.xs b/perl/Git.xs
index 9d247b7130dee4582b4b7358c1b229576a68ac1e..8b06ebfae9e7b96c71a2fb03851d99b76ee88ec6 100644 (file)
--- a/perl/Git.xs
+++ b/perl/Git.xs
return buf;
}
-void
+static void NORETURN
die_xs(const char *err, va_list params)
{
char *str;
croak(str);
}
-int
+static void
error_xs(const char *err, va_list params)
{
char *str;
str = report_xs("error: ", err, params);
warn(str);
- return -1;
}
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index 54e8b20ed826f9666402d5092d7c64194c96944b..92c140d39b662c10204cf54bcd906793b2a1279b 100644 (file)
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
sub MY::postamble {
return <<'MAKE_FRAG';
instlibdir:
- @echo $(INSTALLSITELIB)
+ @echo $(INSTALLSITEARCH)
MAKE_FRAG
}