From: Jonathan Nieder <jrnieder@gmail.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH 1/3] Move libgit.a sources into a libgit/ subdirectory
Date: Thu, 17 Feb 2011 22:14:05 -0600 [thread overview]
Message-ID: <20110218041358.GB15643@elie> (raw)
In-Reply-To: <AANLkTikFLkXKKhZoDGAgh+i8H2fv+QNEVj7vEVABxee2@mail.gmail.com>
Nguyen Thai Ngoc Duy wrote:
> 2011/2/18 Jonathan Nieder <jrnieder@gmail.com>:
>> Move sources for libgit.a to a libgit/ subdirectory. This way, a
>> person wanting to tackle the reusable part of git will know where to
>> look, and those looking to work on individual commands know to look
>> elsewhere.
>
> You missed a few (on purpose?): block-sha1, ppc and compat.
Yes, on purpose. They're separately reusable.
> libgit.a is produced at toplevel so I need a few more keystrokes to
> reach files inside libgit. Maybe move libgit.a to libgit too?
Mm, good idea.
> With die() all over the place in libgit.a, I doubt it would become an
> independent project. Although this certainly makes it easier to
> reimplement libgit as a thin wrapper around libgit2.
I think it's more realistic to replace functions in libgit one by one
with reentrant versions.
Jonathan
-- 8< --
Subject: Rename libgit.a to libgit/lib.a
This makes the libgit files easier to reach through tab completion.
cgit uses "make -C git libgit.a" in its build process. Make sure
that continues to work by installing a symlink libgit.a -> libgit/lib.a
on request.
Requested-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Makefile | 5 ++++-
contrib/svn-fe/Makefile | 6 +++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index b812c1e..3d701d2 100644
--- a/Makefile
+++ b/Makefile
@@ -487,7 +487,7 @@ endif
export PERL_PATH
export PYTHON_PATH
-LIB_FILE=libgit.a
+LIB_FILE=libgit/lib.a
XDIFF_LIB=xdiff/lib.a
VCSSVN_LIB=vcs-svn/lib.a
@@ -2029,6 +2029,9 @@ $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(GITLIBS)
$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
+libgit.a: $(LIB_FILE)
+ ln -sf $(LIB_FILE) $@
+
$(XDIFF_LIB): $(XDIFF_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS)
diff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile
index 360d8da..9dcad63 100644
--- a/contrib/svn-fe/Makefile
+++ b/contrib/svn-fe/Makefile
@@ -10,7 +10,7 @@ ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
EXTLIBS =
-GIT_LIB = ../../libgit.a
+GIT_LIB = ../../libgit/lib.a
VCSSVN_LIB = ../../vcs-svn/lib.a
LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(EXTLIBS)
@@ -54,8 +54,8 @@ svn-fe.1: svn-fe.txt
../../vcs-svn/lib.a: FORCE
$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a
-../../libgit.a: FORCE
- $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a
+../../libgit/lib.a: FORCE
+ $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit/lib.a
clean:
$(RM) svn-fe$X svn-fe.o svn-fe.html svn-fe.xml svn-fe.1
--
1.7.4.1
next prev parent reply other threads:[~2011-02-18 4:14 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-09 15:14 [PATCH/RFC] Move test-*.c to test/ subdirectory Nguyễn Thái Ngọc Duy
2011-02-09 15:23 ` Nguyen Thai Ngoc Duy
2011-02-09 22:15 ` Junio C Hamano
2011-02-10 2:14 ` [PATCH] Move test-* to t/helper/ subdirectory Nguyễn Thái Ngọc Duy
2011-02-18 2:27 ` [RFC/PATCH 0/3] Thinning the git toplevel directory Jonathan Nieder
2011-02-18 2:31 ` [PATCH 1/3] Move libgit.a sources into a libgit/ subdirectory Jonathan Nieder
2011-02-18 3:47 ` Nguyen Thai Ngoc Duy
2011-02-18 4:14 ` Jonathan Nieder [this message]
2011-02-18 4:18 ` Jeff King
2011-02-18 5:58 ` Jonathan Nieder
2011-02-18 4:31 ` Nguyen Thai Ngoc Duy
2011-02-18 2:33 ` [PATCH 2/3] Move test-* into a test-programs/ subdirectory Jonathan Nieder
2011-02-18 2:37 ` [PATCH 3/3] Move header files into a include/ subdirectory Jonathan Nieder
2011-02-18 3:52 ` Nguyen Thai Ngoc Duy
2011-02-18 4:29 ` [RFC/PATCH 4 to 6/3] Move remaining " Jonathan Nieder
2011-02-18 4:32 ` [PATCH 4/3] compat: do not use relative paths to refer to git-compat-util.h et al Jonathan Nieder
2011-02-18 4:34 ` [PATCH 5/3] block-sha1: do not use relative path for git-compat-util.h Jonathan Nieder
2011-02-18 4:35 ` [PATCH 6/3] Move git-compat-util.h, strbuf.h, and cache.h to include/ Jonathan Nieder
2011-02-18 3:56 ` [RFC/PATCH 0/3] Thinning the git toplevel directory Nguyen Thai Ngoc Duy
2011-02-18 4:51 ` [RFC/PATCH 7 - 9/3] " Jonathan Nieder
2011-02-18 4:52 ` [PATCH 7/3] Move test-sha1.sh to test-programs/ Jonathan Nieder
2011-02-18 4:55 ` [PATCH 8/3] Move build helpers to scripts/ subdirectory Jonathan Nieder
2011-02-18 5:04 ` [PATCH 9/3] Move non-builtin git commands and script libraries to a subdirectory Jonathan Nieder
2011-02-18 9:25 ` [RFC/PATCH 0/3] Thinning the git toplevel directory Jonathan Nieder
2011-02-18 11:08 ` Jeff King
2011-02-18 12:33 ` Jonathan Nieder
2011-02-18 12:33 ` Nguyen Thai Ngoc Duy
2011-02-18 18:55 ` Junio C Hamano
2011-02-19 11:11 ` Jonathan Nieder
2011-02-19 23:05 ` Sverre Rabbelier
2011-02-19 23:15 ` The git_remote_helpers package (Re: [RFC/PATCH 0/3] Thinning the git toplevel directory) Jonathan Nieder
2011-02-22 15:56 ` [RFC/PATCH 0/3] Thinning the git toplevel directory Jeff King
2011-02-22 19:30 ` Junio C Hamano
2011-02-22 19:32 ` Sverre Rabbelier
2011-02-23 4:51 ` Jeff King
2011-02-23 8:29 ` Jonathan Nieder
2011-02-23 8:43 ` Jeff King
2011-02-23 9:56 ` Recursive make and variations on the theme Jonathan Nieder
2011-02-23 16:42 ` [RFC/PATCH 0/3] Thinning the git toplevel directory Junio C Hamano
2011-02-23 17:18 ` Nicolas Pitre
2011-02-23 23:09 ` Drew Northup
2011-02-24 0:14 ` Nicolas Pitre
2011-02-24 17:10 ` Drew Northup
2011-02-24 18:04 ` Nicolas Pitre
2011-02-24 19:08 ` Jeff King
2011-02-24 19:46 ` Drew Northup
2011-02-19 0:10 ` Piotr Krukowiecki
2011-02-19 0:31 ` Junio C Hamano
2011-02-19 0:50 ` Jonathan Nieder
2011-02-19 9:27 ` Piotr Krukowiecki
2011-02-19 9:24 ` Piotr Krukowiecki
2011-02-19 9:41 ` Advertising the prebuilt htmldocs and manpages Jonathan Nieder
2011-02-20 6:52 ` Junio C Hamano
2011-02-20 9:40 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110218041358.GB15643@elie \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@fluxnic.net \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).