@matheusbsbs / matheus-bagliano / commits / 7df1709c36
Fork 0

Link shell with compat layer functions

This in the short term will break on platforms that use compat implemenations that call outside compat layer, but that is exactly what we want. To give incentive to fix things for people who are affected and more importantly have environment to test their fixes. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jul 20, 2008 at 15:58 UTC 7df1709c36ff93f56636ab11db612dedb0d2bed0
1 file changed +7 -3
Makefile
+7 -3
@@ -324,6 +324,7 @@ endif
324 export PERL_PATH
325
326 LIB_FILE=libgit.a
327 +COMPAT_LIB = compat/lib.a
328 XDIFF_LIB=xdiff/lib.a
329
330 LIB_H += archive.h
@@ -1203,8 +1204,11 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
1204 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
1205 $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
1206
1206 -git-shell$X: compat/strlcpy.o abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o
1207 - $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^)
1207 +$(COMPAT_LIB): $(COMPAT_OBJS)
1208 + $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(COMPAT_OBJS)
1209 +
1210 +git-shell$X: abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o $(COMPAT_LIB)
1211 + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(COMPAT_LIB)
1212
1213 $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
1214 $(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
@@ -1402,7 +1406,7 @@ distclean: clean
1406
1407 clean:
1408 $(RM) *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o xdiff/*.o \
1405 - $(LIB_FILE) $(XDIFF_LIB)
1409 + $(LIB_FILE) $(XDIFF_LIB) $(COMPAT_LIB)
1410 $(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
1411 $(RM) $(TEST_PROGRAMS)
1412 $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*