# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../uclibc/fix_install_headers.patch # Copyright (C) 2008 - 2009 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- Copying the files to /usr/include, then removing them again for deselected features is broken to begin with. Patch changes this to remove first locally, then do the tar. Roland Schulz Patch based on former 'fix_shares_00dirtree.patch', but since 0.9.30 tar is no longer used to copy the header files, and hence no shared files conflict. Michael Tross --- ./Makefile.in.orig 2008-10-18 14:52:17.000000000 +0200 +++ ./Makefile.in 2008-11-01 22:22:45.000000000 +0100 @@ -193,171 +193,171 @@ # Installs header files. install_headers: headers $(top_builddir)extra/scripts/unifdef - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include - top_builddir=$(top_builddir) \ - $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include - printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \ - $(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h - echo '/* Dont use _syscall#() macros; use the syscall() function */' > \ - $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/_lfs_64.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_uintmaxtostr.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_sigaction.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_stat.h + $(RM) include/dl-osinfo.h + $(RM) include/_lfs_64.h + $(RM) include/bits/uClibc_uintmaxtostr.h + $(RM) include/bits/kernel_sigaction.h + $(RM) include/bits/kernel_stat.h ifneq ($(UCLIBC_HAS_FLOATS),y) # Remove floating point related headers since float support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/complex.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fpu_control.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ieee754.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/math.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h + $(RM) include/complex.h + $(RM) include/fpu_control.h + $(RM) include/ieee754.h + $(RM) include/math.h + $(RM) include/tgmath.h + $(RM) include/bits/uClibc_fpmax.h endif ifneq ($(UCLIBC_HAS_FENV),y) - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fenv.h \ - $(PREFIX)$(DEVEL_PREFIX)include/bits/fenv.h \ - $(PREFIX)$(DEVEL_PREFIX)include/bits/fenvinline.h + $(RM) include/fenv.h \ + include/bits/fenv.h \ + include/bits/fenvinline.h endif ifneq ($(UCLIBC_HAS_WCHAR),y) # Remove wide char headers since wide char support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wctype.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wchar.h + $(RM) include/wctype.h + $(RM) include/wchar.h endif ifneq ($(UCLIBC_HAS_LOCALE),y) # Remove iconv header since locale support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/iconv.h + $(RM) include/iconv.h endif ifneq ($(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF),y) # Remove printf header since custom print specifier support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/printf.h + $(RM) include/printf.h endif ifneq ($(UCLIBC_HAS_XLOCALE),y) # Remove xlocale header since extended locale support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/xlocale.h + $(RM) include/xlocale.h endif ifneq ($(UCLIBC_HAS_GETTEXT_AWARENESS),y) # Remove libintl header since gettext support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/libintl.h + $(RM) include/libintl.h endif ifneq ($(UCLIBC_HAS_REGEX),y) # Remove regex headers since regex support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regex.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regexp.h + $(RM) include/regex.h + $(RM) include/regexp.h endif ifneq ($(UCLIBC_HAS_WORDEXP),y) # Remove wordexp header since wordexp support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wordexp.h + $(RM) include/wordexp.h endif ifneq ($(UCLIBC_HAS_FTW),y) # Remove ftw header since ftw support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ftw.h + $(RM) include/ftw.h endif ifneq ($(UCLIBC_HAS_GLOB),y) # Remove glob header since glob support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/glob.h + $(RM) include/glob.h endif ifneq ($(UCLIBC_HAS_GNU_GETOPT),y) ifneq ($(UCLIBC_HAS_GETOPT_LONG),y) # Remove getopt header since gnu getopt support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/getopt.h + $(RM) include/getopt.h endif endif ifneq ($(UCLIBC_HAS_SHADOW),y) # Remove shadow header since shadow password support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/shadow.h + $(RM) include/shadow.h endif ifneq ($(PTHREADS_DEBUG_SUPPORT),y) # Remove thread_db header since thread debug support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/thread_db.h + $(RM) include/thread_db.h endif ifneq ($(UCLIBC_HAS_THREADS),y) # Remove pthread headers since thread support is disabled. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/*thread*.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h + $(RM) include/*thread*.h + $(RM) include/semaphore.h + $(RM) include/bits/*thread*.h endif ifneq ($(HAVE_SHARED),y) # Remove dlfcn header if we don't have shared libraries. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dlfcn.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/dlfcn.h + $(RM) include/dlfcn.h + $(RM) include/bits/dlfcn.h endif ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) # Remove this as it is only used internally. - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tls.h + $(RM) include/tls.h endif ifneq ($(UCLIBC_HAS_GNU_ERROR),y) # Remove error.h upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/error.h + $(RM) include/error.h endif ifneq ($(UCLIBC_HAS_BSD_ERR),y) # Remove err.h upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/err.h + $(RM) include/err.h endif ifneq ($(UCLIBC_SUSV3_LEGACY),y) # Remove timeb.h since the LEGACY ftime() was disabled upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/timeb.h + $(RM) include/sys/timeb.h endif ifneq ($(UCLIBC_HAS_EPOLL),y) # Remove epoll.h since epoll_*() were disabled upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/epoll.h + $(RM) include/sys/epoll.h endif ifneq ($(UCLIBC_HAS_XATTR),y) # Remove xattr.h since extended attributes were disabled upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/xattr.h + $(RM) include/sys/xattr.h endif ifneq ($(UCLIBC_HAS_PTY),y) # Remove pty.h since PTY support was disabled upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/pty.h + $(RM) include/pty.h endif ifneq ($(UCLIBC_LINUX_SPECIFIC),y) # Remove linux-specific headers as requested - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/inotify.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/perm.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/personality.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/prctl.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/reboot.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sendfile.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/fsuid.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/signalfd.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/swap.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sysctl.h + $(RM) include/sys/inotify.h + $(RM) include/sys/perm.h + $(RM) include/sys/personality.h + $(RM) include/sys/prctl.h + $(RM) include/sys/reboot.h + $(RM) include/sys/sendfile.h + $(RM) include/sys/fsuid.h + $(RM) include/sys/signalfd.h + $(RM) include/sys/swap.h + $(RM) include/sys/sysctl.h endif ifneq ($(UCLIBC_SV4_DEPRECATED),y) # Remove ustat.h since deprecated SV4 support was disabled upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ustat.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/ustat.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/ustat.h + $(RM) include/ustat.h + $(RM) include/sys/ustat.h + $(RM) include/bits/ustat.h endif ifeq ($(UCLIBC_HAS_REALTIME)$(UCLIBC_HAS_ADVANCED_REALTIME),) # Remove SUSv-realtime related message-queue headers upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/mqueue.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h + $(RM) include/mqueue.h + $(RM) include/sys/mqueue.h + $(RM) include/bits/mqueue.h endif ifneq ($(UCLIBC_HAS_REALTIME),y) # Remove SUSv-realtime related headers upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sched.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sched.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sched.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/semaphore.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/semaphore.h + $(RM) include/sched.h + $(RM) include/sys/sched.h + $(RM) include/bits/sched.h + $(RM) include/semaphore.h + $(RM) include/sys/semaphore.h + $(RM) include/bits/semaphore.h endif ifneq ($(UCLIBC_HAS_SOCKET),y) # Remove socket related headers upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socket.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/socket.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socketvar.h + $(RM) include/sys/socket.h + $(RM) include/bits/socket.h + $(RM) include/sys/socketvar.h endif ifneq ($(UCLIBC_HAS_CRYPT),y) # Remove crypt.h since libcrypt was disabled upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/crypt.h + $(RM) include/crypt.h endif ifneq ($(UCLIBC_SUPPORT_AI_ADDRCONFIG),y) # Remove ifaddrs.h since the corresponding functionality is disabled - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ifaddrs.h + $(RM) include/ifaddrs.h endif + $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include + top_builddir=$(top_builddir) \ + $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include + printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \ + $(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h + echo '/* Dont use _syscall#() macros; use the syscall() function */' > \ + $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h # Installs development library links. install_dev: install_headers all