]> git.eshelyaron.com Git - emacs.git/commitdiff
Add support for --program-prefix, --program-suffix
authorPavel Janík <Pavel@Janik.cz>
Thu, 15 Nov 2001 20:37:20 +0000 (20:37 +0000)
committerPavel Janík <Pavel@Janik.cz>
Thu, 15 Nov 2001 20:37:20 +0000 (20:37 +0000)
and --program-transform-name options.

Makefile.in
configure.in
lib-src/Makefile.in

index d702c84efba1ccdeef9fda08ccf70f1a24a819ee..76072df1b33f063a0b251b14f84d16a90f464639 100644 (file)
@@ -202,8 +202,12 @@ INSTALL_STRIP =
 
 # ============================= Targets ==============================
 
+# Program name transformation.
+TRANSFORM = @program_transform_name@
+
 # What emacs should be called when installed.
-EMACS = emacs
+EMACS = `echo emacs | sed '$(TRANSFORM)'`
+EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'`
 
 # Subdirectories to make recursively.  `lisp' is not included
 # because the compiled lisp files are part of the distribution
@@ -331,10 +335,10 @@ install-arch-dep: mkdir
            exec_prefix=${exec_prefix} bindir=${bindir} \
            libexecdir=${libexecdir} archlibdir=${archlibdir} \
            INSTALL_STRIP=${INSTALL_STRIP})
-       ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs ${bindir}/emacs-${version}
-       -chmod 1755  ${bindir}/emacs-${version}
+       ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs ${bindir}/${EMACSFULL}
+       -chmod 1755  ${bindir}/$(EMACSFULL)
        rm -f ${bindir}/$(EMACS)
-       -ln ${bindir}/emacs-${version} ${bindir}/$(EMACS)
+       -ln ${bindir}/$(EMACSFULL) ${bindir}/$(EMACS)
        -unset CDPATH; \
        for f in `cd lib-src && echo fns-*.el`; do \
          if test -r lib-src/$$f ; then \
index 5f4156896c13e857874024a7198bd94635d0d388..612297a7fcb199ac749092137714446692637e29 100644 (file)
@@ -27,6 +27,10 @@ AC_PREREQ(2.50)dnl
 AC_INIT(src/lisp.h)
 AC_CONFIG_HEADER(src/config.h:src/config.in)
 
+dnl Support for --program-prefix, --program-suffix and
+dnl --program-transform-name options
+AC_ARG_PROGRAM
+
 lispdir='${datadir}/emacs/${version}/lisp'
 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
index a4b6b07fc41c080f90def4f3aa940879678a4476..592b2de8c03910cd7e67479b81574e34872a0451 100644 (file)
@@ -31,6 +31,9 @@ YACC=@YACC@
 version=@version@
 configuration=@configuration@
 
+# Program name transformation.
+TRANSFORM = @program_transform_name@
+
 # ==================== Where To Install Things ====================
 
 # The default location for installation.  Everything is placed in
@@ -296,17 +299,19 @@ install: ${archlibdir}
        @echo
        @echo "Installing utilities for users to run."
        for file in ${INSTALLABLES} ; do \
-         $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} ${bindir}/$${file} ; \
-         chmod a+rx ${bindir}/$${file}; \
+         $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} ${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
+         chmod a+rx ${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \
        done
        for file in ${INSTALLABLE_SCRIPTS} ; do \
-         $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file} ; \
-         chmod a+rx ${bindir}/$${file}; \
+         $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/`echo $${file} | sed '$(TRANSFORM)'`  ; \
+         chmod a+rx ${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \
        done
 
 uninstall:
        (cd ${bindir}; \
-        rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
+       for file in ${INSTALLABLES} ${INSTALLABLE_SCRIPTS}; do \
+         rm -f ${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
+       done)
        (cd ${archlibdir}; \
         rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})