Initial Commit
[packages] / xemacs-packages / tramp / lisp / Makefile
1 # -*- coding: utf-8; -*-
2 # Emacs Makefile for TRAMP
3 # lisp/Makefile.  Generated from Makefile.in by configure.
4
5 # Copyright (C) 1998-2015 Free Software Foundation, Inc.
6
7 # Author: Kai Großjohann <kai.grossjohann@gmx.net>
8 #         Michael Albinus <michael.albinus@gmx.de>
9 # Keywords: comm, processes
10
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.
15
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.
20
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/>.
23
24 # This Makefile requires GNU make.
25
26 EMACS           = xemacs21
27 EMACS_GVFS      = no
28 EMACS_GW        = no
29 EMACS_INFO      = xemacs
30 INSTALL         = install -m644
31 MKDIR           = @mkdir -p
32 RM              = -rm -f
33
34 builddir        = /usr/local/src/tramp/lisp
35 prefix          = /usr/local
36 datarootdir     = ${prefix}/lib
37 datadir         = ${datarootdir}
38 lispdir         = ${datadir}/xemacs/site-lisp
39 DESTDIR         =
40
41 CONTRIB_FILES   =
42 CLEAN_FILES     = .\\\#* \\\#* .*~ *~ *.aux *.cp *.cps *.diff *.dvi *.elc *.fn *.fns *.html *.info *.ky *.log *.pg *.tmp *.toc *.tp *.vr *.vrs
43
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
48
49 # tramp-gvfs.el needs Emacs 23 at least.
50 ifeq ($(EMACS_GVFS), yes)
51   LISP_FILES += tramp-gvfs.el
52 endif
53
54 # tramp-gw.el needs Emacs 22 at least.
55 ifeq ($(EMACS_GW), yes)
56   LISP_FILES += tramp-gw.el
57 endif
58
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
62 else
63   LISP_FILES += tramp-efs.el
64 endif
65
66 INSTALL_FILES   = $(LISP_FILES) $(CONTRIB_FILES) tramp-loaddefs.el \
67                   $(addsuffix .elc, $(basename $(LISP_FILES) $(CONTRIB_FILES)))
68
69 ifeq ($(EMACS_INFO), emacs)
70   EM = $(EMACS) --no-site-file -batch
71 else
72   EM = $(EMACS) -no-autoloads -batch -l cl-macs
73 endif
74
75
76 .PHONY: all autoloads install clean distclean tramp xemacs
77
78 .SUFFIXES: .elc .el
79
80 all: autoloads $(addsuffix .elc, $(basename $(LISP_FILES) $(CONTRIB_FILES)))
81
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.
86         $(EM) -l autoload                                                   \
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 $@ >$@.$$$$ &&            \
97           mv -f $@.$$$$ $@
98 # Emacs 22 does not add the `provide' form to the generated loaddefs.el.
99         @grep -q provide $@ || echo "(provide 'tramp-loaddefs)" >>$@
100
101 %.elc: %.el
102         $(EM) -l bytecomp \
103           --eval "(add-to-list 'load-path default-directory)"           \
104           -f batch-byte-compile $?
105
106 install: all
107         $(MKDIR) $(DESTDIR)$(lispdir)
108         $(INSTALL) $(INSTALL_FILES) $(DESTDIR)$(lispdir)
109
110 clean:
111         $(RM) $(CLEAN_FILES)
112
113 distclean: clean
114         $(RM) $(CONTRIB_FILES) tramp-loaddefs.el
115
116 # Maintainer targets.
117
118 tramp: all
119
120 xemacs:
121         cp $(LISP_FILES) tramp-loaddefs.el ChangeLog $(XEMACS_TARGET)/lisp
122
123 ### TODO:
124
125 ## * Update Tramp's autoladed symbols in loaddefs.el during install.