From ce3d25395e9f86a6384896761013b91620a73704 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 9 Aug 2018 11:00:10 +0200 Subject: [PATCH] build: Non-bootstrap install fixes. * configure (main): Fix default bindir. * build-aux/GNUmakefile.in (PHONY_TARGETS): Remove src/mes. Fixes re-build upon install. * build-aux/install.sh.in: Fix tar arguments for scaffold files. Expand install directories. --- build-aux/GNUmakefile.in | 39 +++++++++++++++++++++++++++++++-------- build-aux/install.sh.in | 18 +++++++++--------- configure | 5 +++-- configure.sh | 17 +++++++++-------- 4 files changed, 52 insertions(+), 27 deletions(-) diff --git a/build-aux/GNUmakefile.in b/build-aux/GNUmakefile.in index 9df74a3e..8e3d412d 100644 --- a/build-aux/GNUmakefile.in +++ b/build-aux/GNUmakefile.in @@ -33,7 +33,6 @@ include .config.make endif PHONY_TARGETS:=\ - src/mes\ TAGS\ all-go\ all\ @@ -76,11 +75,15 @@ PHONY_TARGETS:=\ default: all -all: build doc +all: doc + +doc: build build: ./build.sh +src/mes: build + gcc: ${srcdest}build-aux/build-cc.sh @@ -133,7 +136,7 @@ check: installcheck: true -install: src/mes +install: ./install.sh uninstall: @@ -156,7 +159,7 @@ endif $(MESCC_TOOLS_SEED)/libs cd $(MESCC_TOOLS_SEED) && MES_PREFIX=$(PWD) ./bootstrap.sh -doc/version.texi: doc/mes.texi GNUmakefile +doc/version.texi: ${srcdest}doc/mes.texi GNUmakefile @mkdir -p $(@D) (set `LANG= date -r $< +'%d %B %Y'`;\ echo "@set UPDATED $$1 $$2 $$3"; \ @@ -206,12 +209,19 @@ endif man: doc/mes.1 doc/mescc.1 -src/mes: build +# disable builtin-rules +%.o: %.s +%.s: %.S +%.o: %.S +%.o: %.c +%: %.S +%: %.o +%: %.c -doc/mes.1: src/mes +doc/mes.1: src/mes | build MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) $( $@ -doc/mescc.1: src/mes scripts/mescc +doc/mescc.1: src/mes scripts/mescc | build MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) $( $@ html: doc/html/index.html @@ -240,7 +250,7 @@ WEB_IMAGES:=\ doc/images/gcc-mesboot-graph.png web: info $(WEB_IMAGES) - GENDOCS_TEMPLATE_DIR=doc build-aux/gendocs.sh -I doc -s doc/mes.texi -o doc/web/manual --email bug-mes@gnu.org mes "GNU Mes manual" + GENDOCS_TEMPLATE_DIR=doc build-aux/gendocs.sh -I doc -s ${srcdest}doc/mes.texi -o doc/web/manual --email bug-mes@gnu.org mes "GNU Mes manual" ### dist COMMIT=$(shell test -d ${srcdest}.git && (cd ${srcdir} && git describe --dirty 2>/dev/null) || cat ${srcdest}.tarball-version) @@ -293,6 +303,19 @@ endif release: update-hash ./pre-inst-env $(GUIX) build mes@$(VERSION) --with-source=$(TARBALL) +GPG_KEY_ID:=1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273 +gen-announce: + ../gnulib/build-aux/announce-gen\ + --release-type=alpha\ + --package-name=mes\ + --previous-version='0.16 '\ + --current-version=$(VERSION)\ + --gpg-key-id=$(GPG_KEY_ID)\ + --url-directory=https://alpha.gnu.org/gnu/mes\ + --news=NEWS\ + > doc/announce/ANNOUNCE-$(VERSION)- + + installdirs: mkinstalldirs mkdir -p\ $(DESTDIR)$(bindir)\ diff --git a/build-aux/install.sh.in b/build-aux/install.sh.in index bd583522..cb4639cc 100755 --- a/build-aux/install.sh.in +++ b/build-aux/install.sh.in @@ -43,14 +43,14 @@ if [ -z "$GUILE" -o "$GUILE" = true ]; then else GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')} fi -bindir=${bindir-$prefix/bin} -datadir=${datadir-$prefix/share} -docdir=${docdir-$datadir/doc/mes-$VERSION} -infodir=${infodir-$datadir/info} -mandir=${mandir-$datadir/man} -moduledir=${moduledir-$datadir/mes/module} -guile_site_dir=${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION} -guile_site_ccache_dir=${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache} +bindir=$(eval echo ${bindir-$prefix/bin}) +datadir=$(eval echo ${datadir-$prefix/share}) +docdir=$(eval echo ${docdir-$datadir/doc/mes-$VERSION}) +infodir=$(eval echo ${infodir-$datadir/info}) +mandir=$(eval echo ${mandir-$datadir/man}) +moduledir=$(eval echo ${moduledir-$datadir/mes/module}) +guile_site_dir=$(eval echo ${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION}) +guile_site_ccache_dir=$(eval echo ${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache}) mkdir -p $DESTDIR$bindir cp src/mes $DESTDIR$bindir/mes @@ -95,7 +95,7 @@ mkdir -p $DESTDIR$MES_PREFIX if [ -z "$srcdest" ]; then tar -cf- include lib | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- --exclude='*.go' module | tar -xf- -C $DESTDIR$MES_PREFIX - tar -cf- scaffold --exclude='*.gcc*' --exclude='*.mes*' | tar -xf- -C $DESTDIR$MES_PREFIX + tar -cf- --exclude='*.gcc*' --exclude='*.mes*' scaffold | tar -xf- -C $DESTDIR$MES_PREFIX else tar -cf- -C ${srcdest} include lib | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- -C lib | tar -xf- -C $DESTDIR$MES_PREFIX diff --git a/configure b/configure index 2e9ba9e5..fbb24291 100755 --- a/configure +++ b/configure @@ -305,11 +305,12 @@ Some influential environment variables: (mandir (option-ref options 'infodir "${prefix}/share/man")) (sysconfdir (option-ref options 'sysconfdir "${prefix}/etc")) - (bindir (option-ref options 'bindir "${prefix}/etc")) + (bindir (option-ref options 'bindir "${prefix}/bin")) (datadir (option-ref options 'datadir "${prefix}/share")) (docdir (option-ref options 'docdir "${datadir}/doc/mes-${VERSION}")) (libdir (option-ref options 'libdir "${prefix}/lib")) (moduledir "${datadir}/mes/module") + (moduledir/ (gulp-pipe (string-append "echo " prefix "/share/mes/module/"))) (guile-effective-version (effective-version)) (guile-site-dir (if (equal? prefix ".") (canonicalize-path ".") (string-append "${prefix}/share/guile/site/" guile-effective-version))) @@ -475,7 +476,7 @@ Some influential environment variables: ("@guile_site_dir@" . ,guile-site-dir) ("@guile_site_ccache_dir@" . ,guile-site-ccache-dir) ("@VERSION@" . ,VERSION) - ("mes/module/" . ,(string-append moduledir "/"))))) + ("mes/module/" . ,(string-append moduledir/))))) (for-each (lambda (o) (let* ((src (string-append srcdest o)) (target (string-drop-right o 3)) diff --git a/configure.sh b/configure.sh index 76d44cdc..3918c2e3 100755 --- a/configure.sh +++ b/configure.sh @@ -52,13 +52,14 @@ if [ -z "$GUILE" -o "$GUILE" = true ]; then else GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')} fi -datadir=${datadir-$prefix/share} -docdir=${docdir-$datadir/doc/mes-$VERSION} -infodir=${infodir-$datadir/info} -mandir=${mandir-$datadir/man} -moduledir=${moduledir-$datadir/mes/module} -guile_site_dir=${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION} -guile_site_ccache_dir=${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache} +datadir=$(eval echo ${datadir-$prefix/share}) +docdir=$(eval echo ${docdir-$datadir/doc/mes-$VERSION}) +infodir=$(eval echo ${infodir-$datadir/info}) +mandir=$(eval echo ${mandir-$datadir/man}) +moduledir=$(eval echo ${moduledir-$datadir/mes/module}) +moduledir_="$moduledir/" +guile_site_dir=$(eval echo ${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION}) +guile_site_ccache_dir=$(eval echo ${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache}) subst () { sed \ @@ -73,7 +74,7 @@ subst () { -e s,"@guile_site_dir@,$guile_site_dir,"\ -e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\ -e s,"@VERSION@,$VERSION,"\ - -e s,"mes/module/,$moduledir,"\ + -e s,"mes/module/,$moduledir/,"\ $1 > $2 }