[pacman-dev] [PATCH] makepkg: make strip options configurable
The newly added variables STRIP_BINARIES, STRIP_SHARED and STRIP_STATIC,
that are set in makepkg.conf, specify the strip options used on binaries
and shared and static libraries.
In addition, files are now stripped more aggressively by default.
Implements FS#13592 the way it was suggested by Allan in the comments.
Signed-off-by: Cedric Staniewski
Cedric Staniewski wrote:
The newly added variables STRIP_BINARIES, STRIP_SHARED and STRIP_STATIC, that are set in makepkg.conf, specify the strip options used on binaries and shared and static libraries. In addition, files are now stripped more aggressively by default.
Implements FS#13592 the way it was suggested by Allan in the comments.
Signed-off-by: Cedric Staniewski
---
Awesome. This is exactly how I wanted this implemented. I will give it a full test later. However, what is this change?
diff --git a/doc/Makefile.am b/doc/Makefile.am index fcbcab8..ce1adab 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am ...
@@ -93,8 +99,12 @@ A2X_OPTS = \ --xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0'
# These rules are due to the includes and files of the asciidoc text -$(ASCIIDOC_MANS): asciidoc.conf footer.txt - a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt +$(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile + @echo GEN $@; + @rm -f $@.tmp + @test -f $(srcdir)/$@.txt && $(edit) $(srcdir)/$@.txt >$@.tmp || true + a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.tmp + @rm -f $@.tmp
%.html: %.txt asciidoc $(ASCIIDOC_OPTS) -a linkcss $*.txt
As an aside for anyone testing this out, do not use it on glibc and the install the resulting package as it may have issues with threading... Allan
On 12/14/2009 02:42 AM, Allan McRae wrote:
However, what is this change?
diff --git a/doc/Makefile.am b/doc/Makefile.am index fcbcab8..ce1adab 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am ...
@@ -93,8 +99,12 @@ A2X_OPTS = \ --xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0'
# These rules are due to the includes and files of the asciidoc text -$(ASCIIDOC_MANS): asciidoc.conf footer.txt - a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt +$(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile + @echo GEN $@; + @rm -f $@.tmp + @test -f $(srcdir)/$@.txt && $(edit) $(srcdir)/$@.txt >$@.tmp || true + a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.tmp + @rm -f $@.tmp
%.html: %.txt asciidoc $(ASCIIDOC_OPTS) -a linkcss $*.txt
It is needed to get the correct default values in makepkg.conf man page:
+**STRIP_BINARIES=**"@STRIP_BINARIES@":: [...] +**STRIP_SHARED=**"@STRIP_SHARED@":: [...] +**STRIP_STATIC=**"@STRIP_STATIC@"::
There are no os-dependent values in the documentation yet, so I had to add these lines to be able to replace strings with actual values. It only makes a difference on darwin, though.
Cedric Staniewski wrote:
On 12/14/2009 02:42 AM, Allan McRae wrote:
However, what is this change?
diff --git a/doc/Makefile.am b/doc/Makefile.am index fcbcab8..ce1adab 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am ...
@@ -93,8 +99,12 @@ A2X_OPTS = \ --xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0'
# These rules are due to the includes and files of the asciidoc text -$(ASCIIDOC_MANS): asciidoc.conf footer.txt - a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt +$(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile + @echo GEN $@; + @rm -f $@.tmp + @test -f $(srcdir)/$@.txt && $(edit) $(srcdir)/$@.txt >$@.tmp || true + a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.tmp + @rm -f $@.tmp
%.html: %.txt asciidoc $(ASCIIDOC_OPTS) -a linkcss $*.txt
It is needed to get the correct default values in makepkg.conf man page:
Ah, I missed that completely! Saying that, I have no idea how it does what it does, so I will let Dan review that part... :P Allan
The newly added variables STRIP_BINARIES, STRIP_SHARED and STRIP_STATIC,
that are set in makepkg.conf, specify the strip options used on binaries
and shared and static libraries.
In addition, files are now stripped more aggressively by default.
Implements FS#13592 the way it was suggested by Allan in the comments.
Signed-off-by: Cedric Staniewski
Cedric Staniewski wrote:
The newly added variables STRIP_BINARIES, STRIP_SHARED and STRIP_STATIC, that are set in makepkg.conf, specify the strip options used on binaries and shared and static libraries. In addition, files are now stripped more aggressively by default.
Implements FS#13592 the way it was suggested by Allan in the comments.
Signed-off-by: Cedric Staniewski
--- There are only two minor changes in this patch compared to the initial one.
* removed an unneeded "@rm -f $@.tmp" from the following code section:
# These rules are due to the includes and files of the asciidoc text $(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile @echo GEN $@; @rm -f $@.tmp @test -f $(srcdir)/$@.txt && $(edit) $(srcdir)/$@.txt >$@.tmp || true a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.tmp @rm -f $@.tmp
* changed an output message to reflect the new default strip options
- msg2 "$(gettext "Stripping debugging symbols from binaries and libraries...")" + msg2 "$(gettext "Stripping unneeded symbols from binaries and libraries...")"
<snip> Updated on my working branch. We need to remember that message when release time comes or else it will likely be missed in translation updates. Allan
participants (2)
-
Allan McRae
-
Cedric Staniewski