Vagrant Cascadian writes: @Matt: some Nyacc patches attached.
>> I took a quick stab at this, and it first requires packaging: >> >> https://github.com/oriansj/mescc-tools > > Packaging branch for mescc-tools: > > https://salsa.debian.org/vagrant/mescc-tools > > Compiles, maybe it even works! Wow, thanks! >> https://gitlab.com/janneke/nyacc > > Packaging branch for nyacc: > > https://salsa.debian.org/vagrant/nyacc > > Fails to build as it installs info pages to /share/info. Doesn't appear > to respect DESTDIR= ... but setting --infodir doesn't work as I would > expect either, suddently appending --prefix to it. I have looked into this; please see `debian' branch at http://gitlab.com/janneke/nyacc I have created patches for Nyacc to aid Debian packaging; see attached. They are on my debian branch, as well as on my master. I also made some WIP changes to the debian packaging: most notably: I could not find guile-2.2. > And also a packaging branch for mes itself, but of course can't test it > until nyacc is working: > > https://salsa.debian.org/vagrant/mes I will have a look at this later. You will probably want to rebase on my `wip-gnu' branch: it has (experimental) DESTDIR and other Debian build support (e.g.: do not assume /bin/sh is bash, resurrect guile-2.0). Greetings, janneke
>From 2a4f8df63b5757152e3175c517e79e735197fce8 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <jann...@gnu.org> Date: Sun, 8 Jul 2018 11:00:29 +0200 Subject: [PATCH 1/3] build: Support DESTDIR. --- doc/nyacc/Makefile.nyacc | 2 +- module/Makefile.nyacc | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/nyacc/Makefile.nyacc b/doc/nyacc/Makefile.nyacc index b70d2df..dbb199f 100644 --- a/doc/nyacc/Makefile.nyacc +++ b/doc/nyacc/Makefile.nyacc @@ -26,7 +26,7 @@ install: install-info .PHONY: install-info install-info: - mkdir -p $(INFODIR) + mkdir -p $(DESTDIR)$(INFODIR) $(INSTALL) nyacc-ug.info $(DESTDIR)$(INFODIR)/nyacc-ug.info .PHONY: dist-files diff --git a/module/Makefile.nyacc b/module/Makefile.nyacc index 63f7afe..dccdb5b 100644 --- a/module/Makefile.nyacc +++ b/module/Makefile.nyacc @@ -73,27 +73,27 @@ nyacc/lang/c99/mach.d/cpptab.scm : nyacc/lang/c99/cppmach.scm .PHONY: install install: install-srcs - @mkdir -p $(SITE_SCM_GO_DIR) - @echo "installing NYACC binaries in $(SITE_SCM_GO_DIR)" - @for binfile in $(NYACC_BINS); do \ - if test ! -d $(SITE_SCM_DIR)/`dirname $${binfile}`; then \ - mkdir -p $(SITE_SCM_GO_DIR)/`dirname $${binfile}`; \ + @mkdir -p $(DESTDIR)$(SITE_SCM_GO_DIR) + @echo "installing NYACC binaries in $(DESTDIR)$(SITE_SCM_GO_DIR)" + for binfile in $(NYACC_BINS); do \ + if test ! -d $(DESTDIR)$(SITE_SCM_DIR)/`dirname $${binfile}`; then \ + mkdir -p $(DESTDIR)$(SITE_SCM_GO_DIR)/`dirname $${binfile}`; \ fi; \ srcfile=`echo $${binfile} | sed -e 's/\.go$$/.scm/'`; \ - GUILE_LOAD_PATH=$(SITE_SCM_DIR) $(GUILD) compile \ - -o $(SITE_SCM_GO_DIR)/$${binfile} $(SITE_SCM_DIR)/$${srcfile}; \ + GUILE_LOAD_PATH=$(DESTDIR)$(SITE_SCM_DIR) $(GUILD) compile \ + -o $(DESTDIR)$(SITE_SCM_GO_DIR)/$${binfile} $(DESTDIR)$(SITE_SCM_DIR)/$${srcfile}; \ sleep 1; \ done .PHONY: install-srcs install-srcs: - @mkdir -p $(SITE_SCM_DIR) - @echo "installing NYACC sources in $(SITE_SCM_DIR)" + @mkdir -p $(DESTDIR)$(SITE_SCM_DIR) + @echo "installing NYACC sources in $(DESTDIR)$(SITE_SCM_DIR)" @for file in $(NYACC_SRCS); do \ - if test ! -d $(SITE_SCM_DIR)/`dirname $${file}`; then \ - mkdir -p $(SITE_SCM_DIR)/`dirname $${file}`; \ + if test ! -d $(DESTDIR)$(SITE_SCM_DIR)/`dirname $${file}`; then \ + mkdir -p $(DESTDIR)$(SITE_SCM_DIR)/`dirname $${file}`; \ fi; \ - cp $${file} $(SITE_SCM_DIR)/$${file}; \ + cp $${file} $(DESTDIR)$(SITE_SCM_DIR)/$${file}; \ done .PHONY: dist-files -- 2.18.0
>From cf1714cea2a966b129895a22349d5fa49cdde346 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <jann...@gnu.org> Date: Sun, 8 Jul 2018 12:06:12 +0200 Subject: [PATCH 2/3] configure: use /bin/bash. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 6e323a5..556a714 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/bash # # configure # -- 2.18.0
>From e80f9aa7e124ee0e4869f82ea8c4dedd9e3184e7 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <jann...@gnu.org> Date: Sun, 8 Jul 2018 12:32:16 +0200 Subject: [PATCH 3/3] configure: use eval; Makefiles do not have $(prefix) variable setup. Doing ./configure --prefix=/usr --infodir=\${prefix}/share/info otherwise results in PREFIX = /usr INFODIR = ${prefix}/share/info --- configure | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 556a714..5ae7515 100755 --- a/configure +++ b/configure @@ -55,22 +55,22 @@ while [ "$*" ]; do guild=`echo $1 | sed -e 's/^--guild=//'` ;; --prefix=*) - prefix=`echo $1 | sed -e 's/^--prefix=//'` + prefix=`eval echo $1 | sed -e 's/^--prefix=//'` ;; --site_scm_dir=*) - site_scm_dir=`echo $1 | sed -e 's/^--site_scm_dir=//'` + site_scm_dir=`eval echo $1 | sed -e 's/^--site_scm_dir=//'` ;; --site_scm_go_dir=*) - site_scm_go_dir=`echo $1 | sed -e 's/^--site_scm_go_dir=//'` + site_scm_go_dir=`eval echo $1 | sed -e 's/^--site_scm_go_dir=//'` ;; --site-scm-dir=*) - site_scm_dir=`echo $1 | sed -e 's/^--site-scm-dir=//'` + site_scm_dir=`eval echo $1 | sed -e 's/^--site-scm-dir=//'` ;; --site-scm-go-dir=*) - site_scm_go_dir=`echo $1 | sed -e 's/^--site-scm-go-dir=//'` + site_scm_go_dir=`eval echo $1 | sed -e 's/^--site-scm-go-dir=//'` ;; --infodir=*) - infodir=`echo $1 | sed -e 's/^--infodir=//'` + infodir=`eval echo $1 | sed -e 's/^--infodir=//'` ;; esac shift -- 2.18.0
-- Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com