Re: [RFC/PATCH 0/3] Thinning the git toplevel directory
- From
Jeff King <peff@peff.net>
- Date
- Feb 22, 2011, 15:56 UTC
- Message-ID
- <20110222155637.GC27178@sigill.intra.peff.net>
- In-Reply-To
- <20110219111103.GA1841@elie>
On Sat, Feb 19, 2011 at 05:11:03AM -0600, Jonathan Nieder wrote:
> - merge builtins/ with commands/. It never was clear to me why > making a command builtin should require changing its filename.
This may be a bit too radical, but maybe the Makefile should use this structure to save maintenance effort. In other words, is there any reason not to just have:
BUILTIN_SOURCES = $(wildcard builtin/*.c) BUILTIN_OBJS = $(patsubst builtin/%.c, builtin/%.o, $(BUILTIN_SOURCES))
and similar for LIB_OBJS and LIB_H?
It is one less thing to need to do when writing new code, and one less thing to have silly textual conflicts on. It probably doesn't matter that much, though; we don't actually add new files or commands all that often.
Speaking of Makefiles, one downside to all of this directory segmentation is that you can't run "make" from the subdirectories. I don't know how much we care. Certainly we could put a dummy Makefile in each subdir that just goes to the toplevel and runs make.
-Peff