[patch] 2.2.3, current: `make install' fixes
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Fri Jun 1 06:01:00 GMT 2001
Hi,
With the introduction of fileutils 4.1 one cannot execute:
INSTALL_PROGRAM='${INSTALL} -s' ./configure
make
make install
anymore. This is because the install program from fileutils 4.1 exits
with an error when trying to install and strip an unrecognized executable,
e.g. a script and glibc has a number of scripts to install.
Autoconf 2.13 already provides an appropriate facility to install
scripts, i.e. the INSTALL_SCRIPT variable. Following is a patch that uses
the variable to install scripts. It works for me as expected when glibc
is configured with the following command line:
INSTALL_PROGRAM='${INSTALL} -s' INSTALL_SCRIPT='${INSTALL}' ./configure
<options>
(the INSTALL_SCRIPT override is needed due to a bug in autoconf 2.13 which
defaults to ${INSTALL_PROGRAM} for INSTALL_SCRIPT; the bug has been fixed
in 2.50).
2000-05-31 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* config.make.in (INSTALL_SCRIPT): Defined.
Makeconfig (INSTALL_SCRIPT): Defined.
Makerules (do-install-script): New macro to install scripts using
INSTALL_SCRIPT.
(install-bin-script): New rule to install scripts with
do-install-script.
(install-bin-script-nosubdir): New rule.
(install-no-libc.a-nosubdir): Added install-bin-script-nosubdir.
Makefile (glibcbug): Install with install-bin-script.
debug/Makefile (xtrace): Likewise.
(catchsegv): Likewise.
elf/Makefile (ldd): Likewise.
malloc/Makefile (mtrace): Likewise.
timezone/Makefile (tzselect): Likewise.
Please apply.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
glibc-2.2.3-install_script.patch
diff -up --recursive --new-file glibc-2.2.3.macro/Makeconfig glibc-2.2.3/Makeconfig
--- glibc-2.2.3.macro/Makeconfig Tue Apr 17 15:17:07 2001
+++ glibc-2.2.3/Makeconfig Fri May 25 11:47:31 2001
@@ -322,6 +322,9 @@ endif
ifndef INSTALL_DATA
INSTALL_DATA = $(INSTALL) -m 644
endif
+ifndef INSTALL_SCRIPT
+INSTALL_SCRIPT = $(INSTALL)
+endif
ifndef INSTALL_PROGRAM
INSTALL_PROGRAM = $(INSTALL)
endif
diff -up --recursive --new-file glibc-2.2.3.macro/Makefile glibc-2.2.3/Makefile
--- glibc-2.2.3.macro/Makefile Tue Apr 10 03:03:22 2001
+++ glibc-2.2.3/Makefile Fri May 25 11:55:11 2001
@@ -75,7 +75,7 @@ vpath %.h $(subdir-dirs)
# What to install.
install-others = $(inst_includedir)/gnu/stubs.h
-install-bin = glibcbug
+install-bin-script = glibcbug
ifeq (yes,$(build-shared))
install-others += $(inst_includedir)/gnu/lib-names.h
@@ -84,7 +84,7 @@ endif
include Makerules
ifeq ($(build-programs),yes)
-others: $(addprefix $(objpfx),$(install-bin))
+others: $(addprefix $(objpfx),$(install-bin-script))
endif
# Install from subdirectories too.
diff -up --recursive --new-file glibc-2.2.3.macro/Makerules glibc-2.2.3/Makerules
--- glibc-2.2.3.macro/Makerules Wed Apr 25 21:50:52 2001
+++ glibc-2.2.3/Makerules Fri May 25 14:29:25 2001
@@ -674,10 +674,10 @@ force-install:
# files in $(install-lib) matching `lib%.a' are ranlib'd after installation
# unless they also appear in $(non-lib.a). $(install-data) are installed
# as they are into $(datadir). $(headers) are installed as they are in
-# $(includedir). $(install-bin) and $(install-sbin) are installed from the
-# object directory into $(bindir) and $(sbindir), respectively.
-# $(install-others) are absolute path names of files to install; rules to
-# install them are defined elsewhere.
+# $(includedir). $(install-bin), $(install-bin-script) and $(install-sbin)
+# are installed from the object directory into $(bindir), $(bindir) and
+# $(sbindir), respectively. $(install-others) are absolute path names of
+# files to install; rules to install them are defined elsewhere.
# The simple library name to install libc.a under.
# This could be defined by a sysdep Makefile.
@@ -716,6 +716,12 @@ $(INSTALL_PROGRAM) $< $@.new
mv -f $@.new $@
endef
+define do-install-script
+$(make-target-directory)
+$(INSTALL_SCRIPT) $< $@.new
+mv -f $@.new $@
+endef
+
install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
install-lib := $(filter-out %.so %_pic.a,$(install-lib))
@@ -883,6 +889,11 @@ $(addprefix $(inst_bindir)/,$(install-bi
$(inst_bindir)/%: $(objpfx)% $(+force)
$(do-install-program)
endif
+ifdef install-bin-script
+$(addprefix $(inst_bindir)/,$(install-bin-script)): \
+ $(inst_bindir)/%: $(objpfx)% $(+force)
+ $(do-install-script)
+endif
ifdef install-rootsbin
$(addprefix $(inst_rootsbindir)/,$(install-rootsbin)): \
$(inst_rootsbindir)/%: $(objpfx)% $(+force)
@@ -918,9 +929,11 @@ $(addprefix $(inst_includedir)/,$(header
$(do-install)
endif # headers
-.PHONY: install-bin-nosubdir install-rootsbin-nosubdir install-sbin-nosubdir \
- install-lib-nosubdir install-data-nosubdir install-headers-nosubdir
+.PHONY: install-bin-nosubdir install-bin-script-nosubdir \
+ install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
+ install-data-nosubdir install-headers-nosubdir
install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
+install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
install-rootsbin-nosubdir: \
$(addprefix $(inst_rootsbindir)/,$(install-rootsbin))
install-sbin-nosubdir: $(addprefix $(inst_sbindir)/,$(install-sbin))
@@ -940,9 +953,9 @@ install-%:: install-%-nosubdir ;
.PHONY: install install-no-libc.a-nosubdir
ifeq ($(build-programs),yes)
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
- install-bin-nosubdir install-lib-nosubdir \
- install-others-nosubdir install-rootsbin-nosubdir \
- install-sbin-nosubdir
+ install-bin-nosubdir install-bin-script-nosubdir \
+ install-lib-nosubdir install-others-nosubdir \
+ install-rootsbin-nosubdir install-sbin-nosubdir
else
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
install-lib-nosubdir install-others-nosubdir
diff -up --recursive --new-file glibc-2.2.3.macro/config.make.in glibc-2.2.3/config.make.in
--- glibc-2.2.3.macro/config.make.in Tue Mar 27 04:52:47 2001
+++ glibc-2.2.3/config.make.in Fri May 25 11:47:00 2001
@@ -87,6 +87,7 @@ BISON = @BISON@
# Installation tools.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_INFO = @INSTALL_INFO@
OLD_DEBIAN_INSTALL_INFO = @OLD_DEBIAN_INSTALL_INFO@
diff -up --recursive --new-file glibc-2.2.3.macro/debug/Makefile glibc-2.2.3/debug/Makefile
--- glibc-2.2.3.macro/debug/Makefile Tue Mar 27 04:52:48 2001
+++ glibc-2.2.3/debug/Makefile Fri May 25 14:24:17 2001
@@ -40,14 +40,15 @@ libpcprofile-routines = pcprofile
libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes))
others = pcprofiledump
-install-bin = pcprofiledump xtrace
+install-bin = pcprofiledump
+install-bin-script = xtrace
include ../Makeconfig
distribute += catchsegv.sh xtrace.sh
ifeq ($(elf),yes)
ifeq ($(build-shared),yes)
-install-bin += catchsegv
+install-bin-script += catchsegv
endif
endif
generated = catchsegv xtrace
diff -up --recursive --new-file glibc-2.2.3.macro/elf/Makefile glibc-2.2.3/elf/Makefile
--- glibc-2.2.3.macro/elf/Makefile Tue Mar 27 04:52:49 2001
+++ glibc-2.2.3/elf/Makefile Fri May 25 14:22:51 2001
@@ -73,11 +73,11 @@ ifeq (yes,$(build-shared))
extra-objs = $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os
generated += librtld.os dl-allobjs.os ld.so ldd
install-others = $(inst_slibdir)/$(rtld-installed-name)
-install-bin = ldd
+install-bin-script = ldd
endif
others = sprof sln
-install-bin += sprof
+install-bin = sprof
others-static = sln
install-rootsbin = sln
diff -up --recursive --new-file glibc-2.2.3.macro/malloc/Makefile glibc-2.2.3/malloc/Makefile
--- glibc-2.2.3.macro/malloc/Makefile Mon Apr 9 05:19:10 2001
+++ glibc-2.2.3/malloc/Makefile Fri May 25 14:22:02 2001
@@ -57,7 +57,7 @@ include ../Makeconfig
# The Perl script to analyze the output of the mtrace functions.
ifneq ($(PERL),no)
-install-bin = mtrace
+install-bin-script = mtrace
generated = mtrace
# The Perl script will print addresses and to do this nicely we must know
@@ -75,7 +75,7 @@ endif
ifneq ($(cross-compiling),yes)
# If the gd library is available we build the `memusagestat' program.
ifneq ($(LIBGD),no)
-install-bin += memusagestat memusage
+install-bin = memusagestat memusage
generated += memusagestat memusage
extra-objs += memusagestat.o
endif
diff -up --recursive --new-file glibc-2.2.3.macro/timezone/Makefile glibc-2.2.3/timezone/Makefile
--- glibc-2.2.3.macro/timezone/Makefile Fri Feb 9 18:04:39 2001
+++ glibc-2.2.3/timezone/Makefile Fri May 25 14:22:26 2001
@@ -77,7 +77,7 @@ endif
ifeq ($(have-ksh),yes)
install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
-install-bin += tzselect
+install-bin-script = tzselect
generated += tzselect
endif
More information about the Libc-alpha
mailing list