In some environments (most notably embedded systems and small production
servers), it is often desirable to have stripped Git binaries due to
tight disk space constraint.
Until now stripped Git can be built wih `make strip install`. Add
INSTALL_STRIP make variable so that they can install stripped Git
binaries with `make INSTALL_STRIP=yes install`.
Also document stripping and using INSTALL_STRIP in INSTALL.
Signed-off-by: Bagas Sanjaya <redacted>
---
Junio suggested me to have INSTALL_STRIP make variable [1] when
reviewing the install-strip target patch.
[1]:
https://lore.kernel.org/git/xmqq1r6p1ark.fsf@gitster.g/T/#mc3b8017448bdafedf9250ba407f5de767c20ad67
INSTALL | 8 ++++++++
Makefile | 5 +++++
2 files changed, 13 insertions(+)
@@ -58,6 +58,14 @@ suite has to be run using only a single CPU. In addition, the profile feedback build stage currently generates a lot of additional compiler warnings.+You can also strip debug info from built binaries by:++ $ make strip++or for stripping and installing together:++ $ make INSTALL_STRIP=yes install+ Issues of note: - Ancient versions of GNU Interactive Tools (pre-4.9.2) installed a
@@ -8,6 +8,8 @@ all::# Define SANE_TOOL_PATH to a colon-separated list of paths to prepend# to PATH if your tools in /usr/bin are broken.#+# Define INSTALL_STRIP if you want to install with stripped binaries.+## Define SOCKLEN_T to a suitable type (such as 'size_t') if your# system headers do not define a socklen_t type.#
From: Đoàn Trần Công Danh <hidden> Date: 2021-08-20 11:36:15
On 2021-08-20 17:50:53+0700, Bagas Sanjaya [off-list ref] wrote:
quoted hunk
In some environments (most notably embedded systems and small production
servers), it is often desirable to have stripped Git binaries due to
tight disk space constraint.
Until now stripped Git can be built wih `make strip install`. Add
INSTALL_STRIP make variable so that they can install stripped Git
binaries with `make INSTALL_STRIP=yes install`.
Also document stripping and using INSTALL_STRIP in INSTALL.
Signed-off-by: Bagas Sanjaya <redacted>
---
Junio suggested me to have INSTALL_STRIP make variable [1] when
reviewing the install-strip target patch.
[1]:
https://lore.kernel.org/git/xmqq1r6p1ark.fsf@gitster.g/T/#mc3b8017448bdafedf9250ba407f5de767c20ad67
INSTALL | 8 ++++++++
Makefile | 5 +++++
2 files changed, 13 insertions(+)
@@ -58,6 +58,14 @@ suite has to be run using only a single CPU. In addition, the profile feedback build stage currently generates a lot of additional compiler warnings.+You can also strip debug info from built binaries by:++ $ make strip++or for stripping and installing together:++ $ make INSTALL_STRIP=yes install+ Issues of note: - Ancient versions of GNU Interactive Tools (pre-4.9.2) installed a
@@ -8,6 +8,8 @@ all::# Define SANE_TOOL_PATH to a colon-separated list of paths to prepend# to PATH if your tools in /usr/bin are broken.#+# Define INSTALL_STRIP if you want to install with stripped binaries.+## Define SOCKLEN_T to a suitable type (such as 'size_t') if your# system headers do not define a socklen_t type.#
I believe it's better to write like this:
----- 8< ------
ifdef INSTALL_STRIP
install: strip
endif
install: all
....
---- >8-------
IOW, install depends on strip, not install invoke strip.
I think it would work better for:
make install strip
I believe it's better to write like this:
----- 8< ------
ifdef INSTALL_STRIP
install: strip
endif
install: all
....
---- >8-------
IOW, install depends on strip, not install invoke strip.
Oh, I missed that.
I think it would work better for:
make install strip
Wouldn't it install unstripped binaries to the prefix then stripping
them in the build directory?
--
An old man doll... just what I always wanted! - Clara
From: Đoàn Trần Công Danh <hidden> Date: 2021-08-21 10:35:32
On 2021-08-21 15:24:22+0700, Bagas Sanjaya [off-list ref] wrote:
On 20/08/21 18.36, Đoàn Trần Công Danh wrote:
quoted
I believe it's better to write like this:
----- 8< ------
ifdef INSTALL_STRIP
install: strip
endif
install: all
....
---- >8-------
IOW, install depends on strip, not install invoke strip.
Oh, I missed that.
quoted
I think it would work better for:
make install strip
Wouldn't it install unstripped binaries to the prefix then stripping them in
the build directory?
No, with:
install: strip
strip is one of install's dependencies, then strip will be executed
before install.
--
Danh