Skip to content

Commit

Permalink
Makefile: allow $(ARFLAGS) specified from the command line
Browse files Browse the repository at this point in the history
We can do this because we have a very simple needs and run "ar"
exactly the same way everywhere ;-).

Requested-by: Jeffrey Walton
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Sep 10, 2015
1 parent 282616c commit ac179b4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
STRIP ?= strip

# Create as necessary, replace existing, make ranlib unneeded.
ARFLAGS = rcs

# Among the variables below, these:
# gitexecdir
# template_dir
Expand Down Expand Up @@ -2068,13 +2071,13 @@ $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)

$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^

$(XDIFF_LIB): $(XDIFF_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^

$(VCSSVN_LIB): $(VCSSVN_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^

export DEFAULT_EDITOR DEFAULT_PAGER

Expand Down

0 comments on commit ac179b4

Please sign in to comment.