mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-11 10:33:33 +08:00
478b92f03a
1997-06-23 23:39 Ulrich Drepper <drepper@cygnus.com> * string/Makefile (headers): Change bytesex.h to bits/endian.h. * sysdeps/generic/Makefile: Don't try to generate bytesex.h, but bits/endian.h. * math/libm-test.c (lgamma_test): Make sure the test of the ilogb function will not fail because of exceptions. * math/math.h: Add warning about use of M_* constants. Pretty print. 1997-06-23 11:36 Andreas Jaeger <aj@arthur.rhein-neckar.de> * hurd/path-lookup.c: Change GPL to LGPL, update and reformat copyright, remove trailing white spaces and send through unexpand. * inet/netinet/icmp6.h: Likewise. * inet/netinet/in.h: Likewise. * inet/netinet/ip6.h: Likewise. * locale/programs/xmalloc.c: Likewise. * locale/programs/xstrdup.c: Likewise. * sysdeps/generic/make_siglist.c: Likewise. * sysdeps/generic/morecore.c: Likewise. * sysdeps/generic/sbrk.c: Likewise. * sysdeps/generic/signame.c: Likewise. * sysdeps/generic/signame.h: Likewise. * sysdeps/generic/netinet/inbits.h: Likewise. * sysdeps/posix/getpagesize.c: Likewise. * sysdeps/unix/errnos-tmpl.c: Likewise. * sysdeps/unix/getpagesize.c: Likewise. * sysdeps/unix/make_errlist.c: Likewise. * sysdeps/unix/mkfifo.c: Likewise. * sysdeps/unix/nlist.c: Likewise. * sysdeps/unix/start.c: Likewise. * sysdeps/unix/sysv/linux/netinet/inbits.h: Likewise. * munch-tmpl.c: Update and reformat copyright, remove trailing white spaces and send through unexpand. * libio/clearerr_u.c: Likewise. * libio/memstream.c: Likewise. * libio/putc_u.c: Likewise. * libio/putchar_u.c: Likewise. * stdio-common/scanf.c: Likewise. * stdlib/longlong.h: Likewise. * sysdeps/alpha/__longjmp.c: Likewise. * sysdeps/alpha/divrem.h: Likewise. * sysdeps/alpha/machine-gmon.h: Likewise. * sysdeps/alpha/setjmp_aux.c: Likewise. * sysdeps/alpha/bits/setjmp.h: Likewise. * sysdeps/arm/fpu_control.h: Likewise. * sysdeps/generic/_strerror.c: Likewise. * sysdeps/generic/det_endian.c: Likewise. * sysdeps/generic/fdatasync.c: Likewise. * sysdeps/generic/fpu_control.c: Likewise. * sysdeps/generic/ftime.c: Likewise. * sysdeps/generic/getdomain.c: Likewise. * sysdeps/generic/group_member.c: Likewise. * sysdeps/generic/ldiv.c: Likewise. * sysdeps/generic/lldiv.c: Likewise. * sysdeps/generic/lxstat.c: Likewise. * sysdeps/generic/memcmp.c: Likewise. * sysdeps/generic/memmem.c: Likewise. * sysdeps/generic/mig-reply.c: Likewise. * sysdeps/generic/pagecopy.h: Likewise. * sysdeps/generic/profil-counter.h: Likewise. * sysdeps/generic/pselect.c: Likewise. * sysdeps/generic/setfpucw.c: Likewise. * sysdeps/generic/stpcpy.c: Likewise. * sysdeps/generic/uname.c: Likewise. * sysdeps/generic/varargs.h: Likewise. * sysdeps/generic/vlimit.c: Likewise. * sysdeps/generic/bits/sigaction.h: Likewise. * sysdeps/generic/bits/ustat.h: Likewise. * sysdeps/generic/netinet/if_ether.h: Likewise. * sysdeps/generic/sys/swap.h: Likewise. * sysdeps/generic/sys/sysinfo.h: Likewise. * sysdeps/i386/init-first.c: Likewise. * sysdeps/i386/ldbl2mpn.c: Likewise. * sysdeps/i386/memcopy.h: Likewise. * sysdeps/i386/i586/memcopy.h: Likewise. * sysdeps/i860/memcopy.h: Likewise. * sysdeps/m68k/__longjmp.c: Likewise. * sysdeps/m68k/fpu_control.h: Likewise. * sysdeps/m68k/memcopy.h: Likewise. * sysdeps/m68k/s_isinfl.c: Likewise. * sysdeps/m68k/s_isnanl.c: Likewise. * sysdeps/m68k/setjmp.c: Likewise. * sysdeps/mach/_strerror.c: Likewise. * sysdeps/mach/getsysstats.c: Likewise. * sysdeps/mach/mprotect.c: Likewise. * sysdeps/mach/munmap.c: Likewise. * sysdeps/mach/pagecopy.h: Likewise. * sysdeps/mach/start.c: Likewise. * sysdeps/mach/sysdep.h: Likewise. * sysdeps/mach/alpha/machine-lock.h: Likewise. * sysdeps/mach/alpha/machine-sp.h: Likewise. * sysdeps/mach/alpha/sysdep.h: Likewise. * sysdeps/mach/alpha/thread_state.h: Likewise. * sysdeps/mach/hppa/machine-lock.h: Likewise. * sysdeps/mach/hurd/access.c: Likewise. * sysdeps/mach/hurd/closedir.c: Likewise. * sysdeps/mach/hurd/dirstream.h: Likewise. * sysdeps/mach/hurd/dl-cache.c: Likewise. * sysdeps/mach/hurd/euidaccess.c: Likewise. * sysdeps/mach/hurd/fdatasync.c: Likewise. * sysdeps/mach/hurd/fexecve.c: Likewise. * sysdeps/mach/hurd/fork.c: Likewise. * sysdeps/mach/hurd/fpathconf.c: Likewise. * sysdeps/mach/hurd/fstatfs.c: Likewise. * sysdeps/mach/hurd/fxstat.c: Likewise. * sysdeps/mach/hurd/getcwd.c: Likewise. * sysdeps/mach/hurd/getpriority.c: Likewise. * sysdeps/mach/hurd/getrlimit.c: Likewise. * sysdeps/mach/hurd/getsid.c: Likewise. * sysdeps/mach/hurd/group_member.c: Likewise. * sysdeps/mach/hurd/kill.c: Likewise. * sysdeps/mach/hurd/lchown.c: Likewise. * sysdeps/mach/hurd/lxstat.c: Likewise. * sysdeps/mach/hurd/mig-reply.c: Likewise. * sysdeps/mach/hurd/mmap.c: Likewise. * sysdeps/mach/hurd/opendir.c: Likewise. * sysdeps/mach/hurd/pathconf.c: Likewise. * sysdeps/mach/hurd/profil.c: Likewise. * sysdeps/mach/hurd/ptrace.c: Likewise. * sysdeps/mach/hurd/readdir.c: Likewise. * sysdeps/mach/hurd/readdir_r.c: Likewise. * sysdeps/mach/hurd/send.c: Likewise. * sysdeps/mach/hurd/sendto.c: Likewise. * sysdeps/mach/hurd/setpriority.c: Likewise. * sysdeps/mach/hurd/statfs.c: Likewise. * sysdeps/mach/hurd/ttyname.c: Likewise. * sysdeps/mach/hurd/uname.c: Likewise. * sysdeps/mach/hurd/xstat.c: Likewise. * sysdeps/mach/hurd/alpha/exc2signal.c: Likewise. * sysdeps/mach/hurd/alpha/longjmp-ts.c: Likewise. * sysdeps/mach/hurd/alpha/sigreturn.c: Likewise. * sysdeps/mach/hurd/alpha/trampoline.c: Likewise. * sysdeps/mach/hurd/alpha/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/hppa/trampoline.c: Likewise. * sysdeps/mach/hurd/hppa/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/i386/exc2signal.c: Likewise. * sysdeps/mach/hurd/i386/intr-msg.h: Likewise. * sysdeps/mach/hurd/i386/longjmp-ts.c: Likewise. * sysdeps/mach/hurd/i386/sigreturn.c: Likewise. * sysdeps/mach/hurd/i386/trampoline.c: Likewise. * sysdeps/mach/hurd/i386/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/mips/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/sys/param.h: Likewise. * sysdeps/mach/i386/machine-lock.h: Likewise. * sysdeps/mach/i386/machine-sp.h: Likewise. * sysdeps/mach/i386/sysdep.h: Likewise. * sysdeps/mach/i386/thread_state.h: Likewise. * sysdeps/posix/dup2.c: Likewise. * sysdeps/posix/flock.c: Likewise. * sysdeps/posix/getdtsz.c: Likewise. * sysdeps/posix/gettimeofday.c: Likewise. * sysdeps/posix/isatty.c: Likewise. * sysdeps/posix/killpg.c: Likewise. * sysdeps/posix/mk-stdiolim.c: Likewise. * sysdeps/posix/profil.c: Likewise. * sysdeps/posix/remove.c: Likewise. * sysdeps/posix/rename.c: Likewise. * sysdeps/posix/sigsuspend.c: Likewise. * sysdeps/posix/tempname.c: Likewise. * sysdeps/posix/truncate.c: Likewise. * sysdeps/posix/utimes.c: Likewise. * sysdeps/posix/wait.c: Likewise. * sysdeps/posix/wait3.c: Likewise. * sysdeps/rs6000/memcopy.h: Likewise. * sysdeps/sparc/memcopy.h: Likewise. * sysdeps/standalone/close.c: Likewise. * sysdeps/standalone/dirstream.h: Likewise. * sysdeps/standalone/filedesc.h: Likewise. * sysdeps/standalone/open.c: Likewise. * sysdeps/standalone/read.c: Likewise. * sysdeps/standalone/standalone.h: Likewise. * sysdeps/standalone/write.c: Likewise. * sysdeps/standalone/bits/stdio_lim.h: Likewise. * sysdeps/standalone/i386/i386.h: Likewise. * sysdeps/standalone/m68k/m68020/m68020.h: Likewise. * sysdeps/stub/__longjmp.c: Likewise. * sysdeps/stub/accept.c: Likewise. * sysdeps/stub/access.c: Likewise. * sysdeps/stub/acct.c: Likewise. * sysdeps/stub/adjtime.c: Likewise. * sysdeps/stub/alarm.c: Likewise. * sysdeps/stub/bind.c: Likewise. * sysdeps/stub/brk.c: Likewise. * sysdeps/stub/bsd-_setjmp.c: Likewise. * sysdeps/stub/bsd-setjmp.c: Likewise. * sysdeps/stub/chdir.c: Likewise. * sysdeps/stub/chflags.c: Likewise. * sysdeps/stub/chmod.c: Likewise. * sysdeps/stub/chown.c: Likewise. * sysdeps/stub/chroot.c: Likewise. * sysdeps/stub/clock.c: Likewise. * sysdeps/stub/close.c: Likewise. * sysdeps/stub/closedir.c: Likewise. * sysdeps/stub/connect.c: Likewise. * sysdeps/stub/ctermid.c: Likewise. * sysdeps/stub/cuserid.c: Likewise. * sysdeps/stub/dbl2mpn.c: Likewise. * sysdeps/stub/dirstream.h: Likewise. * sysdeps/stub/dup.c: Likewise. * sysdeps/stub/dup2.c: Likewise. * sysdeps/stub/exc2signal.c: Likewise. * sysdeps/stub/execve.c: Likewise. * sysdeps/stub/fchflags.c: Likewise. * sysdeps/stub/fchown.c: Likewise. * sysdeps/stub/fcntl.c: Likewise. * sysdeps/stub/fdopen.c: Likewise. * sysdeps/stub/fexecve.c: Likewise. * sysdeps/stub/flock.c: Likewise. * sysdeps/stub/fork.c: Likewise. * sysdeps/stub/fpathconf.c: Likewise. * sysdeps/stub/fpu_control.h: Likewise. * sysdeps/stub/fstatfs.c: Likewise. * sysdeps/stub/fsync.c: Likewise. * sysdeps/stub/ftruncate.c: Likewise. * sysdeps/stub/fxstat.c: Likewise. * sysdeps/stub/getcwd.c: Likewise. * sysdeps/stub/getdomain.c: Likewise. * sysdeps/stub/getdtsz.c: Likewise. * sysdeps/stub/getegid.c: Likewise. * sysdeps/stub/geteuid.c: Likewise. * sysdeps/stub/getgid.c: Likewise. * sysdeps/stub/getgroups.c: Likewise. * sysdeps/stub/gethostid.c: Likewise. * sysdeps/stub/gethostname.c: Likewise. * sysdeps/stub/getitimer.c: Likewise. * sysdeps/stub/getpeername.c: Likewise. * sysdeps/stub/getpgid.c: Likewise. * sysdeps/stub/getpid.c: Likewise. * sysdeps/stub/getppid.c: Likewise. * sysdeps/stub/getpriority.c: Likewise. * sysdeps/stub/getrlimit.c: Likewise. * sysdeps/stub/getrusage.c: Likewise. * sysdeps/stub/getsid.c: Likewise. * sysdeps/stub/getsockname.c: Likewise. * sysdeps/stub/getsockopt.c: Likewise. * sysdeps/stub/getsysstats.c: Likewise. * sysdeps/stub/gettimeofday.c: Likewise. * sysdeps/stub/getuid.c: Likewise. * sysdeps/stub/gtty.c: Likewise. * sysdeps/stub/if_index.c: Likewise. * sysdeps/stub/init-posix.c: Likewise. * sysdeps/stub/ioctl.c: Likewise. * sysdeps/stub/isatty.c: Likewise. * sysdeps/stub/isfdtype.c: Likewise. * sysdeps/stub/jmp-unwind.c: Likewise. * sysdeps/stub/kill.c: Likewise. * sysdeps/stub/killpg.c: Likewise. * sysdeps/stub/ldbl2mpn.c: Likewise. * sysdeps/stub/link.c: Likewise. * sysdeps/stub/listen.c: Likewise. * sysdeps/stub/lockfile.c: Likewise. * sysdeps/stub/longjmp-ts.c: Likewise. * sysdeps/stub/lseek.c: Likewise. * sysdeps/stub/lxstat.c: Likewise. * sysdeps/stub/machine-lock.h: Likewise. * sysdeps/stub/machine-sp.h: Likewise. * sysdeps/stub/madvise.c: Likewise. * sysdeps/stub/mkdir.c: Likewise. * sysdeps/stub/mkfifo.c: Likewise. * sysdeps/stub/mmap.c: Likewise. * sysdeps/stub/morecore.c: Likewise. * sysdeps/stub/mpn2dbl.c: Likewise. * sysdeps/stub/mpn2flt.c: Likewise. * sysdeps/stub/mpn2ldbl.c: Likewise. * sysdeps/stub/mprotect.c: Likewise. * sysdeps/stub/msgctl.c: Likewise. * sysdeps/stub/msgget.c: Likewise. * sysdeps/stub/msgrcv.c: Likewise. * sysdeps/stub/msgsnd.c: Likewise. * sysdeps/stub/munmap.c: Likewise. * sysdeps/stub/nanosleep.c: Likewise. * sysdeps/stub/nice.c: Likewise. * sysdeps/stub/nlist.c: Likewise. * sysdeps/stub/open.c: Likewise. * sysdeps/stub/opendir.c: Likewise. * sysdeps/stub/pathconf.c: Likewise. * sysdeps/stub/pause.c: Likewise. * sysdeps/stub/pipestream.c: Likewise. * sysdeps/stub/poll.c: Likewise. * sysdeps/stub/profil.c: Likewise. * sysdeps/stub/ptrace.c: Likewise. * sysdeps/stub/putenv.c: Likewise. * sysdeps/stub/read.c: Likewise. * sysdeps/stub/readdir.c: Likewise. * sysdeps/stub/readdir_r.c: Likewise. * sysdeps/stub/readlink.c: Likewise. * sysdeps/stub/reboot.c: Likewise. * sysdeps/stub/recv.c: Likewise. * sysdeps/stub/recvfrom.c: Likewise. * sysdeps/stub/recvmsg.c: Likewise. * sysdeps/stub/remove.c: Likewise. * sysdeps/stub/rename.c: Likewise. * sysdeps/stub/revoke.c: Likewise. * sysdeps/stub/rewinddir.c: Likewise. * sysdeps/stub/rmdir.c: Likewise. * sysdeps/stub/sbrk.c: Likewise. * sysdeps/stub/sched_getp.c: Likewise. * sysdeps/stub/sched_gets.c: Likewise. * sysdeps/stub/sched_primax.c: Likewise. * sysdeps/stub/sched_primin.c: Likewise. * sysdeps/stub/sched_rr_gi.c: Likewise. * sysdeps/stub/sched_setp.c: Likewise. * sysdeps/stub/sched_sets.c: Likewise. * sysdeps/stub/sched_yield.c: Likewise. * sysdeps/stub/seekdir.c: Likewise. * sysdeps/stub/select.c: Likewise. * sysdeps/stub/semctl.c: Likewise. * sysdeps/stub/semget.c: Likewise. * sysdeps/stub/semop.c: Likewise. * sysdeps/stub/send.c: Likewise. * sysdeps/stub/sendmsg.c: Likewise. * sysdeps/stub/sendto.c: Likewise. * sysdeps/stub/setdomain.c: Likewise. * sysdeps/stub/setegid.c: Likewise. * sysdeps/stub/setenv.c: Likewise. * sysdeps/stub/seteuid.c: Likewise. * sysdeps/stub/setgid.c: Likewise. * sysdeps/stub/setgroups.c: Likewise. * sysdeps/stub/sethostid.c: Likewise. * sysdeps/stub/sethostname.c: Likewise. * sysdeps/stub/setjmp.c: Likewise. * sysdeps/stub/setlogin.c: Likewise. * sysdeps/stub/setpgid.c: Likewise. * sysdeps/stub/setpriority.c: Likewise. * sysdeps/stub/setregid.c: Likewise. * sysdeps/stub/setreuid.c: Likewise. * sysdeps/stub/setrlimit.c: Likewise. * sysdeps/stub/setsid.c: Likewise. * sysdeps/stub/setsockopt.c: Likewise. * sysdeps/stub/settimeofday.c: Likewise. * sysdeps/stub/setuid.c: Likewise. * sysdeps/stub/shmctl.c: Likewise. * sysdeps/stub/shmget.c: Likewise. * sysdeps/stub/shutdown.c: Likewise. * sysdeps/stub/sigaction.c: Likewise. * sysdeps/stub/sigaltstack.c: Likewise. * sysdeps/stub/sigblock.c: Likewise. * sysdeps/stub/sigintr.c: Likewise. * sysdeps/stub/sigpending.c: Likewise. * sysdeps/stub/sigprocmask.c: Likewise. * sysdeps/stub/sigreturn.c: Likewise. * sysdeps/stub/sigsetmask.c: Likewise. * sysdeps/stub/sigstack.c: Likewise. * sysdeps/stub/sigsuspend.c: Likewise. * sysdeps/stub/sigvec.c: Likewise. * sysdeps/stub/socket.c: Likewise. * sysdeps/stub/socketpair.c: Likewise. * sysdeps/stub/sstk.c: Likewise. * sysdeps/stub/statfs.c: Likewise. * sysdeps/stub/stdio_init.c: Likewise. * sysdeps/stub/stime.c: Likewise. * sysdeps/stub/stty.c: Likewise. * sysdeps/stub/swapoff.c: Likewise. * sysdeps/stub/swapon.c: Likewise. * sysdeps/stub/symlink.c: Likewise. * sysdeps/stub/sync.c: Likewise. * sysdeps/stub/syscall.c: Likewise. * sysdeps/stub/sysd-stdio.c: Likewise. * sysdeps/stub/system.c: Likewise. * sysdeps/stub/tcdrain.c: Likewise. * sysdeps/stub/tcflow.c: Likewise. * sysdeps/stub/tcflush.c: Likewise. * sysdeps/stub/tcgetattr.c: Likewise. * sysdeps/stub/tcgetpgrp.c: Likewise. * sysdeps/stub/tcsendbrk.c: Likewise. * sysdeps/stub/tcsetpgrp.c: Likewise. * sysdeps/stub/telldir.c: Likewise. * sysdeps/stub/thread_state.h: Likewise. * sysdeps/stub/time.c: Likewise. * sysdeps/stub/times.c: Likewise. * sysdeps/stub/trampoline.c: Likewise. * sysdeps/stub/truncate.c: Likewise. * sysdeps/stub/ttyname.c: Likewise. * sysdeps/stub/ttyname_r.c: Likewise. * sysdeps/stub/ualarm.c: Likewise. * sysdeps/stub/ulimit.c: Likewise. * sysdeps/stub/umask.c: Likewise. * sysdeps/stub/unlink.c: Likewise. * sysdeps/stub/usleep.c: Likewise. * sysdeps/stub/ustat.c: Likewise. * sysdeps/stub/utime.c: Likewise. * sysdeps/stub/utimes.c: Likewise. * sysdeps/stub/vdprintf.c: Likewise. * sysdeps/stub/vhangup.c: Likewise. * sysdeps/stub/wait.c: Likewise. * sysdeps/stub/wait3.c: Likewise. * sysdeps/stub/wait4.c: Likewise. * sysdeps/stub/waitpid.c: Likewise. * sysdeps/stub/write.c: Likewise. * sysdeps/stub/xmknod.c: Likewise. * sysdeps/stub/xstat.c: Likewise. * sysdeps/stub/bits/errno.h: Likewise. * sysdeps/stub/bits/sigcontext.h: Likewise. * sysdeps/unix/fxstat.c: Likewise. * sysdeps/unix/mk-local_lim.c: Likewise. * sysdeps/unix/mkdir.c: Likewise. * sysdeps/unix/nice.c: Likewise. * sysdeps/unix/rmdir.c: Likewise. * sysdeps/unix/stime.c: Likewise. * sysdeps/unix/telldir.c: Likewise. * sysdeps/unix/xstat.c: Likewise. * sysdeps/unix/arm/sysdep.h: Likewise. * sysdeps/unix/bsd/ftime.c: Likewise. * sysdeps/unix/bsd/isatty.c: Likewise. * sysdeps/unix/bsd/setegid.c: Likewise. * sysdeps/unix/bsd/seteuid.c: Likewise. * sysdeps/unix/bsd/setsid.c: Likewise. * sysdeps/unix/bsd/sigaction.c: Likewise. * sysdeps/unix/bsd/sigprocmask.c: Likewise. * sysdeps/unix/bsd/tcgetattr.c: Likewise. * sysdeps/unix/bsd/tcsetattr.c: Likewise. * sysdeps/unix/bsd/times.c: Likewise. * sysdeps/unix/bsd/ulimit.c: Likewise. * sysdeps/unix/bsd/bits/dirent.h: Likewise. * sysdeps/unix/bsd/bsd4.4/tcdrain.c: Likewise. * sysdeps/unix/bsd/bsd4.4/wait.c: Likewise. * sysdeps/unix/bsd/bsd4.4/waitpid.c: Likewise. * sysdeps/unix/bsd/hp/m68k/sysdep.h: Likewise. * sysdeps/unix/bsd/osf/alpha/sysdep.h: Likewise. * sysdeps/unix/bsd/sequent/i386/sysdep.h: Likewise. * sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h: Likewise. * sysdeps/unix/bsd/sun/m68k/sigtramp.c: Likewise. * sysdeps/unix/bsd/sun/m68k/sysdep.h: Likewise. * sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h: Likewise. * sysdeps/unix/bsd/sun/sparc/sigtramp.c: Likewise. * sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/mmap.c: Likewise. * sysdeps/unix/bsd/sun/sunos4/speed.c: Likewise. * sysdeps/unix/bsd/ultrix4/sysconf.c: Likewise. * sysdeps/unix/bsd/ultrix4/bits/posix_opt.h: Likewise. * sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h: Likewise. * sysdeps/unix/bsd/vax/sysdep.h: Likewise. * sysdeps/unix/common/lxstat.c: Likewise. * sysdeps/unix/common/tcsendbrk.c: Likewise. * sysdeps/unix/common/bits/dirent.h: Likewise. * sysdeps/unix/i386/sysdep.h: Likewise. * sysdeps/unix/mips/sysdep.h: Likewise. * sysdeps/unix/sysv/setrlimit.c: Likewise. * sysdeps/unix/sysv/settimeofday.c: Likewise. * sysdeps/unix/sysv/sigaction.c: Likewise. * sysdeps/unix/sysv/sysv_termio.h: Likewise. * sysdeps/unix/sysv/tcdrain.c: Likewise. * sysdeps/unix/sysv/tcflow.c: Likewise. * sysdeps/unix/sysv/tcflush.c: Likewise. * sysdeps/unix/sysv/tcgetattr.c: Likewise. * sysdeps/unix/sysv/tcsendbrk.c: Likewise. * sysdeps/unix/sysv/tcsetattr.c: Likewise. * sysdeps/unix/sysv/bits/dirent.h: Likewise. * sysdeps/unix/sysv/irix4/getpriority.c: Likewise. * sysdeps/unix/sysv/irix4/setpriority.c: Likewise. * sysdeps/unix/sysv/irix4/bits/confname.h: Likewise. * sysdeps/unix/sysv/linux/adjtime.c: Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. * sysdeps/unix/sysv/linux/gethostname.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * sysdeps/unix/sysv/linux/ptrace.c: Likewise. * sysdeps/unix/sysv/linux/reboot.c: Likewise. * sysdeps/unix/sysv/linux/speed.c: Likewise. * sysdeps/unix/sysv/linux/sysctl.c: Likewise. * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. * sysdeps/unix/sysv/linux/ulimit.c: Likewise. * sysdeps/unix/sysv/linux/waitpid.c: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/signum.h: Likewise. * sysdeps/unix/sysv/linux/i386/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. * sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sco3.2.4/bits/confname.h: Likewise. * sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/sigaction.c: Likewise. * sysdeps/unix/sysv/sysv4/siginfo.h: Likewise. * sysdeps/unix/sysv/sysv4/sysconf.c: Likewise. * sysdeps/unix/sysv/sysv4/sysconfig.h: Likewise. * sysdeps/unix/sysv/sysv4/waitpid.c: Likewise. * sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h: Likewise. * sysdeps/vax/fl.h: Likewise. * sysdeps/vax/setjmp.c: Likewise. 1997-06-21 16:58 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdlib/strtod.c (INTERNAL (STRTOF)): Fix recognition of Infinity and NaN strings. 1997-06-20 21:52 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/bits/mathinline.h (__scalbn): Fix type of second argument. (__ilogb): Remove special case for zero, add stupid special case for NaN. (__ieee754_scalb): Remove definition. * sysdeps/m68k/fpu/mathbits.h (FP_ILOGB0, FP_ILOGBNAN): Define. * sysdeps/m68k/fpu/s_scalbn.c: Fix type of second argument. * sysdeps/m68k/fpu/e_scalb.c: Rewritten. * sysdeps/m68k/fpu/e_scalbf.c: Adapted. * sysdeps/m68k/fpu/e_scalbl.c: Adapted. * sysdeps/libm-ieee754/e_scalb.c: Raise no exceptions when returning NaN. Handle zero specially. * sysdeps/libm-ieee754/e_scalbf.c: Likewise. * sysdeps/libm-ieee754/e_scalbl.c: Likewise. * math/libm-test.c (ilogb_test): Don't require exceptions for zero and NaN. (gamma_test): Use different argument when checking whether function is implemented. (scalb_test): Remove duplicate tests. 1997-06-03 15:59 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules (+depfiles): Add dependencies for $(test-srcs). (distinfo-vars): Add test-srcs.
951 lines
32 KiB
Plaintext
951 lines
32 KiB
Plaintext
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||
# modify it under the terms of the GNU Library General Public License as
|
||
# published by the Free Software Foundation; either version 2 of the
|
||
# License, or (at your option) any later version.
|
||
|
||
# The GNU C Library is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
# 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., 59 Temple Place - Suite 330,
|
||
# Boston, MA 02111-1307, USA.
|
||
|
||
#
|
||
# Common rules for making the GNU C library. This file is included
|
||
# by the top-level Makefile and by all subdirectory makefiles
|
||
# (through Rules).
|
||
#
|
||
ifneq (,)
|
||
This makefile requires GNU Make.
|
||
endif
|
||
|
||
REQUIRED_MAKE_VERSION = 3.74
|
||
REAL_MAKE_VERSION = $(firstword $(MAKE_VERSION))
|
||
|
||
ifneq ($(REQUIRED_MAKE_VERSION), \
|
||
$(firstword $(sort $(REAL_MAKE_VERSION) $(REQUIRED_MAKE_VERSION))))
|
||
Wrong GNU Make version. See above for the version needed.
|
||
endif
|
||
|
||
|
||
ifdef subdir
|
||
.. := ../
|
||
endif # subdir
|
||
|
||
# If `sources' was defined by the parent makefile, undefine it so
|
||
# we will later get it from wildcard search in this directory.
|
||
ifneq "$(findstring env,$(origin sources))" ""
|
||
sources :=
|
||
endif
|
||
|
||
oPATH := $(PATH)
|
||
PATH := this definition should take precedence over $(oPATH)
|
||
ifeq ($(PATH),$(oPATH))
|
||
You must not use the -e flag when building the GNU C library.
|
||
else
|
||
PATH := $(oPATH)
|
||
endif
|
||
|
||
ifndef +included-Makeconfig
|
||
include $(..)Makeconfig
|
||
endif
|
||
|
||
# `configure' writes a definition of `config-sysdirs' in `config.make'.
|
||
sysdirs = $(strip $(full-config-sysdirs))
|
||
|
||
+sysdir_pfx = $(common-objpfx)
|
||
|
||
export sysdirs := $(sysdirs)
|
||
|
||
+sysdep_dirs := $(full-config-sysdirs)
|
||
ifdef objdir
|
||
+sysdep_dirs := $(objdir) $(+sysdep_dirs)
|
||
endif
|
||
|
||
# Add -I switches to get the right sysdep directories.
|
||
# `+includes' in Makeconfig references $(+sysdep-includes).
|
||
+sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
|
||
|
||
# The name of the symbol table archive member. The default is suitable for
|
||
# BSD style archives. It can be overridden in sysdep Makefiles when SYSV
|
||
# style archive are used.
|
||
ifeq (no,$(elf))
|
||
ar-symtab-name = __.SYMDEF
|
||
else
|
||
ar-symtab-name = # The null name is used in ELF archives.
|
||
endif
|
||
|
||
# This variable is used in ``include $(o-iterator)'' after defining
|
||
# $(o-iterator-doit) to produce some desired rule using $o for the object
|
||
# suffix, and setting $(object-suffixes-left) to $(object-suffixes); a copy
|
||
# is produced for each object suffix in use.
|
||
o-iterator = $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
|
||
|
||
# Include any system-specific makefiles.
|
||
|
||
# This is here so things in sysdep Makefiles can easily depend on foo.h as
|
||
# appropriate and not worry about where foo.h comes from, which may be
|
||
# system dependent and not known by that Makefile.
|
||
vpath %.h $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
|
||
$(+sysdep_dirs) $(..)))
|
||
|
||
# The same is true for RPC source files.
|
||
vpath %.x $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
|
||
$(+sysdep_dirs) $(..)))
|
||
|
||
# Some sysdep makefiles use this to distinguish being included here from
|
||
# being included individually by a subdir makefile (hurd/Makefile needs this).
|
||
in-Makerules := yes
|
||
|
||
ifndef avoid-generated
|
||
-include $(+sysdir_pfx)sysd-Makefile
|
||
ifneq ($(sysd-Makefile-sysdirs),$(config-sysdirs))
|
||
sysd-Makefile-force = FORCE
|
||
FORCE:
|
||
endif
|
||
$(+sysdir_pfx)sysd-Makefile: $(+sysdir_pfx)config.make $(..)Makerules \
|
||
$(sysd-Makefile-force)
|
||
-@rm -f $@T
|
||
(echo 'sysd-Makefile-sysdirs := $(config-sysdirs)'; \
|
||
for dir in $(config-sysdirs); do \
|
||
file=$$dir/Makefile; \
|
||
case $$dir in \
|
||
/*) rel= ;; \
|
||
*) rel=$(..) ;; \
|
||
esac; \
|
||
if [ -f $$rel$$file ]; then \
|
||
case $$dir in \
|
||
/*) echo include "$$file" ;; \
|
||
*) echo include "\$$(..)$$file" ;; \
|
||
esac; \
|
||
else true; fi; \
|
||
done; \
|
||
echo 'sysd-Makefile-done=t') > $@T
|
||
mv -f $@T $@
|
||
endif
|
||
|
||
ifndef sysd-Makefile-done
|
||
# Don't do deps until this exists, because it might change the sources list.
|
||
no_deps=t
|
||
endif
|
||
|
||
|
||
# Reorder before-compile so that mach things come first, and hurd things
|
||
# second, before all else. 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 first (and mach before hurd, at that).
|
||
before-compile := $(filter $(common-objpfx)mach% $(common-objpfx)hurd%,\
|
||
$(before-compile)) \
|
||
$(filter-out $(common-objpfx)mach% $(common-objpfx)hurd%,\
|
||
$(before-compile))
|
||
|
||
# Remove existing files from `before-compile'. Things are added there when
|
||
# they must exist for dependency generation to work right, but once they
|
||
# exist there is no further need for every single file to depend on them,
|
||
# and those gratuitous dependencies result in many gratuitous
|
||
# recompilations.
|
||
before-compile := $(filter-out $(wildcard $(before-compile)),$(before-compile))
|
||
|
||
# Don't let any before-compile file be an intermediate and get removed.
|
||
ifdef before-compile
|
||
$(before-compile):
|
||
endif
|
||
|
||
# Generate an ordered list of implicit rules which find the source files in
|
||
# each sysdep directory. The old method was to use vpath to search all the
|
||
# sysdep directories. However, that had the problem that a .S file in a
|
||
# later directory would be chosen over a .c file in an earlier directory,
|
||
# which does not preserve the desired sysdeps ordering behavior.
|
||
|
||
# When making the list of .d files to include, we can't know which ones
|
||
# have source in .s files, and thus do not in fact need a .d file.
|
||
# So we must define rules to make .d files for .s files.
|
||
define make-dummy-dep
|
||
$(addprefix ln $(common-objpfx)dummy.d ,$(filter-out $(wildcard $@),$@))
|
||
endef
|
||
$(common-objpfx)dummy.d:
|
||
echo '# .s files cannot contain includes, so they need no deps.' > $@
|
||
|
||
# It matters that this set of rules, for compiling from sources in
|
||
# the current directory (the $srcdir/$subdir) come before the
|
||
# generated sysdep rules in included from sysd-rules below. When
|
||
# compiling in the source tree, generated sources go into the current
|
||
# directory, and those should be chosen before any sources in sysdeps.
|
||
define o-iterator-doit
|
||
$(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
|
||
endef
|
||
object-suffixes-left := $(object-suffixes)
|
||
include $(o-iterator)
|
||
$(objpfx)%.d: %.S $(before-compile); $(+make-deps)
|
||
|
||
define o-iterator-doit
|
||
$(objpfx)%$o: %.s $(before-compile); $$(compile-command.s)
|
||
endef
|
||
object-suffixes-left := $(object-suffixes)
|
||
include $(o-iterator)
|
||
$(objpfx)%.d: %.s $(common-objpfx)dummy.d; $(make-dummy-dep)
|
||
|
||
define o-iterator-doit
|
||
$(objpfx)%$o: %.c $(before-compile); $$(compile-command.c)
|
||
endef
|
||
object-suffixes-left := $(object-suffixes)
|
||
include $(o-iterator)
|
||
$(objpfx)%.d: %.c $(before-compile); $(+make-deps)
|
||
|
||
# Omit the objpfx rules when building in the source tree, because
|
||
# objpfx is empty and so these rules just override the ones above.
|
||
ifdef objpfx
|
||
# Define first rules to find the source files in $(objpfx).
|
||
# Generated source files will end up there.
|
||
define o-iterator-doit
|
||
$(objpfx)%$o: $(objpfx)%.S $(before-compile); $$(compile-command.S)
|
||
endef
|
||
object-suffixes-left := $(object-suffixes)
|
||
include $(o-iterator)
|
||
$(objpfx)%.d: $(objpfx)%.S $(before-compile); $(+make-deps)
|
||
|
||
define o-iterator-doit
|
||
$(objpfx)%$o: $(objpfx)%.s $(before-compile); $$(compile-command.s)
|
||
endef
|
||
object-suffixes-left := $(object-suffixes)
|
||
include $(o-iterator)
|
||
$(objpfx)%.d: $(objpfx)%.s $(common-objpfx)dummy.d; $(make-dummy-dep)
|
||
|
||
define o-iterator-doit
|
||
$(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c)
|
||
endef
|
||
object-suffixes-left := $(object-suffixes)
|
||
include $(o-iterator)
|
||
$(objpfx)%.d: $(objpfx)%.c $(before-compile); $(+make-deps)
|
||
endif
|
||
|
||
# System-dependent makefiles can put in `inhibit-sysdep-asm' wildcard
|
||
# patterns matching sysdep directories whose assembly source files should
|
||
# be suppressed.
|
||
ifdef inhibit-sysdep-asm
|
||
define open-check-inhibit-asm
|
||
case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) : ;; *)
|
||
endef
|
||
close-check-inhibit-asm = ;; esac ;
|
||
endif
|
||
|
||
# Don't include sysd-rules until sysd-Makefile is already there and has been
|
||
# included. It might define inhibit-sysdep-asm, which would affect the
|
||
# contents of sysd-rules.
|
||
ifdef sysd-Makefile-done
|
||
-include $(+sysdir_pfx)sysd-rules
|
||
ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
|
||
# The value of $(+sysdep_dirs) the sysd-rules was computed for
|
||
# differs from the one we are using now. So force a rebuild of sysd-rules.
|
||
sysd-rules-force = FORCE
|
||
FORCE:
|
||
endif
|
||
endif
|
||
$(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
|
||
$(wildcard $(foreach dir,$(sysdirs),\
|
||
$(dir)/Makefile))\
|
||
$(sysd-rules-force)
|
||
-@rm -f $@T
|
||
(echo 'sysd-rules-sysdirs := $(config-sysdirs)'; \
|
||
for sysdir in $(config-sysdirs); do \
|
||
case $$sysdir in \
|
||
/*) dir=$$sysdir ;; \
|
||
*) dir="\$$(..)$$sysdir" ;; \
|
||
esac; \
|
||
for o in $(all-object-suffixes); do \
|
||
$(open-check-inhibit-asm) \
|
||
echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
|
||
\$$(compile-command.S)"; \
|
||
echo "\$$(objpfx)%$$o: $$dir/%.s \$$(before-compile); \
|
||
\$$(compile-command.s)"; \
|
||
$(close-check-inhibit-asm) \
|
||
echo "\$$(objpfx)%$$o: $$dir/%.c \$$(before-compile); \
|
||
\$$(compile-command.c)"; \
|
||
done; \
|
||
$(open-check-inhibit-asm) \
|
||
echo "\$$(objpfx)%.d: $$dir/%.s \$$(common-objpfx)dummy.d; \
|
||
\$$(make-dummy-dep)"; \
|
||
echo "\$$(objpfx)%.d: $$dir/%.S \$$(before-compile); \
|
||
\$$(+make-deps)"; \
|
||
$(close-check-inhibit-asm) \
|
||
echo "\$$(objpfx)%.d: $$dir/%.c \$$(before-compile); \
|
||
\$$(+make-deps)"; \
|
||
done; \
|
||
echo 'sysd-rules-done = t') > $@T
|
||
mv -f $@T $@
|
||
|
||
ifndef sysd-rules-done
|
||
# Don't do deps until this exists, because it provides rules to make the deps.
|
||
no_deps=t
|
||
endif
|
||
|
||
|
||
ifndef compile-command.S
|
||
compile-command.S = $(compile.S) $(OUTPUT_OPTION)
|
||
endif
|
||
ifndef compile-command.s
|
||
compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION)
|
||
endif
|
||
ifndef compile-command.c
|
||
compile-command.c = $(compile.c) $(OUTPUT_OPTION)
|
||
endif
|
||
|
||
# GCC can grok options after the file name, and it looks nicer that way.
|
||
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
|
||
compile.S = \
|
||
$(CC) $< -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
|
||
COMPILE.S = \
|
||
$(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
|
||
COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
|
||
|
||
# We need this for the output to go in the right place. It will default to
|
||
# empty if make was configured to work with a cc that can't grok -c and -o
|
||
# together. You can't compile the C library with such a compiler.
|
||
OUTPUT_OPTION = -o $@
|
||
|
||
S-CPPFLAGS = $(asm-CPPFLAGS)
|
||
define +make-deps
|
||
$(make-target-directory)
|
||
-@rm -f $@
|
||
$(+mkdep) $< $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \
|
||
sed \
|
||
-e 's,$(subst .,\.,$*)\.o,$(foreach o,$(all-object-suffixes),$(@:.d=$o)) $@,' \
|
||
$(sed-remove-objpfx) > $(@:.d=.T)
|
||
mv -f $(@:.d=.T) $@
|
||
endef
|
||
ifneq (,$(objpfx))
|
||
# Continuation lines here are dangerous because they introduce spaces!
|
||
define sed-remove-objpfx
|
||
-e 's@ $(subst .,\.,$(subst @,\@,$(common-objpfx)))@ $$(common-objpfx)@g' \
|
||
-e 's@^$(subst .,\.,$(subst @,\@,$(common-objpfx)))@$$(common-objpfx)@g'
|
||
endef
|
||
endif
|
||
|
||
# Shared library building.
|
||
|
||
ifeq (yes,$(build-shared))
|
||
|
||
# Pattern rule to build a shared object from an archive of PIC objects.
|
||
# This must come after the installation rules so Make doesn't try to
|
||
# build shared libraries in place from the installed *_pic.a files.
|
||
# $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
|
||
# on other shared objects.
|
||
lib%.so: lib%_pic.a $(lib%-map); $(build-shlib)
|
||
|
||
ifeq ($(have-no-whole-archive),yes)
|
||
no-whole-archive = -Wl,--no-whole-archive
|
||
else
|
||
no-whole-archive =
|
||
endif
|
||
|
||
ifeq ($(versioning),yes)
|
||
load-map-file = $($(@F:%.so=%)-map)
|
||
else
|
||
load-map-file =
|
||
endif
|
||
|
||
interp-obj = $(common-objpfx)interp.so
|
||
$(interp-obj): $(common-objpfx)%.so: $(..)%.c
|
||
$(compile-command.c)
|
||
common-generated += interp.so
|
||
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"'
|
||
|
||
$(common-objpfx)libc.so: $(interp-obj)
|
||
$(patsubst %,$(objpfx)%.so,$(extra-libs)): $(interp-obj)
|
||
|
||
define build-shlib
|
||
$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
||
-B$(csu-objpfx) $(load-map-file:%=-Wl,--version-script=%) \
|
||
-Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
|
||
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
|
||
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
||
-Wl,--whole-archive $(filter-out $(load-map-file),$^) \
|
||
$(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
|
||
endef
|
||
|
||
# Don't try to use -lc when making libc.so itself.
|
||
# Also omits crti.o and crtn.o, which we do not want
|
||
# since we define our own `.init' section specially.
|
||
LDFLAGS-c.so = -nostdlib -nostartfiles
|
||
# But we still want to link libc.so against -lgcc.
|
||
LDLIBS-c.so = -lgcc
|
||
# Give libc.so an entry point and make it directly runnable itself.
|
||
LDFLAGS-c.so += -e __libc_main
|
||
# We have a versioning file for libc.so.
|
||
libc-map = $(..)libc.map
|
||
# Use our own special initializer and finalizer files for libc.so.
|
||
$(common-objpfx)libc.so: $(elfobjdir)/soinit.so \
|
||
$(common-objpfx)libc_pic.a \
|
||
$(elfobjdir)/sofini.so $(elfobjdir)/ld.so \
|
||
$(libc-map)
|
||
$(build-shlib)
|
||
ifdef libc.so-version
|
||
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
|
||
$(make-link)
|
||
endif
|
||
endif
|
||
|
||
# Some files must not be compiled with the exception handler mechanism
|
||
# enabled (introduced in gcc-2.8). Use $(no-exceptions) in the
|
||
# appropriate CFLAGS definition.
|
||
ifeq ($(have-no-exceptions),yes)
|
||
no-exceptions = -fno-exceptions
|
||
else
|
||
no-exceptions =
|
||
endif
|
||
|
||
# Figure out the source filenames in this directory.
|
||
|
||
override sources := $(addsuffix .c,$(filter-out $(elided-routines),\
|
||
$(routines) $(aux) \
|
||
$(sysdep_routines)))
|
||
sysdep_routines := $(sysdep_routines)
|
||
|
||
headers := $(headers) $(sysdep_headers)
|
||
|
||
# This is the list of all object files, gotten by
|
||
# replacing every ".c" in `sources' with a ".o".
|
||
override objects := $(addprefix $(objpfx),$(sources:.c=.o))
|
||
|
||
|
||
# The makefile may define $(extra-libs) with `libfoo libbar'
|
||
# to build libfoo.a et al from the modules listed in $(libfoo-routines).
|
||
ifdef extra-libs
|
||
# extra-lib.mk is included once for each extra lib to define rules
|
||
# to build it, and to add its objects to the various variables.
|
||
# During its evaluation, $(lib) is set to the name of the library.
|
||
extra-libs-left := $(extra-libs)
|
||
include $(patsubst %,$(..)extra-lib.mk,$(extra-libs))
|
||
endif
|
||
|
||
+depfiles := $(strip $(sources:.c=.d) \
|
||
$(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.so=.o))) \
|
||
$(addsuffix .d,$(others) $(tests) $(test-srcs)))
|
||
+depfiles := $(addprefix $(objpfx),\
|
||
$(filter-out $(addsuffix .d,$(omit-deps)),\
|
||
$(+depfiles)))
|
||
|
||
ifdef +depfiles
|
||
ifneq ($(no_deps),t)
|
||
-include $(+depfiles)
|
||
endif
|
||
endif
|
||
|
||
# Maximize efficiency by minimizing the number of rules.
|
||
.SUFFIXES: # Clear the suffix list.
|
||
# Add the suffixes we use.
|
||
.SUFFIXES: .a $(object-suffixes) .S .s .c .h .d
|
||
|
||
# Generic rule for making directories.
|
||
%/:
|
||
# mkdir isn't smart enough to strip a trailing /.
|
||
mkdir $(@:%/=%)
|
||
|
||
# Make sure that object files are not removed
|
||
# when they are intermediates between sources and library members.
|
||
.PRECIOUS: $(addprefix $(objpfx)%,$(object-suffixes))
|
||
|
||
# Make sure that the parent library archive is never removed.
|
||
.PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
|
||
|
||
# Use the verbose option of ar and tar when not running silently.
|
||
ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
|
||
verbose := v
|
||
else # -s
|
||
verbose :=
|
||
endif # not -s
|
||
|
||
ARFLAGS := r$(verbose)
|
||
|
||
# This makes all the object files in the parent library archive.
|
||
|
||
.PHONY: lib libobjs lib-noranlib
|
||
lib: lib-noranlib $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
|
||
|
||
# Pattern rule for libraries: depend on the __.SYMDEF member updated by ranlib.
|
||
lib%.a: lib%.a($(ar-symtab-name)) ;
|
||
|
||
# For object-suffix $o, the list of objects with that suffix.
|
||
# Makefiles can define `elide-routines.so = foo' to leave foo.so out.
|
||
o-objects = $(patsubst %.o,%$o,$(filter-out $(patsubst %,$(objpfx)%.o,\
|
||
$(elide-routines$o)),\
|
||
$(objects)))
|
||
|
||
libobjs: $(foreach o,$(object-suffixes),\
|
||
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
|
||
$(notdir $(o-objects))))
|
||
lib-noranlib: libobjs
|
||
others: $(addprefix $(objpfx),$(install-lib))
|
||
|
||
ifndef objects
|
||
|
||
# Create the stamp$o files to keep the parent makefile happy.
|
||
subdir_lib: $(foreach o,$(object-suffixes),$(objpfx)stamp$o)
|
||
$(foreach o,$(object-suffixes),$(objpfx)stamp$o):
|
||
$(make-target-directory)
|
||
rm -f $@; > $@
|
||
else
|
||
|
||
# Define a pattern rule that will match many targets libc.a(foo.%), for
|
||
# each foo.o in $(objects) (% will just happen always to match `o'). This is
|
||
# the only way to define a rule that updates many targets at once with one
|
||
# sequence of commands.
|
||
define o-iterator-doit
|
||
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
|
||
$(addsuffix .%,$(filter-out $(elide-routines$o),$(notdir $(objects:.o=))))): \
|
||
$(objpfx)stamp.% ;
|
||
endef
|
||
object-suffixes-left := $(object-suffixes)
|
||
include $(o-iterator)
|
||
|
||
# The pattern rule tells Make to remake $(objpfx)stamp.% as
|
||
# the way to update all the foo.% object files in $(objects). Now we
|
||
# define explicit rules to update each $(objpfx)stamp.SUFFIX
|
||
# timestamp file; these rules (one explicit rule is generated for each
|
||
# object suffix) will update the parent archive with ar. Use a static
|
||
# pattern rule so $* is set to the object type during the commands.
|
||
define o-iterator-doit
|
||
$(objpfx)stamp$o: $(objpfx)stamp%: $(o-objects); $$(do-ar)
|
||
endef
|
||
object-suffixes-left := $(object-suffixes)
|
||
include $(o-iterator)
|
||
define do-ar
|
||
topdir=`cd $(..).; pwd`; \
|
||
$(patsubst %/,cd %;,$(objpfx)) \
|
||
$(SHELL) $$topdir/autolock.sh ${O%-lib}.lck $(AR) cru$(verbose) ${O%-lib} \
|
||
$(patsubst $(objpfx)%,%,$^)
|
||
rm -f $@
|
||
touch $@
|
||
endef
|
||
O%-lib = $(..)$(patsubst %,$(libtype$*),c)
|
||
|
||
endif
|
||
|
||
# Rules to update the $(ar-symtab-name) member with ranlib,
|
||
# one for each object flavor.
|
||
define o-iterator-doit
|
||
$(common-objpfx)$(patsubst %,$(libtype$o),c)($(ar-symtab-name)): \
|
||
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
|
||
$(patsubst $(objpfx)%,%,$(o-objects))) $(subdirs-stamp-o); \
|
||
$(SHELL) $$(..)./autolock.sh \
|
||
$$(common-objpfx)$$(patsubst %,$$(libtype$o),c).lck \
|
||
$$(RANLIB) $$(common-objpfx)$$(patsubst %,$$(libtype$o),c)
|
||
endef
|
||
ifndef subdir
|
||
subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
|
||
subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
|
||
$(subdirs-stamps): subdir_lib;
|
||
endif
|
||
object-suffixes-left = $(object-suffixes)
|
||
include $(o-iterator)
|
||
|
||
|
||
# This makes all the object files.
|
||
.PHONY: objects objs
|
||
objects objs: $(foreach o,$(object-suffixes),$(o-objects)) \
|
||
$(addprefix $(objpfx),$(extra-objs))
|
||
|
||
# Canned sequence for building an extra library archive.
|
||
define build-extra-lib
|
||
$(patsubst %/,cd %;,$(objpfx)) \
|
||
$(AR) cru$(verbose) $(@:$(objpfx)%=%) \
|
||
$(patsubst $(objpfx)%,%,$^)
|
||
$(RANLIB) $@
|
||
endef
|
||
|
||
# Installation.
|
||
|
||
# $(install-lib) are installed from the object directory into $(libdir);
|
||
# files in $(install-lib) matching `lib%.a' are ranlib'd after installation
|
||
# unless they also appear in $(non-lib.a). $(install-data) are installed
|
||
# as they are into $(datadir). $(headers) are installed as they are in
|
||
# $(includedir). $(install-bin) and $(install-sbin) are installed from the
|
||
# object directory into $(bindir) and $(sbindir), respectively.
|
||
# $(install-others) are absolute path names of files to install; rules to
|
||
# install them are defined elsewhere.
|
||
|
||
# The simple library name to install libc.a under.
|
||
# This could be defined by a sysdep Makefile.
|
||
ifndef libc-name
|
||
libc-name := c
|
||
endif
|
||
|
||
define do-install
|
||
$(make-target-directory)
|
||
$(INSTALL_DATA) $< $@
|
||
endef
|
||
|
||
# Make the target directory if it doesn't exist, using the `mkinstalldirs'
|
||
# script that does `mkdir -p' even if `mkdir' doesn't support that flag.
|
||
define make-target-directory
|
||
$(addprefix $(..)./mkinstalldirs ,\
|
||
$(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
|
||
endef
|
||
|
||
# Any directory (parent or subdir) that has any object files to build
|
||
# should install libc.a; this way "make install" in a subdir is guaranteed
|
||
# to install everything it changes.
|
||
ifdef objects
|
||
installed-libcs := $(foreach o,$(object-suffixes),\
|
||
$(inst_libdir)/$(patsubst %,$(libtype$o),\
|
||
$(libprefix)$(libc-name)))
|
||
installed-libcs := $(filter-out %_pic.a,$(installed-libcs))
|
||
install: $(installed-libcs)
|
||
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib
|
||
$(make-target-directory)
|
||
$(INSTALL_DATA) $(common-objpfx)lib$(*:$(libc-name)%=c%) $@
|
||
# Running ranlib after installing makes the __.SYMDEF time stamp up to
|
||
# date, which avoids messages from some linkers.
|
||
$(RANLIB) $@
|
||
endif
|
||
|
||
define do-install-program
|
||
$(make-target-directory)
|
||
$(INSTALL_PROGRAM) $< $@.new
|
||
mv -f $@.new $@
|
||
endef
|
||
|
||
install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
|
||
install-lib := $(filter-out %.so %_pic.a,$(install-lib))
|
||
ifeq (yes,$(build-shared))
|
||
|
||
install-lib-nosubdir: $(install-lib.so:%=$(inst_libdir)/%)
|
||
|
||
# Find which .so's have versions.
|
||
versioned := $(strip $(foreach so,$(install-lib.so),\
|
||
$(patsubst %,$(so),$($(so)-version))))
|
||
|
||
# Install all the unversioned shared libraries.
|
||
$(addprefix $(inst_slibdir)/, $(filter-out $(versioned),$(install-lib.so))): \
|
||
$(inst_slibdir)/%.so: $(objpfx)%.so; $(do-install-program)
|
||
|
||
ifneq ($(findstring -s,$(LN_S)),)
|
||
define make-link
|
||
rm -f $@.new
|
||
$(SHELL) $(..)rellns-sh $< $@.new
|
||
mv -f $@.new $@
|
||
endef
|
||
else
|
||
# If we have no symbolic links don't bother with rellns-sh.
|
||
define make-link
|
||
rm -f $@.new
|
||
$(LN_S) $< $@.new
|
||
mv -f $@.new $@
|
||
endef
|
||
endif
|
||
|
||
# XXX The following will have to be changed when `ldconfig' is available.
|
||
ifneq (yes,$(cross-compiling))
|
||
ifeq (yes,$(has-ldconfig))
|
||
define make-shlib-link
|
||
@:
|
||
endef
|
||
endif
|
||
endif
|
||
ifndef make-shlib-link
|
||
define make-shlib-link
|
||
$(make-link)
|
||
endef
|
||
endif
|
||
|
||
ifdef libc.so-version
|
||
# For a library specified to be version N, install three files:
|
||
# libc.so -> libc.so.N (e.g. libc.so.6)
|
||
# libc.so.6 -> libc-VERSION.so (e.g. libc-1.10.so)
|
||
|
||
$(inst_slibdir)/libc.so$(libc.so-version): $(inst_slibdir)/libc-$(version).so
|
||
$(make-shlib-link)
|
||
$(inst_slibdir)/libc-$(version).so: $(common-objpfx)libc.so
|
||
$(do-install-program)
|
||
install: $(inst_slibdir)/libc.so$(libc.so-version)
|
||
|
||
ifndef subdir
|
||
# What we install as libc.so for programs to link against is in fact a
|
||
# link script. It contains references for the various libraries we need.
|
||
# The libc.so object is not complete since some functions are only defined
|
||
# in libc.a and the dynamic linker is an etra object.
|
||
install: $(inst_libdir)/libc.so
|
||
$(inst_libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
|
||
$(elfobjdir)/$(rtld-installed-name) \
|
||
$(inst_libdir)/lib$(libc-name).a
|
||
(echo '/* GNU ld script';\
|
||
echo ' Use the shared library, but some functions are only in';\
|
||
echo ' the static library, so try that secondarily.'; \
|
||
echo ' The dynamic linker defines some functions used by $(<F),';\
|
||
echo ' but ld uses definitions from libc.a before examining the';\
|
||
echo ' dependencies of $(<F) to find $(rtld-installed-name). */';\
|
||
echo 'GROUP ( $(^F) )') > $@.new
|
||
mv -f $@.new $@
|
||
|
||
endif
|
||
|
||
else
|
||
install: $(inst_slibdir)/libc.so
|
||
$(inst_slibdir)/libc.so: $(common-objpfx)libc.so
|
||
$(do-install-program)
|
||
endif
|
||
|
||
|
||
ifneq (,$(versioned))
|
||
# Produce three sets of rules as above for all the smaller versioned libraries.
|
||
|
||
define o-iterator-doit
|
||
$(inst_libdir)/$o: $(inst_slibdir)/$o$($o-version); $$(make-link)
|
||
endef
|
||
object-suffixes-left := $(versioned)
|
||
include $(o-iterator)
|
||
|
||
# Make symlinks in the build directory, because the versioned names might
|
||
# be referenced by a DT_NEEDED in another library.
|
||
define o-iterator-doit
|
||
$(objpfx)$o$($o-version): $(objpfx)$o; $$(make-link)
|
||
endef
|
||
object-suffixes-left := $(versioned)
|
||
include $(o-iterator)
|
||
|
||
|
||
ifeq (,$($(subdir)-version))
|
||
define o-iterator-doit
|
||
$(inst_slibdir)/$o$($o-version): $(inst_slibdir)/$(o:.so=)-$(version).so;
|
||
$$(make-shlib-link)
|
||
endef
|
||
object-suffixes-left := $(versioned)
|
||
include $(o-iterator)
|
||
|
||
define o-iterator-doit
|
||
$(inst_slibdir)/$(o:.so=)-$(version).so: $(objpfx)$o; $$(do-install-program)
|
||
endef
|
||
object-suffixes-left := $(versioned)
|
||
include $(o-iterator)
|
||
else
|
||
define o-iterator-doit
|
||
$(inst_slibdir)/$o$($o-version): \
|
||
$(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so;
|
||
$$(make-shlib-link)
|
||
endef
|
||
object-suffixes-left := $(versioned)
|
||
include $(o-iterator)
|
||
|
||
define o-iterator-doit
|
||
$(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o;
|
||
$$(do-install-program)
|
||
endef
|
||
object-suffixes-left := $(versioned)
|
||
include $(o-iterator)
|
||
endif
|
||
endif
|
||
|
||
define do-install-so
|
||
$(do-install-program)
|
||
$(patsubst %,ln -s -f $(@F) $(@D)/$(patsubst %$*.so,%,$(<F))$(libprefix)$*.so,\
|
||
$(filter-out %.so,$@))
|
||
endef
|
||
|
||
so-versions := $(sort $(foreach so,$(install-lib.so),.so$($(so)-version)))
|
||
$(foreach v,$(so-versions),\
|
||
$(inst_slibdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so
|
||
$(do-install-so)
|
||
$(foreach v,$(so-versions),\
|
||
$(inst_slibdir)/$(libprefix)%$v): $(common-objpfx)%.so
|
||
$(do-install-so)
|
||
endif
|
||
|
||
ifdef install-bin
|
||
$(addprefix $(inst_bindir)/,$(install-bin)): $(inst_bindir)/%: $(objpfx)%
|
||
$(do-install-program)
|
||
endif
|
||
ifdef install-rootsbin
|
||
$(addprefix $(inst_rootsbindir)/,$(install-rootsbin)):
|
||
$(inst_rootsbindir)/%: $(objpfx)%
|
||
$(do-install-program)
|
||
endif
|
||
ifdef install-sbin
|
||
$(addprefix $(inst_sbindir)/,$(install-sbin)): $(inst_sbindir)/%: $(objpfx)%
|
||
$(do-install-program)
|
||
endif
|
||
ifdef install-lib
|
||
install-lib.a := $(filter lib%.a,$(install-lib))
|
||
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
|
||
ifdef install-lib-non.a
|
||
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
|
||
$(inst_libdir)/$(libprefix)%: $(objpfx)%
|
||
$(do-install)
|
||
endif
|
||
ifdef install-lib.a
|
||
$(install-lib.a:lib%.a=$(inst_libdir)/lib$(libprefix)%.a): \
|
||
$(inst_libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a
|
||
$(do-install)
|
||
$(patsubst %,$(RANLIB) $@,$(filter-out $(non-lib.a),$(<F)))
|
||
endif
|
||
endif
|
||
ifdef install-data
|
||
$(addprefix $(inst_datadir)/,$(install-data)): $(inst_datadir)/%: %;
|
||
$(do-install)
|
||
endif
|
||
headers := $(strip $(headers))
|
||
ifdef headers
|
||
$(addprefix $(inst_includedir)/,$(headers)): $(inst_includedir)/%: %;
|
||
$(do-install)
|
||
endif # headers
|
||
|
||
.PHONY: install-bin-nosubdir install-rootsbin-nosubdir install-sbin-nosubdir \
|
||
install-lib-nosubdir install-data-nosubdir install-headers-nosubdir
|
||
install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
|
||
install-rootsbin-nosubdir: \
|
||
$(addprefix $(inst_rootsbindir)/,$(install-rootsbin))
|
||
install-sbin-nosubdir: $(addprefix $(inst_sbindir)/,$(install-sbin))
|
||
install-lib-nosubdir: $(addprefix $(inst_libdir)/,\
|
||
$(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-others-nosubdir: $(install-others)
|
||
|
||
# We need all the `-nosubdir' targets so that `install' in the parent
|
||
# doesn't depend on several things which each iterate over the subdirs.
|
||
# This rule makes `install-FOO' always use `install-FOO-nosubdir' as a
|
||
# subroutine. Then in the parent `install-FOO' also causes subdir makes.
|
||
install-%:: install-%-nosubdir ;
|
||
|
||
.PHONY: install install-no-libc.a-nosubdir
|
||
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
|
||
install-bin-nosubdir install-lib-nosubdir \
|
||
install-others-nosubdir install-rootsbin-nosubdir \
|
||
install-sbin-nosubdir
|
||
install: install-no-libc.a-nosubdir
|
||
|
||
# Command to compile $< in $(objdir) using the native libraries.
|
||
define native-compile
|
||
$(make-target-directory)
|
||
$(patsubst %/,cd %;,$(objpfx)) \
|
||
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
|
||
$(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
|
||
endef
|
||
|
||
# Command to compile $< in $(common-objdir) using the native libraries.
|
||
# We must cd to $(objdir) anyway so that $(..)config.h is valid.
|
||
define common-objdir-compile
|
||
$(patsubst %/,cd %;,$(objpfx)) \
|
||
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
|
||
$(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(..)$(@F)
|
||
endef
|
||
|
||
# We always want to use configuration definitions.
|
||
# Note that this is only used for commands running in $(objpfx).
|
||
ALL_BUILD_CFLAGS = $(BUILD_CFLAGS) -include $(..)config.h
|
||
|
||
# Support the GNU standard name for this target.
|
||
.PHONY: check
|
||
check: tests
|
||
|
||
.PHONY: TAGS
|
||
TAGS: $(objpfx)distinfo $(..)MakeTAGS
|
||
$(MAKE) $(addprefix -f ,$^) $@
|
||
|
||
$(..)po/%.pot: $(objpfx)distinfo $(..)MakeTAGS FORCE
|
||
$(MAKE) $(addprefix -f ,$(filter-out FORCE,$^)) $@
|
||
FORCE:
|
||
|
||
|
||
.PHONY: echo-headers
|
||
echo-headers:
|
||
@echo $(headers)
|
||
|
||
|
||
# Common cleaning targets.
|
||
|
||
.PHONY: common-mostlyclean common-clean mostlyclean clean
|
||
clean: common-clean
|
||
mostlyclean: common-mostlyclean
|
||
|
||
# Remove the object files.
|
||
common-mostlyclean:
|
||
-rm -f $(addprefix $(objpfx),$(tests) $(test-srcs) $(others) \
|
||
$(addsuffix .o,$(tests) $(test-srcs) \
|
||
$(others)) \
|
||
$(addsuffix .out,$(tests) $(test-srcs)))
|
||
-rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib))
|
||
-rm -f core $(common-objpfx)stub-$(subdir)
|
||
$(rmobjs)
|
||
define rmobjs
|
||
$(foreach o,$(object-suffixes),
|
||
-rm -f $(objpfx)stamp$o $(o-objects))
|
||
endef
|
||
|
||
# Also remove the dependencies and generated source files.
|
||
common-clean: common-mostlyclean
|
||
-rm -f $(addprefix $(objpfx),$(generated)) $(+depfiles)
|
||
-rm -fr $(addprefix $(objpfx),$(generated-dirs))
|
||
-rm -f $(addprefix $(common-objpfx),$(common-generated))
|
||
-rm -f $(objpfx)distinfo
|
||
|
||
# Produce a file `stub-$(subdir)' which contains `#define __stub_FUNCTION'
|
||
# for each function which is a stub. We grovel over all the .d files
|
||
# looking for references to source files in sysdeps/stub. Then we grovel
|
||
# over each referenced source file to see what stub function it defines.
|
||
|
||
.PHONY: stubs # The parent Makefile calls this target.
|
||
stubs: $(common-objpfx)stub-$(subdir)
|
||
s = $(sysdep_dir)/stub
|
||
$(common-objpfx)stub-$(subdir): $(+depfiles)
|
||
# Use /dev/null since `...` might expand to empty.
|
||
(s=`cd $s; /bin/pwd`; \
|
||
$(patsubst %/,cd %;,$(objpfx)) \
|
||
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
|
||
`sed -n 's@^.*$s/\([a-z0-9_-]*\.c\).*$$@'"$$s"/'\1@p' \
|
||
$(patsubst $(objpfx)%,%,$^) /dev/null` \
|
||
/dev/null) > $@T
|
||
mv -f $@T $@
|
||
|
||
# Make the distribution tar file.
|
||
|
||
.PHONY: dist
|
||
dist: $(objpfx)distinfo $(..)Make-dist
|
||
$(MAKE) -f $< -f $(word 2,$^) $(Make-dist-args)
|
||
|
||
# Avoid depending on source files found in sysdeps dirs,
|
||
# because the references affect implicit rule selection.
|
||
dist: $(filter-out %.c %.S %.s,$(distribute))
|
||
|
||
# We used to simply export all these variables, but that frequently made the
|
||
# environment get too large. Instead, we write all the information into
|
||
# a generated makefile fragment `distinfo', and then include it with -f in
|
||
# the sub-make that makes the distribution (above).
|
||
$(objpfx)distinfo: Makefile $(..)Makerules \
|
||
$(wildcard $(foreach dir,$(sysdirs),$(dir)/Makefile))
|
||
$(make-target-directory)
|
||
$(distinfo-vars)
|
||
mv -f $@.new $@
|
||
.PHONY: subdir_distinfo
|
||
subdir_distinfo: $(objpfx)distinfo
|
||
|
||
define distinfo-vars
|
||
rm -f $@.new
|
||
echo > $@.new 'subdir := $(subdir)'
|
||
$(foreach var,subdir-dirs sources elided-routines sysdep_routines \
|
||
headers sysdep_headers distribute dont_distribute generated \
|
||
others tests test-srcs extra-libs $(extra-libs:%=%-routines) \
|
||
versioned \
|
||
$(addprefix install-,lib lib.so data bin sbin others),
|
||
echo >> $@.new '$(subdir)-$(var) := $($(var))'
|
||
echo >> $@.new '$(var) = $$($(subdir)-$(var))')
|
||
endef
|
||
|
||
ifneq (,$(strip $(gpl2lgpl)))
|
||
ifneq (,$(wildcard $(..)gpl2lgpl.sed))
|
||
# Snarf from the master source and frob the copying notice.
|
||
$(gpl2lgpl): %: $(..)gpl2lgpl.sed /home/gd/gnu/lib/%
|
||
sed -f $^ > $@-tmp
|
||
# So I don't edit them by mistake.
|
||
chmod a-w $@-tmp
|
||
mv -f $@-tmp $@
|
||
test ! -d CVS || cvs commit -m'Updated from $^' $@
|
||
endif
|
||
endif
|