]> sourceware.org Git - glibc.git/blobdiff - Makefile
Regenerated: autoconf configure.in
[glibc.git] / Makefile
index e85be51cc091a8de1ed1f9375178dca29da52a1e..7ebd3b7bd1cf16a8cdf828df543248e7c09d01af 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,9 @@
 # Library General Public License for more details.
 
 # You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB.  If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB.  If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
 
 #
 #      Master Makefile for the GNU C library
@@ -29,18 +29,20 @@ endif
 all: lib others
 \f
 define autoconf-it
+@-rm -f $@.new
 autoconf $(ACFLAGS) $< > $@.new
+chmod a-w,a+x $@.new
 mv -f $@.new $@
 test ! -d CVS || cvs commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
 endef
 
-configure: configure.in; $(autoconf-it)
-%/configure: %/configure.in; $(autoconf-it)
+configure: configure.in aclocal.m4; $(autoconf-it)
+%/configure: %/configure.in aclocal.m4; $(autoconf-it)
 
 include Makeconfig
 
 ifndef avoid-generated
-include $(objpfx)sysd-dirs
+-include $(objpfx)sysd-dirs
 define \n
 
 
@@ -49,14 +51,14 @@ sysdep-subdirs := $(subst $(\n), ,$(sysdep-subdirs))
 endif
 
 # These are the subdirectories containing the library source.
-subdirs := csu assert ctype locale math setjmp signal stdio stdlib     \
-          malloc string time dirent grp pwd posix io termios resource  \
-          socket misc gnulib $(wildcard crypt) manual                  \
-          $(sysdep-subdirs) elf
+subdirs = csu assert ctype db locale intl catgets math setjmp signal stdlib \
+         stdio-common $(stdio) $(malloc) string wcsmbs time dirent grp pwd \
+         posix io termios resource misc login socket sysvipc gmon gnulib \
+         wctype manual shadow crypt $(sysdep-subdirs) nss elf po $(add-ons)
 export subdirs := $(subdirs)   # Benign, useless in GNU make before 3.63.
 
 # The mach and hurd subdirectories have many generated header files which
-# the much of rest of the library depends on, so it is best to build them
+# much of the rest of the library depends on, so it is best to build them
 # first (and mach before hurd, at that).  The before-compile additions in
 # sysdeps/{mach,hurd}/Makefile should make it reliably work for these files
 # not to exist when making in other directories, but it will be slower that
@@ -74,18 +76,23 @@ subdirs     := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
 +subdir_targets        := subdir_lib objects objs others subdir_mostlyclean    \
                   subdir_clean subdir_distclean subdir_realclean       \
                   tests subdir_lint.out                                \
+                  subdir_distinfo                                      \
                   subdir_echo-headers subdir_echo-distinfo             \
-                  subdir_install $(addprefix install-,                 \
-                                             no-libc.a bin lib         \
-                                             data headers others)
+                  subdir_install                                       \
+                  $(addprefix install-, no-libc.a bin lib data headers others)
 \f
-headers := features.h errno.h sys/errno.h errnos.h limits.h values.h
+headers := errno.h sys/errno.h errnos.h limits.h values.h      \
+          features.h gnu-versions.h libc-lock.h xopen_lim.h
 aux     = sysdep $(libc-init) version
+before-compile = $(objpfx)version-info.h
 
 echo-headers: subdir_echo-headers
 
 # What to install.
 install-others = $(includedir)/stubs.h
+ifeq (yes,$(build-shared))
+install-others += $(includedir)/gnu/lib-names.h
+endif
 
 ifeq (yes,$(gnu-ld))
 libc-init = set-init
@@ -111,16 +118,42 @@ ifeq (yes,$(build-shared))
 lib: $(common-objpfx)libc.so
 endif
 
-$(objpfx)sysd-dirs: $(+sysdir_pfx)config.make
-       (echo define sysdep-subdirs;                                          \
-        for dir in $(sysdirs); do                                            \
-          if [ -r $(sysdep_dir)/$$dir/Subdirs ]; then                        \
-            sed 's/#.*$$//' $(sysdep_dir)/$$dir/Subdirs;                     \
-          else true;                                                         \
-          fi;                                                                \
-        done;                                                                \
+all-Subdirs-files = $(wildcard $(addsuffix /Subdirs, $(config-sysdirs)))
+$(objpfx)sysd-dirs: $(+sysdir_pfx)config.make $(all-Subdirs-files)
+       (echo define sysdep-subdirs;                            \
+        sed 's/#.*$$//' $(all-Subdirs-files) /dev/null;        \
         echo endef) > $@-tmp
-        mv -f $@-tmp $@
+       mv -f $@-tmp $@
+\f
+all-Banner-files = $(wildcard $(addsuffix /Banner, $(subdirs)))
+$(objpfx)version-info.h: $(+sysdir_pfx)config.make $(all-Banner-files)
+       (case $(config-os) in \
+          linux*) version=`(echo -e "#include <linux/version.h>\nUTS_RELEASE"\
+                            | $(CC)  -E -P - | \
+                            sed -e 's/"\([^"]*\)".*/\1/p' -e d) 2>/dev/null`;\
+                  if [ -z "$$version" ]; then \
+                    if [ -r /proc/version ]; then \
+                      version=`sed 's/.*version \([^ ]*\) .*/>>\1<</' \
+                               < /proc/version`; \
+                    else \
+                      version=`uname -r`; \
+                    fi; \
+                  fi; \
+                  echo -n "\"Compiled on a Linux $$version system "; \
+                  echo "on `date +%Y/%m/%d`.\\n\"" ;; \
+          *) ;; \
+        esac; \
+        files="$(all-Banner-files)";                           \
+        if test -n "$$files"; then                             \
+          echo "\"Available extensions:";                      \
+          sed -e '/^#/d' -e 's/^[[:space:]]*/  /' $$files;     \
+          echo "\"";                                           \
+        fi) > $@T
+       mv -f $@T $@
+generated += version-info.h
+
+version.c-objects := $(addprefix $(objpfx)version,$(object-suffixes))
+$(version.c-objects): $(objpfx)version-info.h
 \f
 # Makerules creates a file `stub-$(subdir)' for each subdirectory, which
 # contains `#define __stub_FUNCTION' for each function which is a stub.
@@ -141,9 +174,37 @@ $(includedir)/stubs.h: subdir_install
         echo '   in the C library which is a stub, meaning it will fail';\
         echo '   every time called, usually setting errno to ENOSYS.  */';\
         sort $(subdir-stubs)) > $(objpfx)stubs.h
-       $(INSTALL_DATA) $(objpfx)stubs.h $@
+       if test -r $@ && cmp -s $(objpfx)stubs.h $@; \
+       then echo 'stubs.h unchanged'; \
+       else $(INSTALL_DATA) $(objpfx)stubs.h $@; fi
        rm -f $(objpfx)stubs.h
 \f
+ifeq (yes,$(build-shared))
+
+# Like stubs.h the gnu/lib-names.h header is not used while building the
+# libc itself.  So we generate it while installing.
+$(includedir)/gnu/lib-names.h: $(common-objpfx)soversions.mk
+       @rm -f $(objpfx)lib-names.h
+       (echo '/* This file is automatically generated.';\
+        echo '   It defines macros to allow user program to find the shared';\
+        echo '   library files which come as part of GNU libc.  */';\
+        echo '#ifndef __GNU_LIB_NAMES_H'; \
+        echo '#define __GNU_LIB_NAMES_H        1'; \
+        echo; \
+        (libs='$(all-sonames)';\
+         for l in $$libs; do \
+           upname=`echo $$l | sed 's/[.]so.*//' | \
+                   tr '[:lower:]-' '[:upper:]_'`; \
+           echo "#define       $${upname}_SO   $$l"; \
+         done;) | sort; \
+        echo; \
+        echo '#endif   /* gnu/lib-names.h */';) > $(objpfx)lib-names.h
+       if test -r $@ && cmp -s $(objpfx)lib-names.h $@; \
+       then echo 'gnu/lib-names.h unchanged'; \
+       else $(INSTALL_DATA) $(objpfx)lib-names.h $@; fi
+       rm -f $(objpfx)lib-names.h
+endif
+\f
 # This makes the Info or DVI file of the documentation from the Texinfo source.
 .PHONY: info dvi
 info dvi:
@@ -171,7 +232,9 @@ $(all-subdirs-targets):
 
 # Subroutines of all cleaning targets.
 parent-mostlyclean: common-mostlyclean # common-mostlyclean is in Makerules.
-       -rm -f $(common-objpfx)libc.a $(addprefix $(objpfx),$(install-lib))
+       -rm -f $(foreach o,$(object-suffixes),\
+                  $(common-objpfx)$(patsubst %,$(libtype$o),c)) \
+              $(addprefix $(objpfx),$(install-lib))
 parent-clean: parent-mostlyclean common-clean
        -rm -f $(addprefix $(common-objpfx),$(common-generated))
        -rm -f $(addprefix $(objpfx),sysd-Makefile sysd-dirs sysd-rules)
@@ -197,8 +260,8 @@ realclean distclean: parent-clean
 # Subroutine of distclean and realclean.
 distclean-1: subdir_$(distclean-1)
        -rm -f $(config-generated)
-       -rm -f $(addprefix $(objpfx),config.status cache.cache)
-       -rm -f $(addprefix $(objpfx),config.make config-name.h)
+       -rm -f $(addprefix $(objpfx),config.status config.cache config.log)
+       -rm -f $(addprefix $(objpfx),config.make config-name.h config.h)
 ifdef objdir
        -rm -f $(objpfx)Makefile
 endif
@@ -212,20 +275,23 @@ echo-distinfo: parent_echo-distinfo subdir_echo-distinfo
 parent_echo-distinfo:
        @echo $(addprefix +header+,$(headers)) \
              $(addprefix +nodist+,$(generated))
+
 \f
 # Make the distribution tarfile.
 
-distribute  := README INSTALL NOTES COPYING.LIB COPYING NEWS           \
-              ChangeLog ChangeLog.[0-9]                                \
+distribute  := README INSTALL FAQ NOTES NEWS PROJECTS                  \
+              COPYING.LIB COPYING ChangeLog ChangeLog.[0-9]            \
               Makefile Makeconfig Makerules Rules Make-dist MakeTAGS   \
               extra-lib.mk o-iterator.mk                               \
               ansidecl.h mkinstalldirs move-if-change install-sh       \
               configure configure.in aclocal.m4 config.sub config.guess\
-              config.make.in config-name.in Makefile.in                \
-              munch-tmpl.c munch.awk sysdep.h set-hooks.h libc-symbols.h
+              config.h.in config.make.in config-name.in Makefile.in    \
+              autolock.sh rellns-sh munch-tmpl.c munch.awk interp.c    \
+              sysdep.h set-hooks.h libc-symbols.h version.h shlib-versions \
+              rpm/Makefile rpm/template rpm/rpmrc nsswitch.h netgroup.h
 
 distribute := $(strip $(distribute))
-generated := $(generated) stubs.h
+generated := $(generated) stubs.h version-info.h
 
 README: README.template version.c ; # Make-dist should update README.
 
@@ -236,3 +302,6 @@ makeinfo --no-validate --no-warn --no-headers $< -o $@
 endef
 INSTALL: manual/maint.texi; $(format-me)
 NOTES: manual/creature.texi; $(format-me)
+
+rpm/%: subdir_distinfo
+       $(MAKE) -C $(@D) subdirs='$(subdirs)' $(@F)
This page took 0.033703 seconds and 5 git commands to generate.