-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
610 lines (460 loc) · 14 KB
/
Makefile
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
# Install a program via apt-get
debug = $(if $(MAKE_DEBUG),--debug)
installer = @perl install/install.pl $(debug) $(1)
install_prog = $(call installer,install) $(1)
linkf = $(call installer,link) $(1) $(2)
link_contents = $(call installer,link_contents) $(1) $(2)
##############################
#### Configuration Groups ####
##############################
.PHONY: configure_all \\
bootstrap \\
configure_cpanm \\
configure_dev_all \\
configure_dev \\
configure_dev_heavy \\
configure_dev_emacs \\
configure_dev_language_all \\
configure_dev_common_lisp \\
configure_dev_haskell \\
configure_dev_idris \\
configure_dev_java \\
configure_dev_javascript \\
configure_dev_ocaml \\
configure_dev_perl \\
configure_dev_ruby \\
configure_dev_terminal \\
configure_perl_local_lib \\
configure_vim \\
configure_display \\
configure_x_keyboard \\
configure_scripts \\
configure_tools \\
configure_user_all \\
configure_web
# Full Configuration
configure_all : bootstrap configure_dev_all configure_user_all
# Configure programs required (or recommended) for configuration of the installer
bootstrap : configure_recutils
# Full development configuration
configure_dev_all : configure_dev_heavy configure_dev_language_all
# General development
# Git for general version control.
# Tmux for easier multi-session development in a terminal.
# Vim as a fairly light-weight editor
configure_dev : link_bash configure_git link_tmux configure_vim
# General development, but using Emacs as editor.
configure_dev_heavy : configure_emacs
# All language development
configure_dev_language_all : \
configure_dev_common_lisp \
configure_dev_haskell \
configure_dev_idris \
configure_dev_java \
configure_dev_javascript \
configure_dev_ocaml \
configure_dev_perl \
configure_dev_ruby
# Common Lisp development
configure_dev_common_lisp : configure_sbcl
# Haskell development
configure_dev_haskell : configure_dev install_haskell_platform link_ghci
# Idris development
configure_dev_idris : install_idris
# Java development
configure_dev_java : configure_eclim configure_emacs configure_jdk
# JavaScript development
configure_dev_javascript : configure_node
# OCaml development
configure_dev_ocaml : configure_ocaml configure_opam
# Perl development
configure_dev_perl : configure_cpanm
configure_perl_local_lib : install_perl_local_lib
.PHONY: install_perl_local_lib
install_perl_local_lib :
$(call install_prog,perl_local_lib)
# Ruby development
configure_dev_ruby : install_ruby1.9.1 link_irb
# Enhanced development in Vim
# NOTE: We should also set up YCM here, but install is currently broken.
configure_vim : link_vim setup_vundle_plugins
# X config
configure_display : configure_urxvt configure_x_keyboard configure_xinit configure_xmonad \
configure_xrandr configure_xrdb configure_xscreensaver configure_xset link_xresources
# Setup for working in a terminal.
configure_dev_terminal : configure_dev configure_tmuxinator
# Keyboard (when using X)
configure_x_keyboard : install_setxkbmap
# Misc scripts
configure_scripts : link_scripts
# Slack for workplace communication
.PHONY: configure_social
configure_social : configure_slack
# Misc tools
# freemind for mind mapping
# htop for viewing processes
# libreoffice as an office suite
# Owncloud-desktop for file backup and syncing.
# Shutter for screenshots.
# Tmuxinator for Tmux session config.
configure_tools : \
configure_freemind \
configure_htop \
configure_libreoffice \
configure_okular \
configure_owncloud_desktop \
install_shutter \
link_tmuxinator
# Better user experience (personal tools)
configure_user_all : configure_display configure_tools configure_scripts \
configure_social configure_tex configure_web
# Web use
# Icecat for browser.
# Vimperator for Vim-like bindings.
configure_web : install_icecat link_vimperator
#############################
#### Individual Programs ####
#############################
.PHONY: configure_agda
configure_agda : install_agda link_agda
.PHONY: install_agda
install_agda :
$(call install_prog,agda)
$(call install_prog,agda_stdlib)
.PHONY: link_agda
link_agda :
$(call linkf,agda/libraries,.agda/libraries)
$(call linkf,agda/defaults,.agda/defaults)
.PHONY: configure_apache_ant
configure_apache_ant : install_apache_ant
.PHONY: install_apache_ant
install_apache_ant :
$(call install_prog,apache_ant)
.PHONY: configure_aspell
configure_aspell : install_aspell
.PHONY: install_aspell
install_aspell :
$(call install_prog,aspell)
$(call install_prog,aspell-dict-en)
.PHONY: link_bash
link_bash :
@$(call linkf,bash/.bash,.bash)
@$(call linkf,bash/.profile,.profile)
@$(call linkf,bash/.bash/.bashrc,.bashrc)
@$(call linkf,bash/.bash_profile,.bash_profile)
.PHONY: configure_cask
configure_cask : link_cask
.PHONY: install_cask
install_cask :
@$(call install_prog,cask)
.PHONY: link_cask
link_cask : install_cask
@$(call linkf,emacs/custom/Cask,.emacs.d/Cask)
configure_cpanm : install_cpanm
.PHONY: install_cpanm
install_cpanm : configure_perl_local_lib
$(call install_prog,cpanm)
.PHONY: configure_eclim
configure_eclim : configure_apache_ant configure_eclipse install_eclim
.PHONY: install_eclim
install_eclim :
$(call install_prog,eclim)
.PHONY: configure_eclipse
configure_eclipse : install_eclipse
.PHONY: install_eclipse
install_eclipse :
$(call install_prog,eclipse)
.PHONY: install_emacs
install_emacs :
@$(call install_prog,emacs)
# Requires aspell for spell checking
# Requires cask for some dependency management
# Requires mercurial for 'evil'
# Requires mu for e-mail
# Requires Inconsolata font (used as font in Emacs)
.PHONY: configure_emacs
configure_emacs : configure_aspell configure_cask configure_mu install_font_inconsolata install_mercurial link_emacs
.PHONY: link_emacs
link_emacs : install_emacs
@$(call linkf,emacs/custom,.emacs.d/custom)
@$(call linkf,emacs/custom/init.el,.emacs.d/init.el)
@$(call linkf,emacs/custom/config.org,.emacs.d/config.org)
.PHONY: configure_freemind
configure_freemind : link_freemind
.PHONY: link_freemind
link_freemind :
@$(call linkf,freemind/patterns.xml,.freemind/patterns.xml)
@$(call linkf,freemind/user.properties,.freemind/user.properties)
.PHONY: configure_htop
configure_htop : install_htop
.PHONY: install_htop
install_htop :
$(call install_prog,htop)
.PHONY: configure_gcc
configure_gcc : install_gcc
.PHONY: install_gcc
install_gcc :
$(call install_prog,gcc)
.PHONY : install_ghci
install_ghci :
@[ $$(which ghci) ] || make install_haskell_platform
.PHONY: link_ghci
link_ghci : install_ghci
$(call linkf,haskell/.ghci,.ghci)
.PHONY: configure_git
configure_git : link_git configure_git_autocomplete
.PHONY: install_git
install_git :
$(call install_prog,git)
.PHONY: link_git
link_git : install_git
$(call linkf,git/.gitconfig,.gitconfig)
git_completion_target=~/.git-completion.bash
.PHONY: configure_git_autocomplete
configure_git_autocomplete :
@if [ ! -f $(git_completion_target) ]; then \
echo "Downloading git completion file" \
&& curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o $(git_completion_target); fi
.PHONY: configure_glibc
configure_glibc : install_glibc
.PHONY: install_glibc
install_glibc :
$(call install_prog,glibc)
.PHONY: install_haskell_platform
install_haskell_platform :
@$(call install_prog,haskell-platform)
.PHONY: install_icecat
install_icecat :
@$(call install_prog,icecat)
.PHONY: install_icedtea_jdk
install_icedtea_jdk :
$(call install_prog,icedtea_jdk)
.PHONY: install_idris
install_idris :
@$(call install_prog,idris)
.PHONY: link_irb
link_irb : install_ruby1.9.1
@$(call linkf,ruby/.irbrc,.irbrc)
.PHONY: configure_jdk
configure_jdk : install_icedtea_jdk
.PHONY: configure_libreoffice
configure_libreoffice : install_libreoffice
.PHONY: install_libreoffice
install_libreoffice :
@$(call install_prog,libreoffice)
.PHONY: install_mercurial
install_mercurial : install_pip
@$(call install_prog,mercurial)
.PHONY: install_mu
install_mu :
@$(call install_prog,mu)
# Use offlineimap for fetching mail
.PHONY: configure_mu
configure_mu : configure_offlineimap install_mu
.PHONY: configure_node
configure_node : install_node link_npm
.PHONY: install_node
install_node :
@$(call install_prog,node)
.PHONY: link_npm
link_npm :
@$(call linkf,node/.npmrc,.npmrc)
.PHONY: install_offlineimap
install_offlineimap :
@$(call install_prog,offlineimap)
.PHONY: link_offlineimap
link_offlineimap : install_offlineimap
@$(call linkf,mail/.offlineimaprc,.offlineimaprc)
.PHONY: configure_offlineimap
configure_offlineimap : link_offlineimap
.PHONY: configure_okular
configure_okular : link_okular
.PHONY: install_okular
install_okular :
$(call install_prog,okular)
.PHONY: link_okular
link_okular : install_okular
$(call linkf,x/okularpartrc,.config/okularpartrc)
.PHONY: configure_owncloud_desktop
configure_owncloud_desktop : install_owncloud_desktop link_owncloud_desktop
.PHONY: install_owncloud_desktop
install_owncloud_desktop :
@$(call install_prog,owncloud_desktop)
.PHONY: link_owncloud_desktop
link_owncloud_desktop :
@$(call linkf,cloud/owncloud/sync-exclude.lst,.config/ownCloud/sync-exclude.lst)
.PHONY: configure_ocaml
configure_ocaml : install_ocaml
.PHONY: install_ocaml
install_ocaml :
@$(call install_prog,ocaml)
.PHONY: configure_opam
configure_opam : install_opam
.PHONY: install_opam
install_opam :
@$(call install_prog,opam)
.PHONY: install_pip
install_pip :
$(call install_prog,pip2)
$(call install_prog,pip3)
.PHONY: configure_recutils
configure_recutils : install_recutils
.PHONY: install_recutils
install_recutils :
$(call install_prog,recutils)
.PHONY: configure_rofi
configure_rofi : install_rofi link_xresources
.PHONY: install_rofi
install_rofi :
$(call install_prog,rofi)
.PHONY: install_ruby1.9.1
install_ruby1.9.1 :
$(call install_prog,ruby1.9.1)
.PHONY: configure_sbcl
configure_sbcl : install_sbcl
.PHONY: install_sbcl
install_sbcl :
$(call install_prog,sbcl)
.PHONY: link_scripts
link_scripts :
$(call linkf,bash/scripts,.local/bin/scripts)
.PHONY: install_setxkbmap
setxkbmap :
@$(call install_prog,setxkbmap)
.PHONY: install_shutter
install_shutter :
@$(call install_prog,shutter)
.PHONY: configure_slack
configure_slack : install_slack
.PHONY: install_slack
install_slack :
$(call install_prog,slack)
.PHONY: configure_tex
configure_tex : configure_texlive
.PHONY: configure_texlive
configure_texlive : install_texlive
.PHONY: install_texlive
install_texlive :
$(call install_prog,texlive)
.PHONY: install_tmux
install_tmux :
$(call install_prog,tmux)
.PHONY: link_tmux
link_tmux : install_tmux
@$(call linkf,tmux/.tmux.conf,.tmux.conf)
.PHONY: configure_tmuxinator
configure_tmuxinator : link_tmuxinator
.PHONY: install_tmuxinator
install_tmuxinator : install_ruby1.9.1
$(call install_prog,tmuxinator)
.PHONY: link_tmuxinator
link_tmuxinator : install_tmuxinator
@$(call linkf,tmux/.tmuxinator,.tmuxinator)
# Inconsolata is preferred terminal font.
.PHONY: configure_urxvt
configure_urxvt : install_font_inconsolata install_urxvt
.PHONY : install_urxvt
install_urxvt :
$(call install_prog,urxvt)
.PHONY: install_vim
install_vim :
$(call install_prog,vim)
.PHONY: link_vim
link_vim :
$(call linkf,vim/.vimrc,.vimrc)
@mkdir -p $(HOME)/.vim
$(call linkf,vim/.vim/UltiSnips,.vim/UltiSnips)
.PHONY: link_vimperator
link_vimperator :
$(call linkf,vim/.vimperatorrc,.vimperatorrc)
vundle_dir = $(HOME)/.vim/bundle
.PHONY: install_vundle
install_vundle : install_git
@mkdir $(vundle_dir) -p
@[ -e "$(vundle_dir)/Vundle.vim" ] \
|| git clone https://github.com/gmarik/Vundle.vim.git $(HOME)/.vim/bundle/Vundle.vim
.PHONY: configure_xinit
configure_xinit : link_xinit
.PHONY: install_xinit
install_xinit :
$(call install_prog,xinit)
.PHONY: link_xinit
link_xinit : install_xinit
$(call linkf,x/.xserverrc,.xserverrc)
$(call linkf,x/.xinitrc,.xinitrc)
.PHONY: configure_xmobar
configure_xmobar : link_xmobar
.PHONY: install_xmobar
install_xmobar :
$(call install_prog,xmobar)
.PHONY: link_xmobar
link_xmobar : install_xmobar
$(call linkf,x/.xmobarrc,.xmobarrc)
.PHONY: configure_xmonad
configure_xmonad : configure_rofi link_xmonad configure_xorg
.PHONY: install_xmonad
install_xmonad : configure_gcc configure_glibc configure_xmobar
$(call install_prog,xmonad)
$(call install_prog,xmonad_contrib)
.PHONY: link_xmonad
link_xmonad : install_xmonad
$(call linkf,x/.xmonad/xmonad.hs,.xmonad/xmonad.hs)
.PHONY: configure_xorg
configure_xorg : install_xorg
.PHONY: install_xorg
install_xorg :
$(call install_prog,xorg_server)
.PHONY: configure_xrandr
configure_xrandr : install_xrandr
.PHONY: install_xrandr
install_xrandr :
$(call install_prog,xrandr)
.PHONY: configure_xrdb
configure_xrdb : install_xrdb
.PHONY: install_xrdb
install_xrdb :
$(call install_prog,xrdb)
.PHONY: link_xresources
link_xresources :
$(call linkf,x/.Xresources,.Xresources)
.PHONY: configure_xscreensaver
configure_xscreensaver : link_xscreensaver
.PHONY: install_xscreensaver
install_xscreensaver :
$(call install_prog,xscreensaver)
.PHONY: link_xscreensaver
link_xscreensaver : install_xscreensaver
$(call linkf,x/.xscreensaver,.xscreensaver)
.PHONY: configure_xset
configure_xset : install_xset
.PHONY: install_xset
install_xset :
$(call install_prog,xset)
# Other
.PHONY: setup_ycm
setup_ycm : install_vundle
@$(call install_prog,cmake) \
&& $(call install_prog,python-dev) \
&& cd $(vundle_dir)/youcompleteme \
&& ./install.py
.PHONY: setup_vundle_plugins
setup_vundle_plugins : install_vundle
@vim -c 'exec "PluginInstall" | qa'
solarized_file_url = "https://raw.githubusercontent.com/seebi/dircolors-solarized/master/dircolors.256dark"
solarized_color_file = $(HOME)/.dircolors
.PHONY: get_solarized_colors
get_solarized_colors :
@[ -e $(solarized_color_file) ] \
|| (echo "Retrieving solarized colorscheme" \
&& wget -q $(solarized_file_url) -O $(solarized_color_file))
.PHONY: install_fontconfig
install_fontconfig :
@$(call install_prog,fontconfig)
.PHONY: install_font_inconsolata
install_font_inconsolata :
@$(call install_prog,font_inconsolata)
# Vim Linters
vim_linters = install_vim-vint
.PHONY: install_vim-vint
install_vim-vint :
@pip3 install --user vim-vint