1 # -*- coding: utf-8; -*-
2 # Emacs Makefile for TRAMP
3 # lisp/Makefile. Generated from Makefile.in by configure.
5 # Copyright (C) 1998-2015 Free Software Foundation, Inc.
7 # Author: Kai Großjohann <kai.grossjohann@gmx.net>
8 # Michael Albinus <michael.albinus@gmx.de>
9 # Keywords: comm, processes
11 # This file is free software: you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
16 # This file is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24 # This Makefile requires GNU make.
30 INSTALL = install -m644
34 builddir = /usr/local/src/tramp/lisp
36 datarootdir = ${prefix}/lib
37 datadir = ${datarootdir}
38 lispdir = ${datadir}/xemacs/site-lisp
42 CLEAN_FILES = .\\\#* \\\#* .*~ *~ *.aux *.cp *.cps *.diff *.dvi *.elc *.fn *.fns *.html *.info *.ky *.log *.pg *.tmp *.toc *.tp *.vr *.vrs
44 # trampver.el and tramp.el must be handled first due to dependencies.
45 LISP_FILES = trampver.el tramp.el tramp-adb.el tramp-cache.el \
46 tramp-cmds.el tramp-compat.el tramp-sh.el \
47 tramp-smb.el tramp-uu.el
49 # tramp-gvfs.el needs Emacs 23 at least.
50 ifeq ($(EMACS_GVFS), yes)
51 LISP_FILES += tramp-gvfs.el
54 # tramp-gw.el needs Emacs 22 at least.
55 ifeq ($(EMACS_GW), yes)
56 LISP_FILES += tramp-gw.el
59 # tramp-ftp.el and tramp-efs.el are useful for Emacs resp XEmacs only.
60 ifeq ($(EMACS_INFO), emacs)
61 LISP_FILES += tramp-ftp.el
63 LISP_FILES += tramp-efs.el
66 INSTALL_FILES = $(LISP_FILES) $(CONTRIB_FILES) tramp-loaddefs.el \
67 $(addsuffix .elc, $(basename $(LISP_FILES) $(CONTRIB_FILES)))
69 ifeq ($(EMACS_INFO), emacs)
70 EM = $(EMACS) --no-site-file -batch
72 EM = $(EMACS) -no-autoloads -batch -l cl-macs
76 .PHONY: all autoloads install clean distclean tramp xemacs
80 all: autoloads $(addsuffix .elc, $(basename $(LISP_FILES) $(CONTRIB_FILES)))
82 autoloads: $(builddir)/tramp-loaddefs.el
83 $(builddir)/tramp-loaddefs.el: $(LISP_FILES)
84 # XEmacs must be advised to put tramp.el definitions at the beginning.
85 # We redefine `autoload-trim-file-name', therefore.
87 --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \
88 --eval "(setq generated-autoload-file \
89 (expand-file-name \"tramp-loaddefs.el\"))" \
90 --eval "(setq make-backup-files nil)" \
91 --eval "(unless (string-equal \"$(EMACS_INFO)\" \"emacs\") \
92 (defalias 'autoload-trim-file-name \
93 'file-name-sans-extension))" \
94 -f batch-update-autoloads .
95 # XEmacs uses hard coded feature `lisp-autoloads'.
96 @sed -e s/lisp-autoloads/tramp-loaddefs/g $@ >$@.$$$$ && \
98 # Emacs 22 does not add the `provide' form to the generated loaddefs.el.
99 @grep -q provide $@ || echo "(provide 'tramp-loaddefs)" >>$@
103 --eval "(add-to-list 'load-path default-directory)" \
104 -f batch-byte-compile $?
107 $(MKDIR) $(DESTDIR)$(lispdir)
108 $(INSTALL) $(INSTALL_FILES) $(DESTDIR)$(lispdir)
114 $(RM) $(CONTRIB_FILES) tramp-loaddefs.el
116 # Maintainer targets.
121 cp $(LISP_FILES) tramp-loaddefs.el ChangeLog $(XEMACS_TARGET)/lisp
125 ## * Update Tramp's autoladed symbols in loaddefs.el during install.