From: Bagas Sanjaya <bagasdotme@gmail.com>
To: git@vger.kernel.org
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Junio C Hamano" <gitster@pobox.com>,
"SZEDER Gábor" <szeder.dev@gmail.com>,
ak@linux.intel.com, "Jeff Hostetler" <git@jeffhostetler.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Bagas Sanjaya" <bagasdotme@gmail.com>
Subject: [PATCH] make: add install-strip target
Date: Tue, 17 Aug 2021 18:07:29 +0700 [thread overview]
Message-ID: <20210817110728.55842-1-bagasdotme@gmail.com> (raw)
Previously to install Git with stripped binaries, users have to do `make
all` then `make strip` before doing `make install`. It is nice to have
`install-strip` target for convenience, so that they can simply type
`make install-strip` and have Git with stripped binaries installed.
On some environments where disk space and resources is limited (such as
embedded systems), installed size can be smaller that with non-stripped
binaries.
Also mention the target in INSTALL.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
INSTALL | 5 +++++
Makefile | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/INSTALL b/INSTALL
index 66389ce059..6e6303d482 100644
--- a/INSTALL
+++ b/INSTALL
@@ -25,6 +25,11 @@ set up install paths (via config.mak.autogen), so you can write instead
$ make all doc ;# as yourself
# make install install-doc install-html;# as root
+If you're tight on space (common on embedded systems), you can install
+with debugging info stripped with
+
+ # make install-strip
+
If you're willing to trade off (much) longer build time for a later
faster git you can also do a profile feedback build with
diff --git a/Makefile b/Makefile
index 9573190f1d..8c4633ba8e 100644
--- a/Makefile
+++ b/Makefile
@@ -3093,6 +3093,9 @@ endif
done && \
./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
+install-strip: all strip
+ $(MAKE) install
+
.PHONY: install-gitweb install-doc install-man install-man-perl install-html install-info install-pdf
.PHONY: quick-install-doc quick-install-man quick-install-html
install-gitweb:
@@ -3265,7 +3268,7 @@ ifdef MSVC
$(RM) compat/vcbuild/MSVC-DEFS-GEN
endif
-.PHONY: all install profile-clean cocciclean clean strip
+.PHONY: all install install-strip profile-clean cocciclean clean strip
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
.PHONY: FORCE cscope
base-commit: 225bc32a989d7a22fa6addafd4ce7dcd04675dbf
--
2.25.1
next reply other threads:[~2021-08-17 11:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 11:07 Bagas Sanjaya [this message]
2021-08-17 21:28 ` [PATCH] make: add install-strip target Johannes Schindelin
2021-08-17 21:48 ` Eric Sunshine
2021-08-18 10:25 ` Johannes Schindelin
2021-08-19 19:54 ` Junio C Hamano
2021-08-24 13:15 ` Johannes Schindelin
2021-08-17 22:13 ` Junio C Hamano
2021-08-18 10:30 ` Johannes Schindelin
2021-08-19 19:42 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210817110728.55842-1-bagasdotme@gmail.com \
--to=bagasdotme@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=ak@linux.intel.com \
--cc=avarab@gmail.com \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).