]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Thu Jun 6 00:02:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Thu, 6 Jun 1996 04:54:33 +0000 (04:54 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 6 Jun 1996 04:54:33 +0000 (04:54 +0000)
* locale/Makefile: Add vpath for %.gperf to programs.

* Make-dist (+tsrcs): Variable removed.
(dist): Process $^ here instead of using $(+tsrcs).

* sysdeps/unix/sysv/linux/Makefile (install-others): Don't set.
($(includedir)/sys/syscall.h): Target removed.
(sysdep_headers): Add syscall-list.h.
($(objpfx)syscall-%.[dh]): New rule to build syscall-list.[dh].
(generated): Add those.
* sysdeps/unix/sysv/linux/syscall.h: Include <syscall-list.h>.

* misc/sys/syscall.h: New file.
* misc/Makefile (headers): Add sys/syscall.h.

* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.

ChangeLog
Make-dist
locale/Makefile
misc/Makefile
misc/sys/syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/syscall.h

index c85d42797063f8356d7314a73dc239455c9d139a..5fc091b568b0b958cbff0d1b50718d71dc2a085d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
+Thu Jun  6 00:02:15 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
+
+       * locale/Makefile: Add vpath for %.gperf to programs.
+
+       * Make-dist (+tsrcs): Variable removed.
+       (dist): Process $^ here instead of using $(+tsrcs).
+
+       * sysdeps/unix/sysv/linux/Makefile (install-others): Don't set.
+       ($(includedir)/sys/syscall.h): Target removed.
+       (sysdep_headers): Add syscall-list.h.
+       ($(objpfx)syscall-%.[dh]): New rule to build syscall-list.[dh].
+       (generated): Add those.
+       * sysdeps/unix/sysv/linux/syscall.h: Include <syscall-list.h>.
+
 Wed Jun  5 15:57:28 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
 
+       * misc/sys/syscall.h: New file.
+       * misc/Makefile (headers): Add sys/syscall.h.
+
        * time/tzfile.h, time/private.h, time/zdump.c, time/zic.c,
        time/africa, time/asia, time/australasia, time/europe,
        time/northamerica, time/southamerica: Updated from ADO 96h.
@@ -11,6 +28,7 @@ Wed Jun  5 15:57:28 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
        * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Append to
        this instead of $(headers).
        * sysdeps/unix/sysv/linux/alpha/Makefile: Likewise.
+       * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
 
        * Make-dist [subdirs-dirs]: Don't prefix $(subdir-dirs) with
        $(subdir); we are already there.
index f0c1620654e4f76f50a47997e7d94c7c65ce74a3..3f5a0e318379906fa8198f1384517fef9c07dd22 100644 (file)
--- a/Make-dist
+++ b/Make-dist
@@ -135,7 +135,6 @@ foo:=$(shell echo subdir foo >&2)
          $(wildcard $(addsuffix .input,$(tests))       \
          $(addsuffix .args,$(tests)))
 +tardeps := $(strip $(+tsrcs))
-+tsrcs := $(addprefix $(tardir)/$(subdir)/,$(+tardeps))
 
 verbose = v
 
@@ -143,7 +142,8 @@ verbose = v
 dist: $(..)$(tardir) $(+tardeps)
        @cd ..; if test -f dist.tar; then c=u; else c=c; fi;    \
        $(+cmdecho) "cd ..; tar $${c}h$(verbose)f dist.tar ...";        \
-       tar $${c}h$(verbose)f dist.tar $(+tsrcs)
+       tar $${c}h$(verbose)f dist.tar \
+           $(addprefix $(tardir)/$(subdir)/,$(filter-out $<,$^))
 
 else   # Parent makefile.
 
index 5038519341c84f9ef1e9857939ccdefe0e25f25a..0eea6442dffb15f488e089e5f650b70ece9eeaf7 100644 (file)
@@ -40,6 +40,7 @@ extra-objs    = $(localedef-modules:=.o) $(locale-modules:=.o) \
 subdir-dirs    = programs
 vpath %.c programs
 vpath %.h programs
+vpath %.gperf programs
 
 localedef-modules      := $(categories:%=ld-%) charmap charset linereader \
                           locfile stringtrans
index eeb5191cc134c8b5a9e502fc44edb2e88bdfe8f8..af5bd4c8ff57b0f1392798f6f420a6ef1e53d4ad 100644 (file)
@@ -25,9 +25,9 @@ subdir        := misc
 headers        := sys/uio.h iovec.h sys/ioctl.h ioctls.h ioctl-types.h \
           sys/ptrace.h sys/file.h \
           a.out.h nlist.h stab.h stab.def sgtty.h sys/dir.h sys/cdefs.h \
-          ttyent.h syscall.h syslog.h sys/syslog.h paths.h sys/reboot.h \
+          ttyent.h syslog.h sys/syslog.h paths.h sys/reboot.h \
           sys/mman.h sys/param.h fstab.h mntent.h search.h err.h error.h\
-          sys/queue.h sysexits.h
+          sys/queue.h sysexits.h syscall.h sys/syscall.h
 
 routines := brk sbrk sstk ioctl \
            readv writev \
diff --git a/misc/sys/syscall.h b/misc/sys/syscall.h
new file mode 100644 (file)
index 0000000..27ba378
--- /dev/null
@@ -0,0 +1 @@
+#include <syscall.h>
index ec5119e40841818ed4828aead903ba141296383d..8d351c404613edb6c97ff3fc7c65f7eb61b5c019 100644 (file)
@@ -18,29 +18,24 @@ ifeq ($(subdir), misc)
 sysdep_routines += mount umount xmknod s_ptrace s_sysctl sysctl llseek \
 setfsgid setfsuid sysinfo uselib s_reboot
 
-sysdep_headers += sys/mount.h sys/sysinfo.h sys/acct.h sys/sysctl.h sys/module.h \
-       sys/io.h sys/klog.h sys/kdaemon.h
-
-install-others += $(includedir)/sys/syscall.h
-
-$(includedir)/sys/syscall.h::
-       @rm -f $(objpfx)syscall.h $(objpfx)syscall.sed
-       @(os=`uname -sr`; \
-         echo -e '1i\\\n#ifndef _SYS_SYSCALL_H\\'; \
-         echo -e '#define _SYS_SYSCALL_H\t1\\\n\\'; \
-         echo -e -n '/* This file is automatically generated as part of '; \
-         echo -e 'GNU libc-$(version)\\'; \
-         echo -e "   on a system running $$os.  */\\"; echo; \
-         echo -e -n 's/#define __NR_\\([A-Za-z0-9_]*\\)[ \t]*__NR_\\(.*\\)/';\
-         echo -e '#define SYS_\\1 SYS_\\2/p'; \
-         echo -e -n 's/#define __NR_\\([A-Za-z0-9_]*\\)[ \t]*\\(.*\\)/';\
-         echo -e '#define SYS_\\1 \\2/p'; \
-         echo -e '$$i\\\n\\\n#endif\t/* sys/syscall.h */\nd') \
-           >  $(objpfx)syscall.sed
-       set -- `echo '#include <asm/unistd.h>'|$(CC) -M -E -`; \
-       sed -f $(objpfx)syscall.sed $$2 > $(objpfx)syscall.h
-       $(INSTALL_DATA) $(objpfx)syscall.h $@
-       rm -f $(objpfx)syscall.h $(objpfx)syscall.sed
+sysdep_headers += sys/mount.h sys/sysinfo.h sys/acct.h sys/sysctl.h \
+                 sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
+                 syscall-list.h
+
+# Generate the list of SYS_* macros for the system calls (__NR_* macros).
+$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/syscall.h
+       rm -f $(@:.h=.d)
+       echo > $(@:.d=.h).new \
+            '/* Generated at libc build time from kernel syscall list.  */'
+       SUNPRO_DEPENDENCIES='$(@:.h=.d) $(patsubst $(objpfx)%,$$(objpfx)%,\
+                            $(@:.h=.d))' \
+       $(CC) -E -x c $< -D_LIBC -dM | \
+       sed -n >> $(@:.d=.h).new \
+             's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'
+       mv -f $(@:.d=.h).new $(@:.d=.h)
+# Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
+-include $(objpfx)syscall-list.d
+generated += syscall-list.h syscall-list.d
 endif
 
 ifeq ($(subdir), time)
index 62fca57d70da3645444c9ea61cfb0174e4113397..1fbda4c56e6a7a93b8749ba8739d25ff73751a60 100644 (file)
@@ -24,4 +24,12 @@ Cambridge, MA 02139, USA.  */
    from the kernel sources.  */
 #include <asm/unistd.h>
 
+#ifndef _LIBC
+/* The Linux kernel header file defines macros `__NR_<name>', but some
+   programs expect the traditional form `SYS_<name>'.  So in building libc
+   we scan the kernel's list and produce <syscall-list.h> with macros for
+   all the `SYS_' names.  */
+#include <syscall-list.h>
+#endif
+
 #endif