Makefile
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 27 Jun 2012 23:25:31 +0300
changeset 466 4c5042015cd7
parent 458 1a122fdb2003
child 475 d94946441677
permissions -rw-r--r--
Add Readline support for Guile.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12
52322e5cc6bb Proper determine Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2
diff changeset
     1
SHELL = /bin/sh
165
517623c39dac Add work-around for PATH. Under Windows find.exe going in collision with
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 147
diff changeset
     2
export PATH := /bin:/usr/bin:${PATH}
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
166
27fc63b27dad Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 165
diff changeset
     4
# Disable built in pattern rules.
27fc63b27dad Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 165
diff changeset
     5
MAKEFLAGS += -r
27fc63b27dad Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 165
diff changeset
     6
# Disable built in variables.
27fc63b27dad Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 165
diff changeset
     7
MAKEFLAGS += -R
27fc63b27dad Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 165
diff changeset
     8
# Disable built in suffix rules.
27fc63b27dad Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 165
diff changeset
     9
.SUFFIXES:
27fc63b27dad Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 165
diff changeset
    10
# Default target.
217
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
    11
.DEFAULT_GOAL = help
166
27fc63b27dad Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 165
diff changeset
    12
249
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    13
################################################################
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    14
# Platform definition.
13
9e590e7ef108 Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 12
diff changeset
    15
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
ifeq '' '$(HOME)'
12
52322e5cc6bb Proper determine Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2
diff changeset
    17
  $(error HOME env var not set!)
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
endif
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
2
48e601bfbca6 Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 0
diff changeset
    20
host_os = linux
12
52322e5cc6bb Proper determine Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2
diff changeset
    21
ifneq '' '$(COMSPEC)'
249
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    22
  host_os = cygwin
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    23
endif
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    24
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    25
################################################################
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    26
# Build tool definition/switches.
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    27
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    28
RST2HTML = rst2html
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    29
ifeq '$(host_os)' 'cygwin'
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    30
  RST2HTML = rst2html.py
2
48e601bfbca6 Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 0
diff changeset
    31
endif
48e601bfbca6 Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 0
diff changeset
    32
218
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
    33
################################################################
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
    34
# Project dirs/files.
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
    35
427
59627b533219 Merge ".fvwm" project into "skel" project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 329
diff changeset
    36
OVERRIDDEN_ITEMS := \
458
1a122fdb2003 Disable anti-aliasing at all.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 449
diff changeset
    37
    .fvwm .xxkbrc .xmodmaprc .fonts.conf \
208
ba6619e43b22 Add '.dircolors' but don't enable it.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 201
diff changeset
    38
    .inputrc .minttyrc .Xdefaults .xinitrc .xserverrc .screenrc .dircolors \
466
4c5042015cd7 Add Readline support for Guile.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 458
diff changeset
    39
    .bashrc .bash_path .bash_completion .zshrc .vimrc .ssh \
4c5042015cd7 Add Readline support for Guile.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 458
diff changeset
    40
    .pylintrc .pystartup \
4c5042015cd7 Add Readline support for Guile.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 458
diff changeset
    41
    .guile \
234
420c06da8fd1 Fix mail signature file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 229
diff changeset
    42
    .signature .muttrc .tidy \
188
ff31eb2242c9 Add '.dictrc'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 173
diff changeset
    43
    .dictrc \
292
b19f6e8f2450 Fix '.cvsrc' file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 287
diff changeset
    44
    .hgrc .hgignore .hgstyle .bazaar .gitconfig .gitignore .cvsrc \
293
a9ac4e2551a0 Add '.glhackrc'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 292
diff changeset
    45
    .gnupg \
a9ac4e2551a0 Add '.glhackrc'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 292
diff changeset
    46
    .glhackrc
87
63b568f99e3c Install manually Midnight Commander ini files as for Cygwin and Debian
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 79
diff changeset
    47
MANUALINSTALL_ITEMS = .mc
117
02b91508db83 Add svn user config.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 116
diff changeset
    48
IFNONEXIST_ITEMS = .wgetrc .subversion
2
48e601bfbca6 Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 0
diff changeset
    49
249
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    50
RST_FILES = $(wildcard *.rst)
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    51
HTML_FILES = $(RST_FILES:.rst=.html)
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    52
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    53
################################################################
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    54
# Build targets.
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    55
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    56
.PHONY: all
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    57
all:
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
    58
218
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
    59
################################################################
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
    60
# Install/uninstall targets.
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
    61
13
9e590e7ef108 Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 12
diff changeset
    62
.PHONY: install
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    63
install:
76
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    64
	for item in $(OVERRIDDEN_ITEMS); do \
21
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    65
		if [ -f $$item ]; then \
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    66
			install -m 640 $$item $(HOME)/$$item; \
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    67
		fi; \
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    68
		if [ -d $$item ]; then \
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    69
			for file in `find $$item`; do \
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    70
				if [ -d $$file ]; then \
77
46f5f10ec084 Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 76
diff changeset
    71
					mkdir -p $(HOME)/$$file; \
46f5f10ec084 Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 76
diff changeset
    72
					continue; \
21
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    73
				fi; \
77
46f5f10ec084 Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 76
diff changeset
    74
				install -m 640 $$file $(HOME)/$$file; \
21
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    75
			done; \
a2b9b6ed57af Pattern like
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 20
diff changeset
    76
		fi; \
2
48e601bfbca6 Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 0
diff changeset
    77
	done
76
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    78
	for item in $(IFNONEXIST_ITEMS); do \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    79
		if [ -f $$item -a ! -f $(HOME)/$$item ]; then \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    80
			install -m 640 $$item $(HOME)/$$item; \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    81
		fi; \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    82
		if [ -d $$item ]; then \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    83
			for file in `find $$item`; do \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    84
				if [ -d $$file ]; then \
77
46f5f10ec084 Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 76
diff changeset
    85
					mkdir -p $(HOME)/$$file; \
46f5f10ec084 Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 76
diff changeset
    86
					continue; \
76
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    87
				fi; \
77
46f5f10ec084 Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 76
diff changeset
    88
				if [ ! -f $(HOME)/$$file ]; then \
76
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    89
					install -m 640 $$file $(HOME)/$$file; \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    90
				fi; \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    91
			done; \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    92
		fi; \
85dc8b07017a Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 75
diff changeset
    93
	done
287
fa17ae49bfff Add execute permission to '.xinitrc' to use Bash script language instead of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 286
diff changeset
    94
	chmod a+x ~/.xinitrc ~/.xserverrc
278
b6adff7cbcb1 Fix "ln: creating symbolic link `/home/user/.xsession': File exists".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 275
diff changeset
    95
	rm -f ~/.xsession
275
2f79af90c708 ln -s ~/.xinitrc ~/.xsession
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 249
diff changeset
    96
	ln -s ~/.xinitrc ~/.xsession
449
63fe7a1ebae4 Load custom settings (user editable).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 443
diff changeset
    97
	rm -f ~/.bash_profile
63fe7a1ebae4 Load custom settings (user editable).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 443
diff changeset
    98
	ln -s ~/.bashrc ~/.bash_profile
324
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
    99
	v=`mc --version | sed 's|.*\([0-9]\+\.[0-9]\+\.[0-9]\+\)$$|\1|;q'`; \
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   100
	vmajor=$${v%%.*}; \
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   101
	vminor=$${v#*.}; \
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   102
	vminor=$${vminor%.*}; \
328
3e80c4af5ab6 Merge my config for mc.ext with system wide as only ~/.config/mc/mc.ext
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 324
diff changeset
   103
	umask 0117; \
324
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   104
	if [ $$vmajor -gt 4 -o '(' $$vmajor -eq 4 -a $$vminor -ge 8 ')' ]; then \
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   105
		mkdir -p $(HOME)/.config/mc $(HOME)/.local/share/mc/; \
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   106
		install -m 640 .local/share/mc/bashrc $(HOME)/.local/share/mc/; \
443
fa394c932c09 Fix path to 'mc.ext'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 433
diff changeset
   107
		cat .config/mc/mc.ext /etc/mc/mc.ext > $(HOME)/.config/mc/mc.ext; \
324
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   108
	else \
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   109
		mkdir -p $(HOME)/.mc; \
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   110
		install -m 640 .local/share/mc/bashrc $(HOME)/.mc; \
329
5c0a22da5ef3 Remove Cygwin version of mc.ext as they is exactly same.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 328
diff changeset
   111
		install -m 640 .config/mc/mc.ext $(HOME)/.mc/bindings; \
324
e30f2ac488aa Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 312
diff changeset
   112
	fi
295
7970a5d63d57 Add my magic file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
   113
	if command -v file 1>/dev/null; then \
7970a5d63d57 Add my magic file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
   114
		install -m 640 .magic $(HOME); \
7970a5d63d57 Add my magic file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
   115
		cd $(HOME); \
7970a5d63d57 Add my magic file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
   116
		file --compile -m .magic; \
7970a5d63d57 Add my magic file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
   117
	fi
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   118
13
9e590e7ef108 Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 12
diff changeset
   119
.PHONY: uninstall
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   120
uninstall:
78
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   121
	for item in $(OVERRIDDEN_ITEMS); do \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   122
		if [ -f $$item ]; then \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   123
			[ -f $(HOME)/$$file ] && rm -f $(HOME)/$$item; \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   124
		fi; \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   125
		if [ -d $$item ]; then \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   126
			for file in `find $$item -depth`; do \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   127
				if [ -d $$file ]; then \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   128
					rmdir $(HOME)/$$file || :; \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   129
					continue; \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   130
				fi; \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   131
				[ -f $(HOME)/$$file ] && rm $(HOME)/$$file; \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   132
			done; \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   133
		fi; \
c014474497f0 Correct uninstall target.
user@gavenko
parents: 77
diff changeset
   134
	done
87
63b568f99e3c Install manually Midnight Commander ini files as for Cygwin and Debian
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 79
diff changeset
   135
	rm -f $(HOME)/.mc/bashrc $(HOME)/.mc/ini $(HOME)/.mc/bindings
63b568f99e3c Install manually Midnight Commander ini files as for Cygwin and Debian
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 79
diff changeset
   136
	rmdir $(HOME)/.mc || :
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   137
218
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
   138
################################################################
249
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   139
# Docs targets.
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   140
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   141
.PHONY: html
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   142
html: $(HTML_FILES)
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   143
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   144
# --stylesheet=rst.css
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   145
$(HTML_FILES): %.html: %.rst
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   146
	$(RST2HTML) $*.rst $@
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   147
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   148
################################################################
218
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
   149
# Clean targets.
92582492ecde Add heading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 217
diff changeset
   150
13
9e590e7ef108 Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 12
diff changeset
   151
.PHONY: clean
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   152
clean:
249
22e93995e88a Add docs targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 234
diff changeset
   153
	rm -f $(HTML_FILES)
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   154
13
9e590e7ef108 Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 12
diff changeset
   155
.PHONY: distclean
0
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   156
distclean: clean
217
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   157
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   158
################################################################
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   159
# Helper target.
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   160
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   161
.PHONY: help
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   162
help:
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   163
	@echo
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   164
	@echo Supported targets:
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   165
	@sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*=  \1=;p;}' $(MAKEFILE_LIST)
fdcf941346bb Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 216
diff changeset
   166