[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glibc 2.2.[34]: `make install' fixes
From: |
Maciej W. Rozycki |
Subject: |
Re: glibc 2.2.[34]: `make install' fixes |
Date: |
Tue, 28 Aug 2001 18:39:15 +0200 (MET DST) |
On 23 Aug 2001, Ulrich Drepper wrote:
> The patch breaks the build. The script mtrace is used in 'make check'
> and isn't generated. If you fix this I'll add the patch.
The following patch should fix the problem -- I missed the "others" goal
in Rules. Additionally I discovered "distinfo-vars" in Makerules should
include "install-bin-script" as well.
2001-08-25 Maciej W. Rozycki <address@hidden>
* config.make.in (INSTALL_SCRIPT): Define.
Makeconfig (INSTALL_SCRIPT): Define.
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): Add install-bin-script-nosubdir.
(distinfo-vars): Add $(install-bin-script).
Rules (others): Likewise.
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.
Hopefully this covers all changes needed -- I checked both a build and
`make check' (to some extent, since it failed in unrelated areas) as well
as grepped all the files for "install-bin" and "install-". The patch
applies to a current snapshot as well as to 2.2.4 as released cleanly.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: address@hidden, PGP key available +
glibc-2.2.4-install_script.patch
diff -up --recursive --new-file glibc-2.2.4.macro/Makeconfig
glibc-2.2.4/Makeconfig
--- glibc-2.2.4.macro/Makeconfig Mon Jul 23 17:53:35 2001
+++ glibc-2.2.4/Makeconfig Sat Aug 25 18:26:44 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.4.macro/Makefile glibc-2.2.4/Makefile
--- glibc-2.2.4.macro/Makefile Mon Jul 23 17:53:35 2001
+++ glibc-2.2.4/Makefile Sat Aug 25 18:26:44 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.4.macro/Makerules
glibc-2.2.4/Makerules
--- glibc-2.2.4.macro/Makerules Mon Jul 23 17:53:35 2001
+++ glibc-2.2.4/Makerules Sat Aug 25 18:27:20 2001
@@ -720,10 +720,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.
@@ -762,6 +762,12 @@ $(INSTALL_PROGRAM) $< address@hidden
mv -f address@hidden $@
endef
+define do-install-script
+$(make-target-directory)
+$(INSTALL_SCRIPT) $< address@hidden
+mv -f address@hidden $@
+endef
+
install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
install-lib := $(filter-out %.so %_pic.a,$(install-lib))
@@ -929,6 +935,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)
@@ -964,9 +975,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))
@@ -986,9 +999,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
@@ -1120,7 +1133,7 @@ $(foreach var,subdir-dirs sources elided
headers sysdep_headers distribute dont_distribute generated \
others tests test-srcs extra-libs $(extra-libs:%=%-routines) \
versioned \
- $(addprefix install-,lib lib.so data bin sbin others),
+ $(addprefix install-,lib lib.so data bin bin-script sbin others),
echo >> address@hidden '$(subdir)-$(var) := $($(var))'
echo >> address@hidden '$(var) = $$($(subdir)-$(var))')
endef
diff -up --recursive --new-file glibc-2.2.4.macro/Rules glibc-2.2.4/Rules
--- glibc-2.2.4.macro/Rules Mon Jul 23 17:53:35 2001
+++ glibc-2.2.4/Rules Sat Aug 25 16:40:25 2001
@@ -41,7 +41,8 @@ all: objs lib others
ifeq ($(build-programs),yes)
others: $(addprefix $(objpfx),$(extra-objs) \
- $(install-lib) $(install-bin) \
+ $(install-lib) \
+ $(install-bin) $(install-bin-script) \
$(install-rootsbin) $(install-sbin))
else
others: $(addprefix $(objpfx),$(extra-objs) \
diff -up --recursive --new-file glibc-2.2.4.macro/config.make.in
glibc-2.2.4/config.make.in
--- glibc-2.2.4.macro/config.make.in Mon Jul 23 17:53:35 2001
+++ glibc-2.2.4/config.make.in Sat Aug 25 18:26:44 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.4.macro/debug/Makefile
glibc-2.2.4/debug/Makefile
--- glibc-2.2.4.macro/debug/Makefile Mon Jul 23 17:53:38 2001
+++ glibc-2.2.4/debug/Makefile Sat Aug 25 18:26:44 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.4.macro/elf/Makefile
glibc-2.2.4/elf/Makefile
--- glibc-2.2.4.macro/elf/Makefile Sat Jul 28 06:13:13 2001
+++ glibc-2.2.4/elf/Makefile Sat Aug 25 18:26:44 2001
@@ -76,11 +76,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.4.macro/malloc/Makefile
glibc-2.2.4/malloc/Makefile
--- glibc-2.2.4.macro/malloc/Makefile Mon Jul 23 17:54:38 2001
+++ glibc-2.2.4/malloc/Makefile Sat Aug 25 18:26:44 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.4.macro/timezone/Makefile
glibc-2.2.4/timezone/Makefile
--- glibc-2.2.4.macro/timezone/Makefile Mon Jul 23 17:58:05 2001
+++ glibc-2.2.4/timezone/Makefile Sat Aug 25 18:26:44 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