Sun Jun 16 02:44:22 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Sun, 16 Jun 1996 06:52:32 +0000 (06:52 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 16 Jun 1996 06:52:32 +0000 (06:52 +0000)
* rpm/template: New file.
* rpm/Makefile: New file.

* Makeconfig (sysdep-configures): Remove empty variable.

* Makerules (distinfo-vars): Write defns for $(install-lib.so) and
$(versioned).

* manual/Makefile (subdir_%): Add new rule with no deps, secondary to
to rule w/dep on %, with no-op commands.

* Makerules (subdir_distinfo): New phony target; depend on distinfo.
* Makefile (rpm/%): New rule.
(+subdir_targets): Add subdir_distinfo.

* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Don't add
  fpu_control.h here.

ChangeLog
Makeconfig
Makefile
Makerules
manual/Makefile
rpm/Makefile [new file with mode: 0644]
rpm/template [new file with mode: 0644]
sysdeps/unix/sysv/linux/Makefile

index bdb6369..d5c1a48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
+Sun Jun 16 02:44:22 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
+
+       * rpm/template: New file.
+       * rpm/Makefile: New file.
+
+       * Makeconfig (sysdep-configures): Remove empty variable.
+
+       * Makerules (distinfo-vars): Write defns for $(install-lib.so) and
+       $(versioned).
+
+       * manual/Makefile (subdir_%): Add new rule with no deps, secondary to
+       to rule w/dep on %, with no-op commands.
+
+       * Makerules (subdir_distinfo): New phony target; depend on distinfo.
+       * Makefile (rpm/%): New rule.
+       (+subdir_targets): Add subdir_distinfo.
+
 Sun Jun 16 00:40:20 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
 
+       * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Don't add
+       fpu_control.h here.
+
        * time/Makefile ($(installed-localtime-file)): If target exists, do
        nothing but print a message; if not, make it an absolute symlink.
 
index afbb31f..a254e9d 100644 (file)
@@ -90,8 +90,6 @@ include $(common-objpfx)config.make
 $(common-objpfx)config.make: $(common-objpfx)config.status $(..)config.h.in
        cd $(<D); $(SHELL) $(<F)
 
-sysdep-configures = \
-
 # Find all the sysdeps configure fragments, to make sure we re-run
 # configure when any of them changes.
 $(common-objpfx)config.status: $(..)configure \
index fb1656e..39c812c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -76,6 +76,7 @@ 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         \
@@ -219,6 +220,7 @@ echo-distinfo: parent_echo-distinfo subdir_echo-distinfo
 parent_echo-distinfo:
        @echo $(addprefix +header+,$(headers)) \
              $(addprefix +nodist+,$(generated))
+
 \f
 # Make the distribution tarfile.
 
@@ -244,3 +246,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)
index cdb1bcb..f73bec7 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -810,13 +810,16 @@ dist: $(filter-out %.c %.S %.s,$(distribute))
 distinfo: Makefile $(..)Makerules
        $(distinfo-vars)
        mv -f $@.new $@
+.PHONY: subdir_distinfo
+subdir_distinfo: distinfo
 
 define distinfo-vars
 rm -f $@.new
 $(foreach var,subdir subdir-dirs sources elided-routines sysdep_routines \
              headers sysdep_headers distribute dont_distribute generated \
              others tests extra-libs $(extra-libs:%=%-routines) \
-             $(addprefix install-,lib data bin sbin others),
+             versioned \
+             $(addprefix install-,lib lib.so data bin sbin others),
 echo >> $@.new '$(subdir)-$(var) := $($(var))'
 echo >> $@.new '$(var) = $$($(subdir)-$(var))')
 endef
index 54a3a46..7197ecf 100644 (file)
@@ -107,6 +107,8 @@ glibc-doc-$(edition).tar: $(doc-only-dist) $(distribute)
 
 # The parent makefile sometimes invokes us with targets `subdir_REAL-TARGET'.
 subdir_%: % ;
+# For targets we don't define, do nothing.
+subdir_%: ;
 
 .PHONY: mostlyclean distclean realclean clean
 mostlyclean:
diff --git a/rpm/Makefile b/rpm/Makefile
new file mode 100644 (file)
index 0000000..a4e7969
--- /dev/null
@@ -0,0 +1,67 @@
+# A start at automated rpm-making for GNU libc.
+# Generates an rpm spec file in `CPU-VENDOR-OS' from the list of installed
+# files and the `template' file.
+
+all:
+
+subdir := rpm
+include ../Makeconfig
+include $(common-objpfx)soversions.mk
+include $(common-objpfx)version.mk
+
+distinfo := $(wildcard $(subdirs:%=../%/distinfo))
+-include $(distinfo)
+
+config = $(config-machine)-$(config-vendor)-$(config-os)
+
+headers := $(foreach d,$(subdirs),$($d-headers))
+install-lib := $(foreach d,$(subdirs),$($d-install-lib))
+install-lib.so := $(foreach d,$(subdirs),$(filter-out $($d-versioned),\
+                                                     $($d-install-lib.so)))
+versioned := $(foreach d,$(subdirs),$($d-versioned))
+install-bin := $(foreach d,$(subdirs),$($d-install-bin))
+install-sbin := $(foreach d,$(subdirs),$($d-install-sbin))
+install-data := $(foreach d,$(subdirs),$($d-install-data))
+install-others := $(foreach d,$(subdirs),$($d-install-others))
+
+# Notice things to be installed in /etc.  They get specially marked as
+# possibly user-modified config files.
+install-sysconf := $(filter $(sysconfdir)/%,$(install-others))
+install-others := $(filter-out $(sysconfdir)/%,$(install-others))
+
+# Add the unversioned lib*.so's to install-lib.
+install-lib += $(install-lib.so)
+
+# For each versioned lib*.so, add three files:
+#   lib*-VERSION.so, lib*.so.MAJOR, and lib*.so
+install-lib += $(foreach lib,$(versioned),\
+                        $(patsubst %.so,%-$(version).so,$(lib)) \
+                        $(lib)$($(lib)-version) $(lib))
+
+# Add libc.so itself, which is a special case in Makerules.
+install-others += $(slibdir)/libc.so
+ifdef libc.so-version
+install-others += $(slibdir)/libc-$(version).so \
+                 $(slibdir)/libc.so$(libc.so-version)
+endif
+\f
+
+glibc-$(version).$(config).rpm: $(config)
+
+all: $(config)
+
+$(config): template $(distinfo) Makefile
+       rm -f $@.new
+       (sed -e 's%@VERSION@%$(version)%g' $<; \
+        ($(foreach var,include lib bin sbin data others,\
+         for f in $(install-$(var)); do \
+           echo $(filter-out /,$($(var)dir)/)$$f; \
+         done;\
+        )) | sort; \
+        (for f in $(install-sysconf); do \
+           echo %config $$f; \
+         done) | sort) > $@.new
+       mv -f $@.new $@
+
+install-include = $(headers)
+
diff --git a/rpm/template b/rpm/template
new file mode 100644 (file)
index 0000000..3d88336
--- /dev/null
@@ -0,0 +1,8 @@
+Name: glibc
+Description: GNU libc
+Group: Development/Libraries/Libc
+Version: @VERSION@
+Release: 1
+Copyright: LGPL, GPL
+
+%files
index 8d351c4..a14f84c 100644 (file)
@@ -1,7 +1,6 @@
 ifeq ($(subdir), math)
 sysdep_routines += setfpucw
 extra-objs += ieee-fpucw.o
-sysdep_headers += fpu_control.h
 install-lib += libieee.a
 non-lib.a += libieee.a