[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] configmake: prepend /@unixroot on OS/2 kLIBC
From: |
KO Myung-Hun |
Subject: |
[PATCH] configmake: prepend /@unixroot on OS/2 kLIBC |
Date: |
Sat, 13 Dec 2014 14:28:39 +0900 |
/@unixroot is replaced by $UNIXROOT, which points a drive on which
programs following FHS are installed. This enables a program to find
a proper directory even if it is executed on a differrent drive from
the drive on which it is installed.
For examples, consider a program package installed on f: with
--prefix=/usr. That is, it is installed in f:/usr. Now, if it is
executed on a drive e: like this,
E:>f:/usr/bin/program
then PREFIX will be /usr. However /usr is on drive f: not drive e:.
So it will fail to find something based on PREFIX.
If using /@unixroot, it will be replaced by $UNIXROOT. In this case,
if UNIXROOT is set to 'f:', and PREFIX is /@unixroot/usr, then it will
translated to f:/usr.
* modules/configmake (UNIXROOT): New. /@unixroot on kLIBC, otherwise
empty string.
(PREFIX, EXEC_PREFIX, BINDIR, SBINDIR, LIBEXECDIR, DATAROOTDIR,
DATADIR, SYSCONFDIR, SHAREDSTATEDIR, LOCALSTATEDIR, RUNSTATEDIR,
INCLUDEDIR, OLDINCLUDEDIR, DOCDIR, INFODIR, HTMLDIR, DVIDIR, PDFDIR,
PSDIR, LIBDIR, LISPDIR, LOCALEDIR, MANDIR, MANEXT, PKGDATADIR,
PKGINCLUDEDIR, PKGLIBDIR, PKGLIBEXECDIR): Prepend UNIXROOT.
---
modules/configmake | 63 +++++++++++++++++++++++++++++-------------------------
1 file changed, 34 insertions(+), 29 deletions(-)
diff --git a/modules/configmake b/modules/configmake
index 5a60f4f..aa9e6a9 100644
--- a/modules/configmake
+++ b/modules/configmake
@@ -17,35 +17,40 @@ Makefile.am:
configmake.h: Makefile
$(AM_V_GEN)rm -f address@hidden && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- echo '#define PREFIX "$(prefix)"'; \
- echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
- echo '#define BINDIR "$(bindir)"'; \
- echo '#define SBINDIR "$(sbindir)"'; \
- echo '#define LIBEXECDIR "$(libexecdir)"'; \
- echo '#define DATAROOTDIR "$(datarootdir)"'; \
- echo '#define DATADIR "$(datadir)"'; \
- echo '#define SYSCONFDIR "$(sysconfdir)"'; \
- echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
- echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
- echo '#define RUNSTATEDIR "$(runstatedir)"'; \
- echo '#define INCLUDEDIR "$(includedir)"'; \
- echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
- echo '#define DOCDIR "$(docdir)"'; \
- echo '#define INFODIR "$(infodir)"'; \
- echo '#define HTMLDIR "$(htmldir)"'; \
- echo '#define DVIDIR "$(dvidir)"'; \
- echo '#define PDFDIR "$(pdfdir)"'; \
- echo '#define PSDIR "$(psdir)"'; \
- echo '#define LIBDIR "$(libdir)"'; \
- echo '#define LISPDIR "$(lispdir)"'; \
- echo '#define LOCALEDIR "$(localedir)"'; \
- echo '#define MANDIR "$(mandir)"'; \
- echo '#define MANEXT "$(manext)"'; \
- echo '#define PKGDATADIR "$(pkgdatadir)"'; \
- echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
- echo '#define PKGLIBDIR "$(pkglibdir)"'; \
- echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
- } | sed '/""/d' > address@hidden && \
+ echo '#ifdef __KLIBC__'; \
+ echo '# define UNIXROOT "/@unixroot"'; \
+ echo '#else'; \
+ echo '# define UNIXROOT ""'; \
+ echo '#endif'; \
+ echo '#define PREFIX UNIXROOT "$(prefix)"'; \
+ echo '#define EXEC_PREFIX UNIXROOT "$(exec_prefix)"'; \
+ echo '#define BINDIR UNIXROOT "$(bindir)"'; \
+ echo '#define SBINDIR UNIXROOT "$(sbindir)"'; \
+ echo '#define LIBEXECDIR UNIXROOT "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR UNIXROOT "$(datarootdir)"'; \
+ echo '#define DATADIR UNIXROOT "$(datadir)"'; \
+ echo '#define SYSCONFDIR UNIXROOT "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR UNIXROOT "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR UNIXROOT "$(localstatedir)"'; \
+ echo '#define RUNSTATEDIR UNIXROOT "$(runstatedir)"'; \
+ echo '#define INCLUDEDIR UNIXROOT "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR UNIXROOT "$(oldincludedir)"'; \
+ echo '#define DOCDIR UNIXROOT "$(docdir)"'; \
+ echo '#define INFODIR UNIXROOT "$(infodir)"'; \
+ echo '#define HTMLDIR UNIXROOT "$(htmldir)"'; \
+ echo '#define DVIDIR UNIXROOT "$(dvidir)"'; \
+ echo '#define PDFDIR UNIXROOT "$(pdfdir)"'; \
+ echo '#define PSDIR UNIXROOT "$(psdir)"'; \
+ echo '#define LIBDIR UNIXROOT "$(libdir)"'; \
+ echo '#define LISPDIR UNIXROOT "$(lispdir)"'; \
+ echo '#define LOCALEDIR UNIXROOT "$(localedir)"'; \
+ echo '#define MANDIR UNIXROOT "$(mandir)"'; \
+ echo '#define MANEXT UNIXROOT "$(manext)"'; \
+ echo '#define PKGDATADIR UNIXROOT "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR UNIXROOT "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR UNIXROOT "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR UNIXROOT "$(pkglibexecdir)"'; \
+ } | sed '/UNIXROOT ""/d' > address@hidden && \
mv -f address@hidden $@
BUILT_SOURCES += configmake.h
--
1.8.5.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] configmake: prepend /@unixroot on OS/2 kLIBC,
KO Myung-Hun <=