Mercurial > hg > xemacs-beta
comparison Makefile.in.in @ 4448:fd8a9a4d81d9
Support #!, to allow XEmacs to be called as a script interpreter.
ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea@parhasard.net>
* Makefile.in.in (SHEBANG_PROGNAME):
New variable; a symbol link to the XEmacs binary to tell it it
should read a script from stdin.
* configure.ac (XE_EXPAND_VARIABLE):
Set SHEBANG_PROGNAME.
* configure:
Regenerate.
src/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea@parhasard.net>
* config.h.in: Add SHEBANG_PROGNAME.
* emacs.c (main_1):
If we've been called using SHEBANG_PROGNAME, rewrite our arguments
to add a --script argument.
Also, handle the --script argument by setting noninteractive and
vanilla.
* lread.c (Fload_internal):
If the first two characters of a file are #!, replace them with ;!
before they get to the Lisp reader.
lisp/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea@parhasard.net>
* startup.el (command-line-do-script): New.
(command-switch-alist): Use command-line-do-script.
New argument, compatible with GNU; --script or -script says "treat
the following argument as a file to load in batch mode".
man/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea@parhasard.net>
* xemacs/cmdargs.texi (Command Switches):
Describe --script, -script.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 20 Jan 2008 19:53:54 +0100 |
parents | 4939bde48d12 |
children | 13ce402e1736 |
comparison
equal
deleted
inserted
replaced
4408:8bbabcab2c42 | 4448:fd8a9a4d81d9 |
---|---|
90 configuration=@configuration@ | 90 configuration=@configuration@ |
91 | 91 |
92 ## This will be the name of the generated binary and is set automatically | 92 ## This will be the name of the generated binary and is set automatically |
93 ## by configure. | 93 ## by configure. |
94 PROGNAME=@PROGNAME@ | 94 PROGNAME=@PROGNAME@ |
95 SHEBANG_PROGNAME=@SHEBANG_PROGNAME@ | |
95 | 96 |
96 ## ==================== Where To Install Things ==================== | 97 ## ==================== Where To Install Things ==================== |
97 | 98 |
98 ## The default location for installation. Everything is placed in | 99 ## The default location for installation. Everything is placed in |
99 ## subdirectories of this directory. The default values for many of | 100 ## subdirectories of this directory. The default values for many of |
405 #else | 406 #else |
406 # ifdef CYGWIN | 407 # ifdef CYGWIN |
407 ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}.exe | 408 ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}.exe |
408 -chmod 0755 ${bindir}/${PROGNAME}-${version}.exe | 409 -chmod 0755 ${bindir}/${PROGNAME}-${version}.exe |
409 cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME} | 410 cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME} |
411 cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${SHEBANG_PROGNAME} | |
410 # else | 412 # else |
411 ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version} | 413 ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version} |
412 -chmod 0755 ${bindir}/${PROGNAME}-${version} | 414 -chmod 0755 ${bindir}/${PROGNAME}-${version} |
413 cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME} | 415 cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME} |
416 cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${SHEBANG_PROGNAME} | |
414 # endif /* CYGWIN */ | 417 # endif /* CYGWIN */ |
415 #endif /* WIN32_NATIVE */ | 418 #endif /* WIN32_NATIVE */ |
416 if test "${prefix}" != "${exec_prefix}"; then \ | 419 if test "${prefix}" != "${exec_prefix}"; then \ |
417 $(MAKEPATH) ${exec_prefix}/lib/${instvardir}; \ | 420 $(MAKEPATH) ${exec_prefix}/lib/${instvardir}; \ |
418 for dir in \ | 421 for dir in \ |