Initial Commit
[packages] / xemacs-packages / w3 / lisp / Makefile.in
1 # where the w3 lisp files should go
2 srcdir  = @srcdir@
3 prefix  = @prefix@
4 datadir = @datadir@
5 lispdir = @lispdir@
6 top_srcdir = @top_srcdir@
7 confdir = $(datadir)/emacs/w3
8
9 VPATH=$(srcdir)
10
11 ############## no user servicable parts beyond this point ###################
12 # Have to preload a few things to get a nice clean compile
13
14 EMACS     = @EMACS@
15 WIDGETDIR = @CUSTOM@
16 GNUSDIR   = @GNUS@
17 INSTALL   = @INSTALL@
18 RM        = rm -f
19
20 DEPS = -l $(srcdir)/docomp.el -l $(srcdir)/url-vars.el -l $(srcdir)/w3-vars.el
21
22 # compile with noninteractive and relatively clean environment
23 BATCHFLAGS = -batch -q -no-site-file
24
25 URLSOURCES = \
26         url-nfs.el url-file.el url-cookie.el url-parse.el url-irc.el    \
27         url-gopher.el url-http.el url-mail.el url-misc.el url-news.el   \
28         url-vars.el url-auth.el mm.el md5.el url-gw.el ssl.el base64.el \
29         url.el socks.el url-cache.el url-ns.el url-ldap.el @CIDFILE@
30
31 URLOBJECTS    = $(URLSOURCES:.el=.elc)
32
33 SOURCES =                                                               \
34         mule-sysdp.el w3-widget.el devices.el w3-imap.el css.el         \
35         dsssl.el dsssl-flow.el images.el w3-vars.el w3-cus.el   \
36         w3-style.el w3-keyword.el w3-forms.el w3-emulate.el             \
37         w3-props.el w3-menu.el w3-mouse.el w3-toolbar.el                \
38         w3-speak.el w3-latex.el w3-parse.el w3-display.el w3-print.el   \
39         w3-about.el w3-hotindex.el w3-hot.el w3-e19.el w3-xemac.el      \
40         w3.el w3-script.el w3-jscript.el w3-elisp.el w3-e20.el          \
41         w3-speak-table.el w3-java.el
42
43 OBJECTS = $(SOURCES:.el=.elc)
44
45 AUTOSOURCES = auto-autoloads.el custom-load.el w3-auto.el w3-cfg.el
46 AUTOOBJECTS = $(AUTOSOURCES:.el=.elc)
47
48 # Some makes appear to choke if I try to do a substitution on a really
49 # large macro like SOURCES when it included all of these, so lets combine
50 # everything now that it has been appropriately munged in smaller chunks.
51 ALLSOURCES = $(SOURCES) $(URLSOURCES) $(AUTOSOURCES)
52 ALLOBJECTS = $(OBJECTS) $(URLOBJECTS) $(AUTOOBJECTS)
53
54 # Warning!  Currently, the following file can _NOT_ be bytecompiled.
55 EXTRAS = w3-sysdp.el docomp.el url-cid.el
56
57 .SUFFIXES: .elc .el
58
59 .el,v.el:
60         co -q $<
61
62 .el.elc:
63         GNUSDIR=$(GNUSDIR) WIDGETDIR=$(WIDGETDIR) W3SRCDIR=$(srcdir) $(EMACS) $(BATCHFLAGS) $(DEPS) -f batch-byte-compile $<
64
65 all:    $(AUTOSOURCES) w3
66
67 w3-auto.el: auto-autoloads.el
68         GNUSDIR=$(GNUSDIR) WIDGETDIR=$(WIDGETDIR) W3SRCDIR=$(srcdir) $(EMACS) $(BATCHFLAGS) -l $(srcdir)/docomp.el -f emacs-batch-build-autoloads $(srcdir) auto-autoloads.el
69
70 auto-autoloads.el: $(SOURCES) $(URLSOURCES)
71         GNUSDIR=$(GNUSDIR) WIDGETDIR=$(WIDGETDIR) W3SRCDIR=$(srcdir) $(EMACS) $(BATCHFLAGS) -l $(srcdir)/docomp.el -f emacs-batch-build-autoloads $(srcdir) auto-autoloads.el
72
73 custom-load.el: $(SOURCES) $(URLSOURCES)
74         GNUSDIR=$(GNUSDIR) WIDGETDIR=$(WIDGETDIR) W3SRCDIR=$(srcdir) @REBUILD_CUSTOMLOADS@
75         if [ -f cus-load.el ]; then mv cus-load.el custom-load.el; fi
76
77 w3-cfg.el: $(srcdir)/w3-cfg.el.in ../config.status
78         ( cd ../ ; CONFIG_FILES=lisp/w3-cfg.el CONFIG_HEADERS= ./config.status)
79
80 w3:     $(ALLSOURCES) $(ALLOBJECTS)
81         @echo Build of w3 complete...
82
83 xemacs-w3: $(ALLSOURCES) $(ALLOBJECTS)
84         @echo Build of w3 complete...
85
86 fast:   $(ALLSOURCES) $(EXTRAS)
87         GNUSDIR=$(GNUSDIR) WIDGETDIR=$(WIDGETDIR) W3SRCDIR=$(srcdir) $(EMACS) $(BATCHFLAGS) $(DEPS) -f batch-byte-compile $(ALLSOURCES)
88         @echo Build of w3 complete...
89
90 autoloads:
91         $(EMACS) $(BATCHFLAGS) -eval '(setq autoload-package-name "w3")' -l autoload -f batch-update-directory .
92
93 install: all
94         @echo Installing in $(lispdir)
95         ( if [ ! -d $(lispdir) ]; then mkdir -p $(lispdir); fi )
96         for x in $(ALLSOURCES) $(EXTRAS) $(ALLOBJECTS); do              \
97                 if [ -f $$x ]; then                                     \
98                         $(INSTALL) -m 644 $$x $(lispdir);               \
99                 else                                                    \
100                         $(INSTALL) -m 644 $(srcdir)/$$x $(lispdir);     \
101                 fi                                                      \
102         done;
103
104 distclean: clean
105         $(RM) config.* Makefile w3-cfg.el w3-auto.el $(AUTOSOURCES)
106
107 clean:
108         $(RM) *.elc *~
109
110 w3-vars.elc: w3-cus.elc w3-vars.el
111 w3-display.elc: w3-display.el css.elc font.elc w3-imap.elc
112 css.elc: css.el font.elc
113 w3.elc: css.elc w3-vars.elc w3.el
114 dsssl.elc: dsssl.el dsssl-flow.elc
115
116 # Automatic makefile rebuilding
117 Makefile: $(srcdir)/Makefile.in ../config.status
118         ( cd .. ; CONFIG_FILES=lisp/Makefile ./config.status )
119
120 $(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
121         cd $(top_srcdir) && autoreconf
122
123 ../config.status: $(top_srcdir)/configure
124         cd .. && ./config.status --recheck
125
126 # Distribution building
127 version: $(ALLSOURCES) $(EXTRAS) descrip.mms
128         test -d $(DIRNAME)/lisp || mkdir -p $(DIRNAME)/lisp
129         for x in descrip.mms $(ALLSOURCES) $(EXTRAS) w3-cfg.el.in w3-cfg.nt Makefile.in; do $(INSTALL) -m 644 $$x $(DIRNAME)/lisp; done
130         cd $(DIRNAME)/lisp && $(RM) $(AUTOSOURCES)