| Anonymous | Login | Signup for a new account | 2013-05-19 04:00 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0005403 | OCaml | OCaml general | public | 2011-11-19 23:07 | 2012-02-03 17:06 | |||
| Reporter | Drakken | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.12.1 | |||||||
| Target Version | Fixed in Version | 3.13.0+dev | ||||||
| Summary | 0005403: Bugfixes for emacs/Makefile | |||||||
| Description | There are several problems with the Makefile in the emacs subdirectory of the ocaml distribution. To reproduce the problem: Log in as root and run "make install" in the emacs directory. General (targets "install" and "simple-install"): * The script doesn't work if emacs isn't in root's path. (the search for site-lisp directories fails.) In the "install" target: * The "p" in the sed expression is an argument to the s command that deletes quotation marks, so any unquoted directory names would not be printed. * The sed expression prints *all* matching directories, but "test -d" expects only one. * The names are stored in variable xxx, but the test looks for them in the positional parameter $2 (which I don't think is set anyway). * The "set" syntax for xxx is incorrect. (/bin/sh uses "=") | |||||||
| Additional Information | This report replaces Ocamlbuild report 0005402. See the attached file for the following changes: > emacs: > @if test "`which $(EMACS) 2>/dev/null`" = ""; then \ > echo `which $(EMACS) 2>&1`; \ > exit 2; \ > fi < install: > install: emacs < simple-install: > simple-install: emacs < set xxx `($(EMACS) --batch --eval "(mapcar 'print load-path)") \ > emacsdir=`($(EMACS) --batch --eval "(mapcar 'print load-path)") \ < if test "$$2" = ""; then \ > if test "$$emacsdir" = ""; then \ < sed -n -e '/\/site-lisp/s/"//gp'`; \ > sed -n -e '/\/site-lisp/{s/"//g;p;q}'`; \ < $(MAKE) EMACSDIR="$$2" simple-install; \ > $(MAKE) EMACSDIR="$$emacsdir" simple-install; \ | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0006875) doligez (manager) 2012-02-03 17:06 |
Thanks for your report. > * The script doesn't work if emacs isn't in root's path. (the search for site-lisp directories fails.) OK, we should test for emacs's presence. But currently, if you "make install-el EMACSDIR=...", then emacs is not needed. I have changed the Makefile to give a better error message if emacs is needed and cannot be found in the path. > * The "p" in the sed expression is an argument to the s command that deletes quotation marks, so any unquoted directory names would not be printed. This is entirely theoretical because emacs quotes them all anyway. > * The sed expression prints *all* matching directories, but "test -d" expects only one. But we give only one to "test -d" : the result of the sed expression is not used as is. > * The names are stored in variable xxx, but the test looks for them in the positional parameter $2 (which I don't think is set anyway). The names are not stored in variable xxx. Please refer to the shell's documentation for information about the "set" command. > * The "set" syntax for xxx is incorrect. (/bin/sh uses "=") The syntax is correct. We are not trying to set the variable xxx here. Fixed in trunk [3.13.0] (commit 12118) |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-11-19 23:07 | Drakken | New Issue | |
| 2011-11-19 23:07 | Drakken | File Added: Makefile | |
| 2012-02-03 17:06 | doligez | Note Added: 0006875 | |
| 2012-02-03 17:06 | doligez | Status | new => closed |
| 2012-02-03 17:06 | doligez | Resolution | open => fixed |
| 2012-02-03 17:06 | doligez | Fixed in Version | => 3.13.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |