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.
This commit is contained in:
Jan Nieuwenhuizen 2018-08-09 11:00:10 +02:00
parent 06b3451caf
commit ce3d25395e
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
4 changed files with 52 additions and 27 deletions

View file

@ -33,7 +33,6 @@ include .config.make
endif endif
PHONY_TARGETS:=\ PHONY_TARGETS:=\
src/mes\
TAGS\ TAGS\
all-go\ all-go\
all\ all\
@ -76,11 +75,15 @@ PHONY_TARGETS:=\
default: all default: all
all: build doc all: doc
doc: build
build: build:
./build.sh ./build.sh
src/mes: build
gcc: gcc:
${srcdest}build-aux/build-cc.sh ${srcdest}build-aux/build-cc.sh
@ -133,7 +136,7 @@ check:
installcheck: installcheck:
true true
install: src/mes install:
./install.sh ./install.sh
uninstall: uninstall:
@ -156,7 +159,7 @@ endif
$(MESCC_TOOLS_SEED)/libs $(MESCC_TOOLS_SEED)/libs
cd $(MESCC_TOOLS_SEED) && MES_PREFIX=$(PWD) ./bootstrap.sh 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) @mkdir -p $(@D)
(set `LANG= date -r $< +'%d %B %Y'`;\ (set `LANG= date -r $< +'%d %B %Y'`;\
echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED $$1 $$2 $$3"; \
@ -206,12 +209,19 @@ endif
man: doc/mes.1 doc/mescc.1 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) $(<F) > $@ MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) $(<F) > $@
doc/mescc.1: src/mes scripts/mescc doc/mescc.1: src/mes scripts/mescc | build
MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) $(<F) > $@ MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) $(<F) > $@
html: doc/html/index.html html: doc/html/index.html
@ -240,7 +250,7 @@ WEB_IMAGES:=\
doc/images/gcc-mesboot-graph.png doc/images/gcc-mesboot-graph.png
web: info $(WEB_IMAGES) 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 ### dist
COMMIT=$(shell test -d ${srcdest}.git && (cd ${srcdir} && git describe --dirty 2>/dev/null) || cat ${srcdest}.tarball-version) 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 release: update-hash
./pre-inst-env $(GUIX) build mes@$(VERSION) --with-source=$(TARBALL) ./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 installdirs: mkinstalldirs
mkdir -p\ mkdir -p\
$(DESTDIR)$(bindir)\ $(DESTDIR)$(bindir)\

View file

@ -43,14 +43,14 @@ if [ -z "$GUILE" -o "$GUILE" = true ]; then
else else
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')} GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')}
fi fi
bindir=${bindir-$prefix/bin} bindir=$(eval echo ${bindir-$prefix/bin})
datadir=${datadir-$prefix/share} datadir=$(eval echo ${datadir-$prefix/share})
docdir=${docdir-$datadir/doc/mes-$VERSION} docdir=$(eval echo ${docdir-$datadir/doc/mes-$VERSION})
infodir=${infodir-$datadir/info} infodir=$(eval echo ${infodir-$datadir/info})
mandir=${mandir-$datadir/man} mandir=$(eval echo ${mandir-$datadir/man})
moduledir=${moduledir-$datadir/mes/module} moduledir=$(eval echo ${moduledir-$datadir/mes/module})
guile_site_dir=${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION} guile_site_dir=$(eval echo ${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} guile_site_ccache_dir=$(eval echo ${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache})
mkdir -p $DESTDIR$bindir mkdir -p $DESTDIR$bindir
cp src/mes $DESTDIR$bindir/mes cp src/mes $DESTDIR$bindir/mes
@ -95,7 +95,7 @@ mkdir -p $DESTDIR$MES_PREFIX
if [ -z "$srcdest" ]; then if [ -z "$srcdest" ]; then
tar -cf- include lib | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- include lib | tar -xf- -C $DESTDIR$MES_PREFIX
tar -cf- --exclude='*.go' module | 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 else
tar -cf- -C ${srcdest} include lib | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- -C ${srcdest} include lib | tar -xf- -C $DESTDIR$MES_PREFIX
tar -cf- -C lib | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- -C lib | tar -xf- -C $DESTDIR$MES_PREFIX

5
configure vendored
View file

@ -305,11 +305,12 @@ Some influential environment variables:
(mandir (option-ref options 'infodir "${prefix}/share/man")) (mandir (option-ref options 'infodir "${prefix}/share/man"))
(sysconfdir (option-ref options 'sysconfdir "${prefix}/etc")) (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")) (datadir (option-ref options 'datadir "${prefix}/share"))
(docdir (option-ref options 'docdir "${datadir}/doc/mes-${VERSION}")) (docdir (option-ref options 'docdir "${datadir}/doc/mes-${VERSION}"))
(libdir (option-ref options 'libdir "${prefix}/lib")) (libdir (option-ref options 'libdir "${prefix}/lib"))
(moduledir "${datadir}/mes/module") (moduledir "${datadir}/mes/module")
(moduledir/ (gulp-pipe (string-append "echo " prefix "/share/mes/module/")))
(guile-effective-version (effective-version)) (guile-effective-version (effective-version))
(guile-site-dir (if (equal? prefix ".") (canonicalize-path ".") (guile-site-dir (if (equal? prefix ".") (canonicalize-path ".")
(string-append "${prefix}/share/guile/site/" guile-effective-version))) (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_dir@" . ,guile-site-dir)
("@guile_site_ccache_dir@" . ,guile-site-ccache-dir) ("@guile_site_ccache_dir@" . ,guile-site-ccache-dir)
("@VERSION@" . ,VERSION) ("@VERSION@" . ,VERSION)
("mes/module/" . ,(string-append moduledir "/"))))) ("mes/module/" . ,(string-append moduledir/)))))
(for-each (lambda (o) (for-each (lambda (o)
(let* ((src (string-append srcdest o)) (let* ((src (string-append srcdest o))
(target (string-drop-right o 3)) (target (string-drop-right o 3))

View file

@ -52,13 +52,14 @@ if [ -z "$GUILE" -o "$GUILE" = true ]; then
else else
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')} GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')}
fi fi
datadir=${datadir-$prefix/share} datadir=$(eval echo ${datadir-$prefix/share})
docdir=${docdir-$datadir/doc/mes-$VERSION} docdir=$(eval echo ${docdir-$datadir/doc/mes-$VERSION})
infodir=${infodir-$datadir/info} infodir=$(eval echo ${infodir-$datadir/info})
mandir=${mandir-$datadir/man} mandir=$(eval echo ${mandir-$datadir/man})
moduledir=${moduledir-$datadir/mes/module} moduledir=$(eval echo ${moduledir-$datadir/mes/module})
guile_site_dir=${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION} moduledir_="$moduledir/"
guile_site_ccache_dir=${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache} 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 () { subst () {
sed \ sed \
@ -73,7 +74,7 @@ subst () {
-e s,"@guile_site_dir@,$guile_site_dir,"\ -e s,"@guile_site_dir@,$guile_site_dir,"\
-e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\ -e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
-e s,"@VERSION@,$VERSION,"\ -e s,"@VERSION@,$VERSION,"\
-e s,"mes/module/,$moduledir,"\ -e s,"mes/module/,$moduledir/,"\
$1 > $2 $1 > $2
} }