bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zutils vs single compressor utilities


From: Antonio Diaz Diaz
Subject: Re: Zutils vs single compressor utilities
Date: Mon, 16 Jan 2012 17:55:17 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Hello again Paul,

Paul Eggert wrote:
If memory serves, we were going to add a configure-time flag
to change the program names from z* to gz*, which sounds
reasonable, when someone gets around to it.

Exactly.

Is that a change you could write?  That would help move things along,
I expect.

Rob Savoye has been so kind as to write the attached patch which correctly uses the standard configure option "--program-transform-name" to also rename the man pages.

After applying this patch, it is easy to prefix a 'g' to the front of any executable (and manpage) that does start with a 'z' by invoking configure as Matias suggested[1]:

  ./configure --prefix=/usr --program-transform-name='s/^z/g&/'


[1] http://lists.gnu.org/archive/html/bug-gzip/2011-01/msg00016.html


Thanks,
Antonio.

diff --git a/Makefile.am b/Makefile.am
index 86a0297..58024c5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -145,6 +145,29 @@ install-exec-hook remove-installed-links:
          done; \
        done
 
+install-man1: $(MANS)
+       test -d "$(DESTDIR)$(man1dir)/" || $(mkinstalldirs) 
"$(DESTDIR)$(man1dir)/"
+       for file in $(MANS) $(EXTRAMANPAGES); do \
+         g=`echo $$file | grep -c "^g"`; \
+         if test $$g -eq 0; then \
+           t="`echo $$file | sed '$(program_transform_name)'`"; \
+         else \
+           t=$$file; \
+         fi; \
+         $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$t; \
+       done
+
+uninstall-man1:
+       for file in $(MANS) $(EXTRAMANPAGES); do \
+         g=`echo $$file | grep -c "^g"`; \
+         if test $$g -eq 0; then \
+           t="`echo $$file | sed '$(program_transform_name)'`"; \
+         else \
+           t=$$file; \
+         fi; \
+         $(RM) $(DESTDIR)$(man1dir)/$$t; \
+       done
+
 uninstall-local: remove-installed-links
 
 ALL_RECURSIVE_TARGETS += distcheck-hook

reply via email to

[Prev in Thread] Current Thread [Next in Thread]