Bugfixes for emacs/Makefile #5403
Original bug ID: 5403
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"):
In the "install" target:
This report replaces Ocamlbuild report #5402.
See the attached file for the following changes:
< set xxx `($(EMACS) --batch --eval "(mapcar 'print load-path)") \
< if test "$$2" = ""; then \
< sed -n -e '//site-lisp/s/"//gp'`; \
< $(MAKE) EMACSDIR="$$2" simple-install; \
Comment author: @damiendoligez
Thanks for your report.
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.
This is entirely theoretical because emacs quotes them all anyway.
But we give only one to "test -d" : the result of the sed expression is not used as is.
The names are not stored in variable xxx. Please refer to the shell's documentation for information about the "set" command.
The syntax is correct. We are not trying to set the variable xxx here.
Fixed in trunk [3.13.0] (commit 12118)