Re: [PATCH] build: get rid of the notion of a git library
From: Felipe Contreras <hidden>
Date: 2016-06-15 22:57:41
On Mon, Jun 10, 2013 at 6:41 PM, Junio C Hamano [off-list ref] wrote:
For the particular case of trying to make sequencer.o, which does
not currently have dependencies on builtin/*.o, depend on something
that is in builtin/notes.o, the link phase of standalone that wants
anything from revision.o (which is pretty much everything ;-) goes
like this:
upload-pack.c wants handle_revision_opt etc.
revision.c provides handle_revision_opt
wants name_decoration etc.
log-tree.c provides name_decoration
wants append_signoff
sequencer.c provides append_signoff
So sequencer.o _is_ meant to be usable from standalone and belongs
to libgit.aNot after my patch. It moves append_signoff *out* of sequencer, which in fact has nothing to do with the sequencer in the first place.
If sequencer.o wants to call init_copy_notes_for_rewrite() and its
friends [*1*] that are currently in builtin/notes.o, first the
called function(s) should be moved outside builtin/notes.o to
notes.o or somewhere more library-ish place to be included in
libgit.a, which is meant to be usable from standalone.
[Footnote]
*1* ... which is a very reasonable thing to do. But moving
sequencer.o to builtin/sequencer.o is *not* the way to do this.By now we all know what is the *CURRENT* way to do this; in other words, the status quo, which is BTW all messed up, because builtin/*.o objects depend on each other already. We are discussing the way it *SHOULD* be. Why aren't you leaning on that? -- Felipe Contreras