build: Resurrect running mescc from elsewhere.
After setting-up a buld environment, running something like ~/src/mes/wip/pre-inst-env mescc -v -v ~/src/mes/wip/scaffold/main.c works again. TODO: Make this less complex. * The mescc-lib (and gcc-lib) build directories do not help; these were introduced to support `wip-autotools'. * We used to opt for short *PATH variables: "." rather than /gnu/store/.... or /home/janneke/src/mes/master to avoid filling the MES arena. XXX Has this been solved? * In the Guix bootstrap, we run module/mescc.scm directly $MES -e '(mescc)' module/mescc.scm ...so that's why these overrides started to appear in multiple places. * build-aux/pre-inst-env.in (MES_UNINSTALLED): New variable. * scripts/mescc.in (includedir,libdir): Use it to override these. * module/mescc/mescc.scm (arch-find): Use it to add <lib>-messc.
This commit is contained in:
parent
0650e08744
commit
be87ada6b5
|
@ -48,6 +48,9 @@ export bindir
|
|||
GUIX_PACKAGE_PATH="$abs_top_srcdir/guix${GUIX_PACKAGE_PATH:+:}$GUIX_PACKAGE_PATH"
|
||||
export GUIX_PACKAGE_PATH
|
||||
|
||||
MES_UNINSTALLED=1
|
||||
export MES_UNINSTALLED
|
||||
|
||||
LANG=
|
||||
LC_ALL=
|
||||
|
||||
|
|
|
@ -267,11 +267,21 @@
|
|||
(define* (arch-find options file-name #:key kernel)
|
||||
(let* ((srcdest (or (getenv "srcdest") ""))
|
||||
(srcdir-lib (string-append srcdest "lib"))
|
||||
(srcdir-mescc-lib (string-append srcdest "mescc-lib"))
|
||||
(libdir (option-ref options 'libdir "lib"))
|
||||
(libdir-mescc (string-append
|
||||
(dirname (option-ref options 'libdir "lib"))
|
||||
"/mescc-lib"))
|
||||
(arch (string-append (arch-get options) "-mes"))
|
||||
(path (cons* "."
|
||||
srcdir-lib
|
||||
(option-ref options 'libdir "lib")
|
||||
(filter-map (multi-opt 'library-dir) options)))
|
||||
(path (append (if (getenv "MES_UNINSTALLED")
|
||||
(list srcdir-mescc-lib
|
||||
srcdir-lib
|
||||
libdir-mescc)
|
||||
'())
|
||||
(list libdir)
|
||||
(or (and=> (getenv "LIBRARY_PATH")
|
||||
(cut string-split <> #\:)) '())
|
||||
(filter-map (multi-opt 'library-dir) options)))
|
||||
(arch-file-name (string-append arch "/" file-name))
|
||||
(arch-file-name (if kernel (string-append kernel "/" arch-file-name)
|
||||
arch-file-name))
|
||||
|
|
|
@ -37,6 +37,11 @@ export MES_PREFIX
|
|||
GUILE_LOAD_PATH=@guile_site_dir@${GUILE_LOAD_PATH+:}${GUILE_LOAD_PATH}
|
||||
export GUILE_LOAD_PATH
|
||||
|
||||
if test -n "$MES_UNINSTALLED"; then
|
||||
includedir=${includedir-${abs_top_srcdir}/include}
|
||||
libdir=${libdir-${abs_top_builddir}/lib}
|
||||
fi
|
||||
|
||||
MES=${MES-@prefix@/bin/mes}
|
||||
bindir=${bindir-@bindir@}
|
||||
includedir=${includedir-@includedir@}
|
||||
|
|
Loading…
Reference in a new issue