This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

`make install-headers': a proposal


Hello,

 I am working in a glibc-based cross-compiling environment recently.  To
make bootstrapping of gcc easier I prepared the following patch.  It's
intent is to allow installing all needed headers that can be generated
without an assistance from special tools (which means `rpcgen' at the
moment).  Using this patch I am now able to run `make cross-compiling=yes
install-headers' to put all such headers in place.  Otherwise some headers
are missing. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

diff -u --recursive --new-file glibc.macro/Makefile glibc/Makefile
--- glibc.macro/Makefile	Wed Apr 19 02:26:15 2000
+++ glibc/Makefile	Sat May 27 16:35:55 2000
@@ -71,11 +71,11 @@
 vpath %.h $(subdir-dirs)
 
 # What to install.
-install-others = $(inst_includedir)/gnu/stubs.h
+install-headers-nosubdir: $(inst_includedir)/gnu/stubs.h
 install-bin = glibcbug
 
 ifeq (yes,$(build-shared))
-install-others += $(inst_includedir)/gnu/lib-names.h
+headers += gnu/lib-names.h
 endif
 
 include Makerules
@@ -84,6 +84,8 @@
 others: $(addprefix $(objpfx),$(install-bin))
 endif
 
+install-headers: install-headers-nosubdir
+
 # Install from subdirectories too.
 install: subdir_install
 
@@ -139,7 +141,7 @@
 # iterates over all the subdirs; subdir_install in each subdir depends on
 # the subdir's stubs file.  Having more direct dependencies would result in
 # extra iterations over the list for subdirs and many recursive makes.
-$(inst_includedir)/gnu/stubs.h: subdir_install
+$(inst_includedir)/gnu/stubs.h: $(addsuffix /install-headers,$(subdirs))
 	$(make-target-directory)
 	@rm -f $(objpfx)stubs.h
 	(echo '/* This file is automatically generated.';\
@@ -151,12 +153,6 @@
 	then echo 'stubs.h unchanged'; \
 	else $(INSTALL_DATA) $(objpfx)stubs.h $@; fi
 	rm -f $(objpfx)stubs.h
-
-ifeq (yes,$(build-shared))
-
-$(inst_includedir)/gnu/lib-names.h: $(common-objpfx)gnu/lib-names.h $(+force)
-	$(do-install)
-endif
 
 # The `glibcbug' script contains the version number and it shall be rebuild
 # whenever this changes or the `glibcbug.in' file.
diff -u --recursive --new-file glibc.macro/Makerules glibc/Makerules
--- glibc.macro/Makerules	Sat Apr 29 02:26:00 2000
+++ glibc/Makerules	Sat May 27 16:35:55 2000
@@ -867,7 +867,7 @@
 		       $(patsubst lib%.a,lib$(libprefix)%.a,$(install-lib.a)) \
 		       $(addprefix $(libprefix),$(install-lib-non.a)))
 install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
-install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
+install-headers-nosubdir: stubs $(addprefix $(inst_includedir)/,$(headers))
 install-others-nosubdir: $(install-others)
 
 # We need all the `-nosubdir' targets so that `install' in the parent
diff -u --recursive --new-file glibc.macro/manual/Makefile glibc/manual/Makefile
--- glibc.macro/manual/Makefile	Mon Apr 24 02:26:37 2000
+++ glibc/manual/Makefile	Sat May 27 16:35:58 2000
@@ -170,7 +170,7 @@
 	-rm -f libc.log libc.aux libc.toc dir-add.texinfo
 	-rm -f top-menu.texi chapters.texi
 
-.PHONY: install subdir_install installdirs install-data
+.PHONY: install subdir_install installdirs install-data install-headers install-headers-nosubdir
 install-data subdir_install: install
 ifneq ($(strip $(MAKEINFO)),:)
 # There are two variants of install-info out there.  The GNU version
@@ -195,6 +195,8 @@
 	else : ; fi
 endif
 endif
+install-headers: install-headers-nosubdir
+install-headers-nosubdir: stubs
 # Catchall implicit rule for other installation targets from the parent.
 install-%: ;
 
diff -u --recursive --new-file glibc.macro/stdio-common/Makefile glibc/stdio-common/Makefile
--- glibc.macro/stdio-common/Makefile	Wed Mar 29 02:26:03 2000
+++ glibc/stdio-common/Makefile	Sat May 27 16:35:58 2000
@@ -42,7 +42,7 @@
 routines += vfwprintf vfwscanf
 endif
 
-install-others := $(inst_includedir)/bits/stdio_lim.h
+install-headers-nosubdir: $(inst_includedir)/bits/stdio_lim.h
 
 aux	:= errlist siglist
 distribute := _itoa.h _itowa.h _i18n_itoa.h _i18n_itowa.h \
diff -u --recursive --new-file glibc.macro/sysdeps/unix/sysv/linux/Makefile glibc/sysdeps/unix/sysv/linux/Makefile
--- glibc.macro/sysdeps/unix/sysv/linux/Makefile	Sat Mar 25 03:26:12 2000
+++ glibc/sysdeps/unix/sysv/linux/Makefile	Sat May 27 16:35:58 2000
@@ -23,7 +23,7 @@
 		  scsi/sg.h scsi/scsi.h scsi/scsi_ioctl.h sys/pci.h \
 		  sys/ultrasound.h sys/sendfile.h sys/raw.h
 
-install-others += $(inst_includedir)/bits/syscall.h
+install-headers-nosubdir: $(inst_includedir)/bits/syscall.h
 
 # Generate the list of SYS_* macros for the system calls (__NR_* macros).
 $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]