File: Makefile

package info (click to toggle)
ess 18.10.2%2Bgit20220915.f45542e-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,616 kB
  • sloc: lisp: 23,453; makefile: 337; sh: 7
file content (67 lines) | stat: -rw-r--r-- 1,920 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
### Makefile - for compiled e-lisp of ESS distribution.

## Before making changes here, please take a look at Makeconf
include ../Makeconf


### Targets

.PHONY: all dist install uninstall distclean clean compile

JULIAS := julia-mode.el julia-mode-latexsubs.el
ELS = $(filter-out ess-autoloads.el, $(wildcard *.el)) $(JULIAS)
##ELS = $(filter-out ess-autoloads.el, $(wildcard *.el obsolete/*.el)) $(JULIAS)
ELC = $(ELS:.el=.elc)

all dist: compile ess-autoloads.el

compile: $(ELC)

install: dist
	-$(INSTALLDIR) $(LISPDIR)
	$(INSTALL) $(ELS) ess-autoloads.el $(LISPDIR)
	$(INSTALL) $(ELC) $(LISPDIR)
	if [ -f /etc/debian_version -a -n "$(SITELISP)" -a ! -f "$(SITELISP)/ess-site.el" ] ; \
	then \
		ln -s $(LISPDIR)/ess-site.el $(SITELISP)/ess-site.el ; \
	fi;

distclean clean:
	rm -f $(ELC) ess-autoloads.el $(JULIAS) .dependencies


### File Targets

.dependencies: $(ELS)
	@echo Computing dependencies
	@rm -f .dependencies
	@for f in $(ELS); do \
	  sed -n "s|^(require '\(ess.*\)).*$$|$${f}c: \1.elc|p" $${f} >> .dependencies;\
	done
## @for f in obsolete/*.el; do \
##   echo "$$(basename $${f}c):$${f}c" >> .dependencies;\
## done

-include .dependencies

.el.elc:
	$(COMPILE) $<
##obsolete/%.elc: obsolete/%.el
##	$(COMPILE-SIMPLE) $<

JULIA-REPO=https://raw.githubusercontent.com/JuliaEditorSupport/julia-emacs/master
## Should happen before building ESS; definitely *NOT* after unpacking tarball :
$(JULIAS):
	test -f ../etc/.IS.RELEASE || $(DOWNLOAD) $(JULIA-REPO)/julia-mode.el > julia-mode.el
	test -f ../etc/.IS.RELEASE || $(DOWNLOAD) $(JULIA-REPO)/julia-mode-latexsubs.el > julia-mode-latexsubs.el
julia-%.elc: julia-%.el
	$(COMPILE-SIMPLE) $<

ess-autoloads.el:
	@printf	"\nGenerating $@\n"
	$(EMACSBATCH) --eval "(progn\
	(setq make-backup-files nil)\
	(setq generated-autoload-file (expand-file-name \"$@\"))\
	(setq find-file-visit-truename t)\
	(update-directory-autoloads default-directory))"