emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Paths including spaces fail the installation: Patch
@ 2013-03-13 15:03 Bernd Haug
  2013-03-13 16:05 ` Bastien
  2013-03-13 18:10 ` Achim Gratz
  0 siblings, 2 replies; 9+ messages in thread
From: Bernd Haug @ 2013-03-13 15:03 UTC (permalink / raw)
  To: emacs-orgmode

I have encountered problems installing to paths including spaces. This
is annoying for Aquamacs on OS X, where the normal installation
location for a custom mode etc. is a directory in
~/Library/Application Support/Aquamacs Emacs. Minimal path quoting
changes to the inferior Makefiles made the installation work.

I have no location at hand from which I can offer public pulls at the
moment, but if anybody wants to commit it for me, the patch follows
in-line.

Yours, Bernd

diff --git a/doc/Makefile b/doc/Makefile
index 234ab7e..ca5117e 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -34,9 +34,9 @@ org-version.inc:      org.texi
        @echo "@set DATE $(DATE)" >> org-version.inc

 install:       org
-       if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR)
$(DESTDIR)$(infodir); else true; fi ;
-       $(CP) org $(DESTDIR)$(infodir)
-       $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
+       if [ ! -d "$(DESTDIR)$(infodir)" ]; then $(MKDIR)
"$(DESTDIR)$(infodir)"; else true; fi ;
+       $(CP) org "$(DESTDIR)$(infodir)"
+       $(INSTALL_INFO) --infodir="$(DESTDIR)$(infodir)" org

 clean:
        $(RM) org *.pdf *.html *_letter.tex org-version.inc \
@@ -47,7 +47,7 @@ cleanall:     clean

 clean-install:
        $(RM) $(DESTDIR)$(infodir)/org*
-       $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --remove org
+       $(INSTALL_INFO) --infodir="$(DESTDIR)$(infodir)" --remove org

 .SUFFIXES:     .texi .tex .txt _letter.tex

diff --git a/etc/Makefile b/etc/Makefile
index 8b06158..317bd07 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -13,10 +13,10 @@ all:

 install:       $(ETCDIRS)
        for dir in $? ; do \
-         if [ ! -d $(DESTDIR)$(datadir)/$${dir} ] ; then \
-           $(MKDIR) $(DESTDIR)$(datadir)/$${dir} ; \
+         if [ ! -d "$(DESTDIR)$(datadir)"/$${dir} ] ; then \
+           $(MKDIR) "$(DESTDIR)$(datadir)"/$${dir} ; \
          fi ; \
-         $(CP) $${dir}/* $(DESTDIR)$(datadir)/$${dir} ; \
+         $(CP) $${dir}/* "$(DESTDIR)$(datadir)"/$${dir} ; \
        done ;

 clean:
@@ -25,7 +25,7 @@ cleanall:

 clean-install: $(ETCDIRS)
        for dir in $? ; do \
-         if [ -d $(DESTDIR)$(datadir)/$${dir} ] ; then \
-           $(RMR) $(DESTDIR)$(datadir)/$${dir} ; \
+         if [ -d "$(DESTDIR)$(datadir)"/$${dir} ] ; then \
+           $(RMR) "$(DESTDIR)$(datadir)"/$${dir} ; \
          fi ; \
        done ;
diff --git a/lisp/Makefile b/lisp/Makefile
index 0e10c23..70af48a 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -77,10 +77,10 @@ $(LISPI):   $(LISPV) $(LISPF)
        @$(MAKE_ORG_INSTALL)

 install:        compile $(LISPF)
-       if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
-         $(MKDIR) $(DESTDIR)$(lispdir) ; \
+       if [ ! -d "$(DESTDIR)$(lispdir)" ] ; then \
+         $(MKDIR) "$(DESTDIR)$(lispdir)" ; \
        fi ;
-       $(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
+       $(CP) $(LISPC) $(LISPF) $(LISPA) "$(DESTDIR)$(lispdir)"

 cleanauto clean cleanall::
        $(RM) $(LISPA) $(LISPB)
@@ -88,6 +88,6 @@ clean cleanall cleanelc::
        $(RM) *.elc

 clean-install:
-       if [ -d $(DESTDIR)$(lispdir) ] ; then \
-         $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
+       if [ -d "$(DESTDIR)$(lispdir)" ] ; then \
+         $(RM) "$(DESTDIR)$(lispdir)"/org*.el*
"$(DESTDIR)$(lispdir)"/ob*.el* ; \
        fi ;

-- 
Senior Software Engineer

Xaidat GmbH
Wickenburggasse 5
8010 Graz
Austria / Europe

web: http://www.xaidat.com/
phone:  +43-676-845023-706
email:   bernd.haug@xaidat.com

FN 384295s, LG ZRS Graz
UID-Nr. ATU67414611

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Paths including spaces fail the installation: Patch
  2013-03-13 15:03 Paths including spaces fail the installation: Patch Bernd Haug
@ 2013-03-13 16:05 ` Bastien
  2013-03-13 18:10 ` Achim Gratz
  1 sibling, 0 replies; 9+ messages in thread
From: Bastien @ 2013-03-13 16:05 UTC (permalink / raw)
  To: Bernd Haug; +Cc: emacs-orgmode

Hi Bernd,

Bernd Haug <bernd.haug@xaidat.com> writes:

> I have encountered problems installing to paths including spaces. This
> is annoying for Aquamacs on OS X, where the normal installation
> location for a custom mode etc. is a directory in
> ~/Library/Application Support/Aquamacs Emacs. Minimal path quoting
> changes to the inferior Makefiles made the installation work.

Thanks -- I'll let Achim check this, I don't know enough in this area.

> I have no location at hand from which I can offer public pulls at the
> moment, but if anybody wants to commit it for me, the patch follows
> in-line.

We don't take pull requests, submitting a patch is the way to go.
To help us, you can use git format-patch, as explained here:

  http://orgmode.org/worg/org-contribute.html#sec-4-2

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Paths including spaces fail the installation: Patch
  2013-03-13 15:03 Paths including spaces fail the installation: Patch Bernd Haug
  2013-03-13 16:05 ` Bastien
@ 2013-03-13 18:10 ` Achim Gratz
  2013-03-14  6:49   ` Achim Gratz
  1 sibling, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2013-03-13 18:10 UTC (permalink / raw)
  To: emacs-orgmode

Bernd Haug writes:
> I have encountered problems installing to paths including spaces. This
> is annoying for Aquamacs on OS X, where the normal installation
> location for a custom mode etc. is a directory in
> ~/Library/Application Support/Aquamacs Emacs. Minimal path quoting
> changes to the inferior Makefiles made the installation work.

Is there any reason why you couldn't simply quote the definition?

--8<---------------cut here---------------start------------->8---
# Where local software is found
prefix  := /path\ with\ spaces/"or even something wretched like this"
--8<---------------cut here---------------end--------------->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Paths including spaces fail the installation: Patch
  2013-03-13 18:10 ` Achim Gratz
@ 2013-03-14  6:49   ` Achim Gratz
  2013-04-22 13:33     ` Bernd Haug
  0 siblings, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2013-03-14  6:49 UTC (permalink / raw)
  To: emacs-orgmode


[please reply to the list]

> BS-Quoting and Doublequote-ing were the first things I tried:
[…]

Yes I see, that is due to inadvertent double quoting.  Try this
definition in local.mk (not the extra two single quotes around
$(datadir)):

--8<---------------cut here---------------start------------->8---
# How to generate org-version.el
MAKE_ORG_VERSION = $(BATCHL) \
	  --eval '(load "org-compat.el")' \
	  --eval '(load "../mk/org-fixup.el")' \
	  --eval '(org-make-org-version "$(ORGVERSION)" "$(GITVERSION)" "'$(datadir)'")'
--8<---------------cut here---------------end--------------->8---

Please test, I'll push the fix if it solves your problem.

> But quite apart from that, I seems like the right thing to me to make
> sure that things that should be one string get interpreted as one
> string on the logic level, which even fixing the escaping behaviour
> would not do in the makefiles themselves.

The build system assumes that these definitions will always be
interpreted by the shell (the above fix makes sure it actually does), so
you need to shell-quote in the definitions already.  The Makefile itself
never cares what those strings are, embedded spaces or not.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Paths including spaces fail the installation: Patch
  2013-03-14  6:49   ` Achim Gratz
@ 2013-04-22 13:33     ` Bernd Haug
  2013-04-22 15:47       ` Achim Gratz
  0 siblings, 1 reply; 9+ messages in thread
From: Bernd Haug @ 2013-04-22 13:33 UTC (permalink / raw)
  To: emacs-orgmode

Hello Achim!

Finally got to it; pulled up to current (cf shell output below),
appended your snippet to local.mk and did a clean install:

On 14 March 2013 07:49, Achim Gratz <Stromeko@nexgo.de> wrote:
>> BS-Quoting and Doublequote-ing were the first things I tried:
> […]
>
> Yes I see, that is due to inadvertent double quoting.  Try this
> definition in local.mk (not the extra two single quotes around
> $(datadir)):
>
> --8<---------------cut here---------------start------------->8---
> # How to generate org-version.el
> MAKE_ORG_VERSION = $(BATCHL) \
>           --eval '(load "org-compat.el")' \
>           --eval '(load "../mk/org-fixup.el")' \
>           --eval '(org-make-org-version "$(ORGVERSION)" "$(GITVERSION)" "'$(datadir)'")'
> --8<---------------cut here---------------end--------------->8---
>
> Please test, I'll push the fix if it solves your problem.

----------------------------------------------------------------------------------------------------------------

bernd.haug@sliver:~/Library/Application Support/Aquamacs
Emacs/org-mode$ git describe --always --long --dirty
release_8.0.1-14-g2e67699
bernd.haug@sliver:~/Library/Application Support/Aquamacs
Emacs/org-mode$ make clean install
rm -f
make -C lisp clean
rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc
org-install.elc
rm -f *.elc
make -C doc clean
rm -f org *.pdf *.html *_letter.tex org-version.inc \
              *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
              *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
make -C doc install
org-version: 8.0.1 (release_8.0.1-14-g2e6769)
makeinfo --no-split org.texi -o org
if [ ! -d /Users/bernd.haug/Library/Application Support/Aquamacs
Emacs/org/info ]; then install -m 755 -d
/Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/info;
else true; fi ;
/bin/sh: line 0: [: too many arguments
install -m 644 -p org /Users/bernd.haug/Library/Application
Support/Aquamacs Emacs/org/info
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make[1]: *** [install] Error 64
make: *** [install-doc] Error 2
bernd.haug@sliver:~/Library/Application Support/Aquamacs Emacs/org-mode$

----------------------------------------------------------------------------------------------------------------

Problem seems to be, as before, that without proper quoting in the
right places *in the shell commands* paths with spaces fall apart into
separate arguments.

My (tiny and trivial) patch from back in Mar addressed only that and
the installation went off without a hitch with it.

Of course you're entirely right that the makefiles themselves do not
care, and the elisp doesn't have problems with it either.

Sorry for the delay and thank you for your consideration,
  Bernd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Paths including spaces fail the installation: Patch
  2013-04-22 13:33     ` Bernd Haug
@ 2013-04-22 15:47       ` Achim Gratz
  2013-04-23  6:22         ` Bernd Haug
  0 siblings, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2013-04-22 15:47 UTC (permalink / raw)
  To: emacs-orgmode

Bernd Haug writes:
> Finally got to it; pulled up to current (cf shell output below),
> appended your snippet to local.mk and did a clean install:

You don't need to add this anymore (unless you copied the old definition
from default.mk), it is already in mainline Org.  But you do need to
quote the definition for prefix (most likely).  Show the output of "make
config".


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Paths including spaces fail the installation: Patch
  2013-04-22 15:47       ` Achim Gratz
@ 2013-04-23  6:22         ` Bernd Haug
  2013-04-23 16:56           ` Achim Gratz
  0 siblings, 1 reply; 9+ messages in thread
From: Bernd Haug @ 2013-04-23  6:22 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim,

On 22 April 2013 17:47, Achim Gratz <Stromeko@nexgo.de> wrote:
> Bernd Haug writes:
>> Finally got to it; pulled up to current (cf shell output below),
>> appended your snippet to local.mk and did a clean install:
>
> You don't need to add this anymore (unless you copied the old definition
> from default.mk), it is already in mainline Org.  But you do need to
> quote the definition for prefix (most likely).  Show the output of "make
> config".

========= Emacs executable and Installation paths
EMACS	= /Applications/Aquamacs.app/Contents/MacOS/Aquamacs
DESTDIR	=
ORGCM	= dirall
ORG_MAKE_DOC	= info html pdf
lispdir	= /Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/lisp
infodir	= /Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/info
datadir	= /Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/etc
testdir	= /var/folders/_4/g9wqkdc513j4nkd12t4d69y80000gp/T//tmp-orgtest
========= Additional files from contrib/lisp

========= Org version
make:  Org-mode version 8.0.1 (release_8.0.1-14-g2e6769 =>
/Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/lisp)

If this is already done from your perspective though (as it seems),
thanks, but don't bother about supporting me. I'm happily using the
version I installed back then and I've got no compelling reasons to
upgrade.

Thanks again, Bernd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Paths including spaces fail the installation: Patch
  2013-04-23  6:22         ` Bernd Haug
@ 2013-04-23 16:56           ` Achim Gratz
  2013-04-25 10:24             ` Bernd Haug
  0 siblings, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2013-04-23 16:56 UTC (permalink / raw)
  To: emacs-orgmode


Please put quotes around the definition of prefix:

prefix = "/Users/bernd.haug/Library/Application Support/Aquamacs Emacs"

(or individually quote each definition if you don't use prefix) which
should then produce the following output from "make config":

> ========= Emacs executable and Installation paths
> EMACS	= /Applications/Aquamacs.app/Contents/MacOS/Aquamacs
> DESTDIR	=
> ORGCM	= dirall
> ORG_MAKE_DOC	= info html pdf
> lispdir	= "/Users/bernd.haug/Library/Application Support/Aquamacs Emacs"/org/lisp
> infodir	= "/Users/bernd.haug/Library/Application Support/Aquamacs Emacs"/org/info
> datadir	= "/Users/bernd.haug/Library/Application Support/Aquamacs Emacs"/org/etc
> testdir	= /var/folders/_4/g9wqkdc513j4nkd12t4d69y80000gp/T//tmp-orgtest
> ========= Additional files from contrib/lisp
>
> ========= Org version
> make:  Org-mode version 8.0.1 (release_8.0.1-14-g2e6769 =>
> /Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/lisp)
>
> If this is already done from your perspective though (as it seems),

Yes it should already work, with the setup as described above.  If it
doesn't, we need to figure out why and fix it.

> thanks, but don't bother about supporting me.

Huh? I'm not sure where this comes from.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Paths including spaces fail the installation: Patch
  2013-04-23 16:56           ` Achim Gratz
@ 2013-04-25 10:24             ` Bernd Haug
  0 siblings, 0 replies; 9+ messages in thread
From: Bernd Haug @ 2013-04-25 10:24 UTC (permalink / raw)
  To: emacs-orgmode

Hi Achim,

On 23 April 2013 18:56, Achim Gratz <Stromeko@nexgo.de> wrote:
> Please put quotes around the definition of prefix:
> prefix = "/Users/bernd.haug/Library/Application Support/Aquamacs Emacs"

Yes, with quoting the prefix a fresh clone installed cleanly.

>> thanks, but don't bother about supporting me.
> Huh? I'm not sure where this comes from.

It comes entirely from a friendly place – I got the impression that
this was a problem only I was having / that you had a mainline-merged
general fix anyway, and that I had fixed it already as far as my needs
were concerned, so I didn't want to waste your time.

Cheers, Bernd

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-04-25 10:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-13 15:03 Paths including spaces fail the installation: Patch Bernd Haug
2013-03-13 16:05 ` Bastien
2013-03-13 18:10 ` Achim Gratz
2013-03-14  6:49   ` Achim Gratz
2013-04-22 13:33     ` Bernd Haug
2013-04-22 15:47       ` Achim Gratz
2013-04-23  6:22         ` Bernd Haug
2013-04-23 16:56           ` Achim Gratz
2013-04-25 10:24             ` Bernd Haug

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).