CURLDIR support, more usable cmd-rename.sh
PATCH 1/1 CURLDIR support, more usable cmd-rename.sh
hello,
attached are two patches.
the first is an updated implementation of CURLDIR support (for those who have libcurl outside their library search path)
the second changes cmd-rename.sh so that it only adds symlinks to executables that actually exist (eg. when building with NO_CURL, git-http-pull would still be created).
another issue I had was that mailinfo uses strcasestr, which isn't in solaris' libc (and not in posix according to
http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00076.html). I disabled it in my build for now, and might come up with a patch later, unless someone beats me to it.
patrick mauritz
Dear diary, on Mon, Sep 19, 2005 at 01:14:36PM CEST, I got a letter where Patrick Mauritz <[email protected]> told me that...
Quoted 1 line
hello,
Hello,
Quoted 1 line
attached are two patches.
seems that they didn't quite get attached in the end. ;-)
Quoted 5 lines
another issue I had was that mailinfo uses strcasestr, which isn't in solaris' libc (and not in posix according to
http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00076.html). I disabled it in my build for now, and might come up with a patch later, unless someone beats me to it.
Linus already did in <[email protected]>.
Signature · 4 lines
Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ If you want the holes in your knowledge showing up try teaching someone. -- Alan Cox
Quoted 1 line · Petr Baudis
seems that they didn't quite get attached in the end. ;-)
oops :)
here they are
Quoted 1 line
Linus already did in <[email protected]>.
yay :)
patrick mauritz
Makefile renamed from /Makefile +8 -1
@@ -42,7 +42,10 @@ GIT_VERSION = 0.99.7 -CFLAGS = -g -O2 -Wall +CFLAGS = -g -O2 +ifdef CURLDIR +CFLAGS+=-I$(CURLDIR)/include +endif ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES) prefix = $(HOME)
@@ -261,7 +264,11 @@ git-ssh-pull: rsh.o fetch.o git-ssh-push: rsh.o +ifdef CURLDIR +git-http-fetch: LIBS += -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl +else git-http-fetch: LIBS += -lcurl +endif git-rev-list: LIBS += $(OPENSSL_LIBSSL) init-db.o: init-db.c
cmd-rename.sh renamed from cmd-rename.sh~ +2 -0
@@ -4,7 +4,9 @@ while read old new do rm -f "$d/$old" + if [ -x "$d/$new" ]; then ln -s "$new" "$d/$old" + fi done <<\EOF git-add-script git-add git-archimport-script git-archimport
Makefile
Quoted 3 lines · Patrick Mauritz
diff -ur git-core-0.99.7.orig//Makefile git-core-0.99.7/Makefile
Makefile renamed from /Makefile +0
-0
Why not a patch from either git or cogito or stgit ;-)? Anyway, thanks for your patch.
Makefile line 45
Quoted 2 lines
Makefile renamed from /Makefile +1
-1-CFLAGS = -g -O2 -Wall +CFLAGS = -g -O2
Not relevant to the current topic as far as I can tell (unless your non-standard curl include files trip under -Wall).
Quoted 7 lines
Makefile renamed from /Makefile +3
-0+ifdef CURLDIR +CFLAGS+=-I$(CURLDIR)/include +endif ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES) prefix = $(HOME)
Makefile line 271
Quoted 8 lines
Makefile renamed from /Makefile +4
-0@@ -261,7 +264,11 @@ git-ssh-pull: rsh.o fetch.o git-ssh-push: rsh.o +ifdef CURLDIR +git-http-fetch: LIBS += -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl +else git-http-fetch: LIBS += -lcurl +endif
I do not have any objections to helping installations where CURL is installed somewhere nonstandard, but if that is the case I am wondering if assuming that they are all in the same directory hierarchy covers enough. CURLDIR=/usr/local/ would be OK and CURLDIR=/opt/curl/ would be as well with this patch, so this probably is fine. Installations without ld.so.conf need -R, but is it safe to always force -R like this?
Also I wonder if we need similar customization for openssl stuff, but that is a separate topic.
cmd-rename.sh line 9
Quoted 9 lines
cmd-rename.sh renamed from cmd-rename.sh~ +2
-0@@ -4,7 +4,9 @@ while read old new do rm -f "$d/$old" + if [ -x "$d/$new" ]; then ln -s "$new" "$d/$old" + fi
No questions about this part. Thanks for the fix.
Quoted 1 line · Junio C Hamano
Why not a patch from either git or cogito or stgit ;-)?
because my only use for git is with monotone's git import.
Quoted 2 lines
Not relevant to the current topic as far as I can tell (unless your non-standard curl include files trip under -Wall).
the only issue with this is that sunpro's cc doesn't like -Wall
Quoted 2 lines
Installations without ld.so.conf need -R, but
is it safe to always force -R like this?
the only case that comes to mind is where you want to link git against a library which is at a different location now than it is later, eg. in conjunction with DESTDIR or similar means.
as long as git doesn't build any shared libraries by itself and links to them, this shouldn't be an issue.
patrick mauritz
Quoted 3 lines · Patrick Mauritz
Quoted 2 lines
Not relevant to the current topic as far as I can tell (unless your non-standard curl include files trip under -Wall).
the only issue with this is that sunpro's cc doesn't like -Wall
Since you will be saying "make CURLDIR=blah" anyway, I'd ask you to say "make CURLDIR=blah CFLAGS='-O -g'" and will forget about this part.
The rest of your patch I am keeping a variant based on it, done slightly differently, in the proposed updates branch. I'll have it graduate to the master branch when I hear from somebody (can be you) with SunPro that the it is OK (or an improvement patch).
Thanks.
Makefile line 45
Quoted 2 lines · Patrick Mauritz
Makefile renamed from /Makefile +1
-1-CFLAGS = -g -O2 -Wall +CFLAGS = -g -O2
Umm, no, you don't get to unconditionally throw way -Wall.
*Some* people think this flag makes sense and that the sane default (on sane OSes, i.e. those who have GCC and glibc) should be to include it.
;-)
Signature · 6 lines
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [email protected]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
I must have a prodigious quantity of mind; it takes me as much as a
week sometimes to make it up.
-- Mark Twain, "The Innocents Abroad"