This is the mail archive of the libc-hacker@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]

Subdirs


Hi,

Something I'm working on at the moment is adapting the libc to better suit 
embedded applications where code space can be at a premium.  Here is a patch I 
made to allow sysdeps/../Subdirs files to exclude some of the default 
directories as well as add new ones (by using lines consisting of directory 
names prefixed by minus signs).  Does anybody see a problem with it? 

p.

1998-10-12  Philip Blundell  <pb@nexus.co.uk>

	* Makeconfig (sysdep-subdirs): Allow Subdirs files to remove
	directories as well as add them.

Index: gnu/libc/Makeconfig
diff -u gnu/libc/Makeconfig:1.23 gnu/libc/Makeconfig:1.23.4.1
--- gnu/libc/Makeconfig:1.23	Thu Oct  1 13:21:59 1998
+++ gnu/libc/Makeconfig	Tue Oct  6 15:47:47 1998
@@ -745,6 +745,7 @@
 
 endef
 sysdep-subdirs := $(subst $(\n), ,$(sysdep-subdirs))
+sysdep-inhibit-subdirs := $(subst $(\n), ,$(sysdep-inhibit-subdirs))
 endif
 
 # These are the subdirectories containing the library source.
@@ -754,6 +755,7 @@
 	      gnulib iconv iconvdata wctype manual shadow md5-crypt po argp \
 	      $(add-ons) nss localedata timezone rt debug $(sysdep-subdirs) \
 	      $(binfmt-subdir)
+all-subdirs := $(filter-out $(sysdep-inhibit-subdirs),$(all-subdirs))
 subdirs = $(all-subdirs)
 
 # The mach and hurd subdirectories have many generated header files which
@@ -767,10 +769,13 @@
 
 all-Subdirs-files = $(wildcard $(config-sysdirs:%=$(..)%/Subdirs))
 $(common-objpfx)sysd-dirs: $(common-objpfx)config.make $(all-Subdirs-files)
-	(echo define sysdep-subdirs;				\
-	 sed 's/#.*$$//' $(all-Subdirs-files) /dev/null;	\
-	 echo endef;						\
-	 echo 'sysd-dirs-done = t';				\
+	(echo define sysdep-subdirs;					\
+	 sed 's/[#-].*$$//' $(all-Subdirs-files) /dev/null;		\
+	 echo endef;							\
+	 echo define sysdep-inhibit-subdirs;				\
+	 sed '/-.*$$/!d;s/^-//' $(all-Subdirs-files) /dev/null;	\
+	 echo endef;							\
+	 echo 'sysd-dirs-done = t';					\
 	) > $@-tmp
 	mv -f $@-tmp $@
 




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