equal
deleted
inserted
replaced
26 $(error Home env var not set!) |
26 $(error Home env var not set!) |
27 endif |
27 endif |
28 |
28 |
29 host_os = unix |
29 host_os = unix |
30 ifneq '' '$(COMSPEC)' |
30 ifneq '' '$(COMSPEC)' |
31 host_os = windows |
31 ifneq '' '$(WINDIR)' |
|
32 # Probably under Windows. |
|
33 host_os = windows |
|
34 endif |
32 endif |
35 endif |
|
36 |
|
37 ################################################################ |
|
38 # Build tool definition/switches. |
33 |
39 |
34 EMACS = emacs |
40 EMACS = emacs |
35 # I prefer native Windows Emacs, so use it if available. |
41 # I prefer native Windows Emacs, so use it if available. |
36 ifeq 'windows' '$(host_os)' |
42 ifeq 'windows' '$(host_os)' |
37 ifneq '' '$(call which,runemacs.exe)' |
43 ifneq '' '$(call which,runemacs.exe)' |
38 EMACS = runemacs |
44 EMACS = runemacs |
39 endif |
45 endif |
40 endif |
46 endif |
41 |
47 |
|
48 RST2HTML = rst2html |
|
49 ifeq '$(host_os)' 'windows' |
|
50 RST2HTML = rst2html.py |
|
51 endif |
|
52 |
|
53 ################################################################ |
|
54 # Proj dirs/files. |
|
55 |
|
56 FILES_MODE_EL := $(wildcard *-mode.el) |
|
57 |
|
58 RST_FILES := $(wildcard *.rst) |
|
59 HTML_FILES := $(RST_FILES:.rst=.html) |
|
60 |
42 ################################################################ |
61 ################################################################ |
43 # Targets. |
62 # Targets. |
44 |
|
45 FILES_MODE_EL := $(wildcard *-mode.el) |
|
46 |
63 |
47 .PHONY: all |
64 .PHONY: all |
48 all: install |
65 all: install |
49 |
66 |
50 ################################################################ |
67 ################################################################ |
78 .PHONY: tar |
95 .PHONY: tar |
79 tar: |
96 tar: |
80 tar cf dot-emacs.tar .emacs .emacs-my |
97 tar cf dot-emacs.tar .emacs .emacs-my |
81 |
98 |
82 ################################################################ |
99 ################################################################ |
|
100 # Documentation targets. |
|
101 |
|
102 .PHONY: html |
|
103 html: $(HTML_FILES) |
|
104 |
|
105 $(HTML_FILES): %.html: %.rst |
|
106 $(RST2HTML) --stylesheet=rst.css $*.rst $@ |
|
107 |
|
108 ################################################################ |
83 # Clean targets. |
109 # Clean targets. |
84 |
110 |
85 .PHONY: distclean |
111 .PHONY: distclean |
86 distclean: clean |
112 distclean: clean |
87 |
113 |
88 .PHONY: clean |
114 .PHONY: clean |
89 clean: |
115 clean: |
90 rm -f dot-emacs.tar |
116 rm -f dot-emacs.tar $(HTML_FILES) |