Makefile: do not link three copies of git-remote-* programs
Instead, link only one and make the rest hardlinks/copies, like we do for the built-ins. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
17fd9f571f
commit
611c7f6a37
12
Makefile
12
Makefile
@ -980,7 +980,8 @@ else
|
|||||||
else
|
else
|
||||||
CURL_LIBCURL = -lcurl
|
CURL_LIBCURL = -lcurl
|
||||||
endif
|
endif
|
||||||
PROGRAMS += git-remote-http$X git-remote-https$X git-remote-ftp$X git-http-fetch$X
|
CURL_SYNONYMS = git-remote-https$X git-remote-ftp$X
|
||||||
|
PROGRAMS += git-remote-http$X $(CURL_SYNONYMS) git-http-fetch$X
|
||||||
curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
|
curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
|
||||||
ifeq "$(curl_check)" "070908"
|
ifeq "$(curl_check)" "070908"
|
||||||
ifndef NO_EXPAT
|
ifndef NO_EXPAT
|
||||||
@ -1256,6 +1257,7 @@ ifndef V
|
|||||||
QUIET_LINK = @echo ' ' LINK $@;
|
QUIET_LINK = @echo ' ' LINK $@;
|
||||||
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
|
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
|
||||||
QUIET_GEN = @echo ' ' GEN $@;
|
QUIET_GEN = @echo ' ' GEN $@;
|
||||||
|
QUIET_LNCP = @echo ' ' LN/CP $@;
|
||||||
QUIET_SUBDIR0 = +@subdir=
|
QUIET_SUBDIR0 = +@subdir=
|
||||||
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
|
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
|
||||||
$(MAKE) $(PRINT_DIR) -C $$subdir
|
$(MAKE) $(PRINT_DIR) -C $$subdir
|
||||||
@ -1494,10 +1496,16 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
|
|||||||
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
|
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
|
||||||
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
|
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
|
||||||
|
|
||||||
git-remote-http$X git-remote-https$X git-remote-ftp$X: remote-curl.o http.o http-walker.o $(GITLIBS)
|
git-remote-http$X: remote-curl.o http.o http-walker.o $(GITLIBS)
|
||||||
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
|
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
|
||||||
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
|
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
|
||||||
|
|
||||||
|
$(CURL_SYNONYMS): git-remote-http$X
|
||||||
|
$(QUIET_LNCP)$(RM) $@ && \
|
||||||
|
ln $< $@ 2>/dev/null || \
|
||||||
|
ln -s $< $@ 2>/dev/null || \
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
|
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
|
||||||
$(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
|
$(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
|
||||||
builtin-revert.o wt-status.o: wt-status.h
|
builtin-revert.o wt-status.o: wt-status.h
|
||||||
|
Loading…
Reference in New Issue
Block a user