1 # where the w3 lisp files should go
6 top_srcdir = @top_srcdir@
7 confdir = $(datadir)/emacs/w3
11 ############## no user servicable parts beyond this point ###################
12 # Have to preload a few things to get a nice clean compile
20 DEPS = -l $(srcdir)/docomp.el -l $(srcdir)/url-vars.el -l $(srcdir)/w3-vars.el
22 # compile with noninteractive and relatively clean environment
23 BATCHFLAGS = -batch -q -no-site-file
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@
31 URLOBJECTS = $(URLSOURCES:.el=.elc)
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
43 OBJECTS = $(SOURCES:.el=.elc)
45 AUTOSOURCES = auto-autoloads.el custom-load.el w3-auto.el w3-cfg.el
46 AUTOOBJECTS = $(AUTOSOURCES:.el=.elc)
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)
54 # Warning! Currently, the following file can _NOT_ be bytecompiled.
55 EXTRAS = w3-sysdp.el docomp.el url-cid.el
63 GNUSDIR=$(GNUSDIR) WIDGETDIR=$(WIDGETDIR) W3SRCDIR=$(srcdir) $(EMACS) $(BATCHFLAGS) $(DEPS) -f batch-byte-compile $<
65 all: $(AUTOSOURCES) w3
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
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
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
77 w3-cfg.el: $(srcdir)/w3-cfg.el.in ../config.status
78 ( cd ../ ; CONFIG_FILES=lisp/w3-cfg.el CONFIG_HEADERS= ./config.status)
80 w3: $(ALLSOURCES) $(ALLOBJECTS)
81 @echo Build of w3 complete...
83 xemacs-w3: $(ALLSOURCES) $(ALLOBJECTS)
84 @echo Build of w3 complete...
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...
91 $(EMACS) $(BATCHFLAGS) -eval '(setq autoload-package-name "w3")' -l autoload -f batch-update-directory .
94 @echo Installing in $(lispdir)
95 ( if [ ! -d $(lispdir) ]; then mkdir -p $(lispdir); fi )
96 for x in $(ALLSOURCES) $(EXTRAS) $(ALLOBJECTS); do \
98 $(INSTALL) -m 644 $$x $(lispdir); \
100 $(INSTALL) -m 644 $(srcdir)/$$x $(lispdir); \
105 $(RM) config.* Makefile w3-cfg.el w3-auto.el $(AUTOSOURCES)
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
116 # Automatic makefile rebuilding
117 Makefile: $(srcdir)/Makefile.in ../config.status
118 ( cd .. ; CONFIG_FILES=lisp/Makefile ./config.status )
120 $(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
121 cd $(top_srcdir) && autoreconf
123 ../config.status: $(top_srcdir)/configure
124 cd .. && ./config.status --recheck
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)