Git configure/make does not honor ARFLAGS
- From
- Jeffrey Walton <noloader@gmail.com>
- Date
- Aug 30, 2015, 21:34 UTC
- Message-ID
- <CAH8yC8kV77h8cRA9Qo_1FYe9sv0zgsE7yKxaX+OtpRfj9+7wog@mail.gmail.com>
I'm working on an old OS X machine. I needed to perform:
AR=libtool ARFLAGS="-static -o" ... make configure ./configure ... make
However, it appears the Makefile does not respect ARFLAGS:
$ grep -IR '$(AR)' *
Makefile: $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^
Makefile: $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^
Makefile: $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^It was fixed with a quick "sed":
sed -i "" 's|$(AR) rcs|$(AR) $(ARFLAGS)|g' Makefile
The Makefile might benefit from the following for users who need to tweak things:
ARFLAGS ?= rcs
... $(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
...