bin/disorder-play-on-demand: Script to set up on-demand playing.
[profile] / Makefile
CommitLineData
67b1a15a
MW
1## -*-makefile-*-
2
807c317e 3all:
5e776d3c
MW
4.PHONY: all
5
6clean::
7.PHONY: clean
8
67b1a15a
MW
9.SECONDEXPANSION: #sorry
10
11###--------------------------------------------------------------------------
12### Utilities.
13
14##
15quote = '$(subst ','\'',$1)'#'
16
17## Suss out how to print stuff.
18print = printf "%s" $(call quote,$1)
19
20## Looking configuration things up.
21mdw-conf = $(shell bin/mdw-conf "$1" "$2")
22
23## Checking symlink targets.
24symlink-ok-p = $(shell \
25 case $$(readlink 2>/dev/null $1) in ($2) echo t ;; esac)
26
27## Silent rules machinery.
28V = 0
67b1a15a
MW
29V_AT = $(V_AT_$V)
30V_AT_0 = @
2e0a8012 31v_print = $(call v_print_$V,$1,$2)
a811ce27
MW
32v_print_0 = \
33 printf " %-8s %s\n" "$1" $(call quote,$(patsubst $(HOME)/%,~/%,$2));
2e0a8012 34v_tag = $(V_AT)$(call v_print_$V,$1,$@)
67b1a15a
MW
35
36## Hack.
37relax =
38
39###--------------------------------------------------------------------------
40### Configuration.
41
42## Figure out where I am.
3337f511 43HERE := $(shell pwd)
67b1a15a
MW
44
45## Decide on how to fetch things from URLs.
46ifeq ($(shell (curl >/dev/null 2>&1 --version || [ $$? -eq 2 ]) && echo t),t)
47 get-url = curl -fs -o $1 $2
48else
49 get-url = wget -q -O $1 $2
50endif
51
52## Which Emacs should I use?
53EMACS := $(shell \
54 emacs=nil; \
55 for i in emacs24 emacs23 emacs22 emacs21 emacs; do \
3337f511
MW
56 if type >/dev/null 2>&1 $$i; then emacs=$$i; break; fi; \
57 done; \
58 echo $$emacs)
67b1a15a
MW
59
60## Whence to obtain externally hosted stuff.
61REPO = https://ftp.distorted.org.uk/u/mdw/profile
62
63## Additional local configuration.
64-include local.mk
65
66###--------------------------------------------------------------------------
67### Some utility rules.
68
69_force:
70.PHONY: _force
71
72###--------------------------------------------------------------------------
73### Emacs.
74
967148ff
MW
75ifneq ($(EMACS),nil)
76
67b1a15a
MW
77EMACSLIB = $(HOME)/lib/emacs
78
486623cb 79EMACS_VERSION := $(shell $(EMACS) 2>&1 -Q --batch --eval \
b2f6f110
MW
80 '(message "%s %s" emacs-major-version emacs-minor-version)' | \
81 tail -n1)
486623cb
MW
82emacs-version-p = $(shell set -- $(EMACS_VERSION); \
83 if [ $$1 -gt $1 ] || ([ $$1 -eq $1 ] && [ $$2 -ge $2 ]); then \
84 echo t; \
85 fi)
86
6369ae29
MW
87ELISP += make-regexp ew-hols
88ELISP += mdw-gnus-patch
89ELISP += mdw-multiple-cursors
90ELISP += git git-blame vc-git stgit quilt
486623cb
MW
91
92ifeq ($(call emacs-version-p,24,3),t)
6369ae29 93ELISP += bracketed-paste
486623cb 94endif
67b1a15a 95
3e441da6
MW
96ELISP += dot-emacs
97dot-emacs_DEPS = make-regexp
98
67b1a15a 99SCRIPTLINKS += emacsclient-hack movemail-hack sendmail-hack
cef9886f 100SCRIPTLINKS += aspell-hack emerge-hack wakey.sh
67b1a15a 101
3e441da6 102%.elc: %.el $$(foreach e, $$($$*_DEPS), $$(DEP_$$e))
83198952
MW
103 $(call v_tag,EMACS)if ! $(EMACS) >$*.build-log 2>&1 \
104 -L el/ -L $(EMACSLIB) \
67b1a15a 105 --batch --no-site-file \
34b3e368 106 --eval '(kill-emacs (if (byte-compile-file "$<") 0 2))'; then \
83198952
MW
107 cat $*.build-log; exit 2; \
108 fi
67b1a15a 109
6369ae29
MW
110LOCAL_ELISP = $(filter $(notdir $(wildcard el/*.el)), \
111 $(addsuffix .el, $(ELISP)))
112$(foreach e, $(LOCAL_ELISP), \
113 $(eval DEP_$(basename $e) = $(EMACSLIB)/$(e:.el=.elc)))
67b1a15a
MW
114$(addprefix $(EMACSLIB)/, $(LOCAL_ELISP)): $(EMACSLIB)/%: el/%
115 $(call v_tag,SYMINK)mkdir -p $(EMACSLIB) && \
116 rm -f $@.new && \
117 ln -s $(HERE)/$< $@.new && \
118 mv $@.new $@
119
120REMOTE_ELISP = $(filter-out $(notdir $(wildcard el/*.el)), \
6369ae29 121 $(addsuffix .el, $(ELISP)))
67b1a15a 122$(foreach e, $(REMOTE_ELISP), \
6369ae29 123 $(eval DEP_$(basename $e) = $(if $(shell \
67b1a15a
MW
124 if $(EMACS) >/dev/null 2>&1 --no-site-file -q --batch \
125 --eval ' \
126 (progn \
127 (kill-emacs (condition-case nil \
128 (progn (load-library "$e") 0) \
129 (error 1))))'; then \
130 echo t; \
131 fi),, $(EMACSLIB)/$(e:.el=.elc))))
132$(addprefix $(EMACSLIB)/, $(REMOTE_ELISP)): $(EMACSLIB)/%:
133 $(call v_tag,FETCH)mkdir -p $(EMACSLIB) && \
134 $(call get-url,$@.new,$(REPO)/$*) && \
135 mv $@.new $@
136
137DOTLINKS += .emacs .emacs-calc .vm .gnus.el .ercrc.el
138
807c317e 139all: $(foreach e, $(ELISP), $(DEP_$e))
6369ae29 140$(foreach e, $(ELISP), $(eval _emacs.$e: $(EMACSLIB)/$e.elc))
67b1a15a 141
967148ff
MW
142endif
143
67b1a15a
MW
144###--------------------------------------------------------------------------
145### Other simpler things.
146
147$(HOME)/.mdw.conf:
148 $(call v_tag,COPY)cp mdw.conf $@.new && mv $@.new $@
149
150## Utility packages.
151PACKAGES += mlib checkpath
152mlib_CHECK = crc-mktab
153checkpath_CHECK = tmpdir
154checkpath_DEPS = mlib
155
156## Packaging machinery.
157SCRIPTLINKS += mdw-build mdw-sbuild mdw-sbuild-server
158SCRIPTLINKS += update-buildable-branch
f0637893
MW
159DOTLINKS += .config/mdw-build.conf
160.config/mdw-build.conf_SRC = mdw-build.conf
67b1a15a
MW
161
162## Shells.
163DOTLINKS += .profile .shell-rc .shell-logout
a3857ab2 164DOTLINKS += .shrc
9ba9bb2f
MW
165DOTLINKS += .zprofile .zshrc .zlogout .zshenv
166DOTLINKS += .bash_profile .bash_completion .bash_logout
167DOTLINKS += .bashrc .inputrc
67b1a15a
MW
168.bash_profile_SRC = bash-profile
169.bash_completion_SRC = bash-completion
9ba9bb2f
MW
170.bash_logout_SRC = shell-logout
171.zlogout_SRC = shell-logout
67b1a15a 172
807c317e
MW
173all: zap-stale-zcompdump
174zap-stale-zcompdump:
72123a3a
MW
175 $(V_AT)if [ $(HOME)/.zcompdump -ot dot/zshrc ]; then \
176 $(call v_print,ZAP,$(HOME)/.zcompdump)rm -f $(HOME)/.zcompdump; \
177 fi
807c317e 178.PHONY: zap-stale-zcompdump
72123a3a 179
a3857ab2
MW
180## The Plan 9 `rc' shell. This needs special hacking, because the Linux port
181## and Plan 9 From User Space have incompatible syntax.
182DOTLINKS += lib/profile
183lib/profile_SRC = rcrc
807c317e 184all: $(HOME)/.rcrc
a3857ab2
MW
185$(HOME)/.rcrc: dot/rcrc
186 $(call v_tag,SED)sed 's/; if not/else/' $< >$@.new && mv $@.new $@
187
67b1a15a
MW
188## Git.
189DOTSUBST += .gitconfig
2e15741e 190SCRIPTLINKS += git-copyright-dates
67b1a15a
MW
191DOTLINKS += .cgrc .tigrc
192.gitconfig_SUBSTS = \
9ca6d190
MW
193 $(call substvar,releasekey,$(call mdw-conf,releasekey,481334C2)) \
194 $(call substvar,email,$(call mdw-conf,email,mdw@distorted.org.uk))
67b1a15a
MW
195$(HOME)/.gitconfig: $(HOME)/.mdw.conf
196
197## PulseAudio.
198DOTLINKS += .pulse/daemon.conf
199DOTSUBST += .pulse/default.pa
200.pulse/daemon.conf_SRC = pulse-daemon.conf
201.pulse/default.pa_SRC = pulse-default.pa.in
202
203## Other editors.
204DOTLINKS += .vimrc .mg .zile
205
206## Mail.
207DOTLINKS += .mailrc .signature .muttrc
208
209## Lisp.
6a8c8070
MW
210DOTLINKS += .cmucl-init.lisp .sbclrc .clisprc.lisp
211DOTLINKS += .eclrc .ccl-init.lisp .abclrc
67b1a15a
MW
212.cmucl-init.lisp_SRC = lisp-init.lisp
213.sbclrc_SRC = lisp-init.lisp
214.clisprc.lisp_SRC = lisp-init.lisp
215.eclrc_SRC = lisp-init.lisp
6a8c8070
MW
216.ccl-init.lisp_SRC = lisp-init.lisp
217.abclrc_SRC = lisp-init.lisp
67b1a15a
MW
218DOTLINKS += .swank.lisp
219
6f4c361e 220## IPython, Jupyter, and related annoyances.
67b1a15a
MW
221DOTLINKS += .ipython/profile_default/ipython_config.py
222DOTLINKS += .ipython/profile_default/startup/50-key-bindings.py
6f4c361e 223DOTLINKS += .jupyter/nbconfig/notebook.json
67b1a15a
MW
224.ipython/profile_default/ipython_config.py_SRC = ipython-config.py
225.ipython/profile_default/startup/50-key-bindings.py_SRC = ipython-key-bindings.py
6f4c361e 226.jupyter/nbconfig/notebook.json_SRC = jupyter-notebook.json
67b1a15a
MW
227
228## Other languages.
229DOTLINKS += .guile
230DOTLINKS += .tclshrc .wishrc
231.tclshrc_SRC = tclshrc
232.wishrc_SRC = tclshrc
233
bc61033e
MW
234## The `nocss' machinery.
235SCRIPTLINKS += nocss
236all: $(HOME)/lib/hacks/nocss/libdvdcss.so.2
237$(HOME)/lib/hacks/nocss/libdvdcss.so.2:
238 $(V_AT)mkdir -p $(dir $@)
239 $(call v_tag,TOUCH)touch $@
240
67b1a15a
MW
241## Random scripts.
242SCRIPTLINKS += mdw-editor mdw-pager
243SCRIPTLINKS += mdw-conf
244SCRIPTLINKS += svnwrap
245SCRIPTLINKS += guest-console
246SCRIPTLINKS += hyperspec
310d0527 247SCRIPTLINKS += bdl
878a38bd 248SCRIPTLINKS += datasyms
8945a62f 249SCRIPTLINKS += fixsub
01a5d0a6 250SCRIPTLINKS += check-debsyms
a98bca79 251SCRIPTLINKS += check-blkdev-size
a10bf242 252SCRIPTLINKS += xremote
d32df53a 253SCRIPTLINKS += disorder-play-on-demand remote-disorder
a10bf242 254SCRIPTLINKS += remote-slideshow
67b1a15a
MW
255
256## Random odds and ends.
3f7369a9 257DOTLINKS += .infokey .sqliterc
67b1a15a
MW
258DOTLINKS += .gdbinit .toprc .aspell.conf
259DOTLINKS += .dircolors .colordiffrc .screenrc .tmux.conf
260DOTLINKS += .cvsrc .indent.pro .ditz-config
da526ba7
MW
261DOTLINKS += .lftp/rc
262.lftp/rc_SRC = lftp-rc
dd794b20
MW
263DOTLINKS += .a2ps/a2psrc
264.a2ps/a2psrc_SRC = a2psrc
67b1a15a
MW
265DOTSUBST += .mykermrc
266SCRIPTLINKS += lesspipe.sh
267
268SCRIPTLINKS += run-with-shell-env
269SCRIPTLINKS += start-ssh-agent start-ssh-pageant
270SCRIPTLINKS += add-ssh-keys
271SCRIPTLINKS += hacks/ssh/ssh
272hacks/ssh/ssh_SRC = hacks/ssh
273
274DOTLINKS += .w3m/config .elinks/elinks.conf
275.w3m/config_SRC = w3m-config
276.elinks/elinks.conf_SRC = elinks.conf
277
278DOTLINKS += .mc/ini .mc/panels.ini
279.mc/ini_SRC = mc-ini
280.mc/panels.ini_SRC = mc-panels.ini
281
e8f132bd 282DOTLINKS += .parallel/config .parallel/sshloginfile
67b1a15a 283.parallel/config_SRC = parallel-config
e8f132bd 284.parallel/sshloginfile_SRC = parallel-hosts
67b1a15a 285
807c317e 286all: $(HOME)/.less
3f7369a9
MW
287$(HOME)/.less: dot/lesskey
288 $(V_AT)rm -f $(HOME)/.lesskey
289 $(call v_tag,LESSKEY)lesskey -o$@ $<
290
67b1a15a
MW
291###--------------------------------------------------------------------------
292### X11 configuration.
293
294ifeq ($X,t)
295
296PACKAGES += xtoys
297xtoys_CHECK = xatom
298xtoys_DEPS = mlib
299
300DOTLINKS += .xinitrc .xsession .xmodmap .vncrc .vncsession
df4bcc77
MW
301DOTLINKS += .config/fontconfig/fonts.conf
302.config/fontconfig/fonts.conf_SRC = fonts.conf
67b1a15a
MW
303DOTLINKS += .stalonetrayrc
304
67b1a15a
MW
305DOTLINKS += .config/gnome-session/sessions/mdw.session
306.config/gnome-session/sessions/mdw.session_SRC = mdw.session
307
308DOTLINKS += .Eterm/themes/Eterm/theme.cfg
309DOTLINKS += .enlightenment/keybindings.cfg
310DOTLINKS += .enlightenment-vnc/keybindings.cfg
311DOTLINKS += .e16/bindings.cfg
312.Eterm/themes/Eterm/theme.cfg_SRC = eterm-theme.cfg
313.enlightenment/keybindings.cfg_SRC = e-keybindings.cfg
314.enlightenment-vnc/keybindings.cfg_SRC = evnc-keybindings.cfg
315.e16/bindings.cfg_SRC = e16-bindings
316
317DOTLINKS += .gtkrc-2.0
318DOTLINKS += .config/gtk-3.0/gtk.css
319DOTLINKS += .config/gtk-3.0/settings.ini
320.config/gtk-3.0/gtk.css_SRC = gtk3.css
321.config/gtk-3.0/settings.ini_SRC = gtk3-settings.ini
322
a9d5edbf
MW
323DOTLINKS += .config/user-dirs.dirs .config/user-dirs.locale
324.config/user-dirs.dirs_SRC = user-dirs.dirs
325.config/user-dirs.locale_SRC = user-dirs.locale
326
67b1a15a
MW
327SCRIPTLINKS += xinitcmd lock-screen xshutdown
328SCRIPTLINKS += un-backslashify-selection
329SCRIPTLINKS += xpra-start-xdummy
5f9b345a 330SCRIPTLINKS += play-rawk
75a2ccd4 331SCRIPTLINKS += x2x-privsep
b3ee0533 332SCRIPTLINKS += xduplic-terminal
56e4c6c0 333SCRIPTLINKS += xzoomscr
67b1a15a
MW
334
335DOTCPP += .Xdefaults
336Xdefaults_DEFS = -DEMACSWD=$(call mdw-conf,emacs-width,77)
57a9b0cd 337$(HOME)/.Xdefaults: $(HOME)/.mdw.conf dot/Xdefaults.pterm
67b1a15a 338
ddc97f65
MW
339ifeq ($(shell case $${DISPLAY-nil} in (:[0-9]*) echo t ;; (*) echo nil ;; esac),t)
340dotfile-hook/.Xdefaults = \
8baf0354 341 $(call v_tag,XRDB)xrdb -load $<
ddc97f65
MW
342endif
343
67b1a15a
MW
344endif
345
346###--------------------------------------------------------------------------
53ad55a5
MW
347### Firefox things.
348
349ifeq ($(FIREFOX),t)
350
351out/:
352 $(call v_tag,MKDIR)mkdir $@
353
354out/firefox/: | out/
355 $(call v_tag,MKDIR)mkdir $@
356
357clean::; rm -rf out/
358
807c317e 359all: out/firefox/smartup-gestures.config
53ad55a5
MW
360out/firefox/smartup-gestures.config: firefox/smartup-gestures.json | out/firefox/
361 $(call v_tag,BLOB)\
362 jq -c . $< | bincode base64 >$@.new && mv $@.new $@
363
807c317e 364all: out/firefox/stylus.json
53ad55a5
MW
365out/firefox/stylus.json: firefox/stylus/ firefox/stylus/*.css | out/firefox/
366 $(call v_tag,IMPLODE)\
367 firefox/implode-stylus firefox/stylus/ >$@.new && \
368 mv $@.new $@
369endif
370
371###--------------------------------------------------------------------------
9c72b1b3
MW
372### General symlinking.
373
374misclink-source = $(HERE)/$(or $($1_SRC), $1)
375
807c317e 376all: $(addprefix $(HOME)/, $(MISCLINKS))
9c72b1b3
MW
377misclink-ok-p = \
378 $(call symlink-ok-p,$(HOME)/$1,$(call misclink-source,$1))
379$(addprefix $(HOME)/, $(subst %,\%,$(MISCLINKS))): $(HOME)/%: \
380 $$(if $$(call misclink-ok-p,$$*),,_force)
381 $(call v_tag,SYMLINK)mkdir -p $(dir $@) && \
382 rm -f $@.new && \
383 ln -s $(call misclink-source,$*) $@.new && \
384 mv $@.new $@
385 $(symlink-hook/$*)
386
387###--------------------------------------------------------------------------
67b1a15a
MW
388### Processing dotfiles.
389
390dotfile-source = $(HERE)/dot/$(or $($1_SRC), $(1:.%=%)$2)
391
4937ba2d 392## Easiest: just make symlinks.
67b1a15a
MW
393dotlink-ok-p = \
394 $(call symlink-ok-p,$(HOME)/$1,$(call dotfile-source,$1))
807c317e 395all: $(addprefix $(HOME)/, $(DOTLINKS))
67b1a15a
MW
396$(addprefix $(HOME)/, $(subst %,\%,$(DOTLINKS))): $(HOME)/%: \
397 $$(if $$(call dotlink-ok-p,$$*),,_force)
398 $(call v_tag,SYMLINK)mkdir -p $(dir $@) && \
399 rm -f $@.new && \
400 ln -s $(call dotfile-source,$*) $@.new && \
401 mv $@.new $@
f6c3a80b 402 $(dotfile-hook/$*)
67b1a15a
MW
403
404## Hack with the C preprocessor.
807c317e 405all: $(addprefix $(HOME)/, $(DOTCPP))
67b1a15a
MW
406$(addprefix $(HOME)/, $(subst %,\%,$(DOTCPP))): $(HOME)/%: \
407 $$(call dotfile-source,$$*) Makefile
408 $(call v_tag,CPP)mkdir -p $(dir $@) && \
409 rm -f $@.new && \
410 cpp -P -o$@.new $($*_DEFS) $< && \
411 mv $@.new $@
f6c3a80b 412 $(dotfile-hook/$*)
67b1a15a
MW
413
414## Hack by making simple substitutions.
415substvar = -e $(call quote,s\a@$1@\a$2\ag)
416SUBSTS += $(call substvar,home,$(HOME))
417SUBSTS += $(call substvar,profile,$(HERE))
807c317e 418all: $(addprefix $(HOME)/, $(DOTSUBST))
67b1a15a 419$(addprefix $(HOME)/, $(subst %,\%,$(DOTSUBST))): $(HOME)/%: \
33271a96 420 $$(call dotfile-source,$$*,.in) Makefile
67b1a15a
MW
421 $(call v_tag,SUBST)mkdir -p $(dir $@) && \
422 rm -f $@.new && \
423 sed -e "1i\
424$(relax)### generated by $(HERE)/Makefile; do not edit!" \
425 $(SUBSTS) $($*_SUBSTS) \
426 $(call dotfile-source,$*,.in) >$@.new && \
427 mv $@.new $@
f6c3a80b 428 $(dotfile-hook/$*)
67b1a15a
MW
429
430###--------------------------------------------------------------------------
431### Processing script links.
432
433script-source = $(HERE)/bin/$(or $($1_SRC), $1)
0cd3b798
MW
434
435ifeq ($(prefix-shebang-p),t)
807c317e 436all: $(addprefix $(HOME)/bin/, $(SCRIPTLINKS))
0cd3b798
MW
437$(addprefix $(HOME)/bin/, $(SCRIPTLINKS)): $(HOME)/bin/%: \
438 $$(call script-source,$$*) Makefile
439 $(call v_tag,SHEBANG)mkdir -p $(dir $@) && \
440 rm -f $@.new && \
441 sed "1s\a\(#! *\)/\a\1$(SHEBANG_PREFIX)/\a" \
442 $(call script-source,$*) >$@.new && \
443 chmod --reference=$(call script-source,$*) $@.new && \
444 mv $@.new $@
445 $(script-hook/$*)
446else
67b1a15a
MW
447scriptlink-ok-p = \
448 $(call symlink-ok-p,$(HOME)/bin/$1,$(call script-source,$1))
807c317e 449all: $(addprefix $(HOME)/bin/, $(SCRIPTLINKS))
67b1a15a
MW
450$(addprefix $(HOME)/bin/, $(SCRIPTLINKS)): $(HOME)/bin/%: \
451 $$(if $$(call scriptlink-ok-p,$$*),,_force)
452 $(call v_tag,SYMLINK)mkdir -p $(dir $@) && \
453 rm -f $@.new && \
454 ln -s $(call script-source,$*) $@.new && \
455 mv $@.new $@
f6c3a80b 456 $(script-hook/$*)
0cd3b798 457endif
67b1a15a 458
807c317e 459all: $(addprefix $(HOME)/bin/, $(SCRIPTLINKS))
67b1a15a
MW
460
461###--------------------------------------------------------------------------
462### Building packages from source tarballs.
463
464SRCDIR = $(HOME)/src/profile
465
466pkg-builddir = $(SRCDIR)/$1/build
467pkg-stamp = $(call pkg-builddir,$1)/$2-stamp
468
469$(foreach p, $(PACKAGES), $(eval DEP_$p = $(if $(shell \
470 if $($p_CHECK) >/dev/null 2>&1 --version; then echo t; fi),, \
471 $(call pkg-stamp,$p,install))))
472
473$(PACKAGES:%=$(SRCDIR)/%.tar.gz): $(SRCDIR)/%.tar.gz:
474 $(call v_tag,FETCH)mkdir -p $(SRCDIR) && \
475 rm -f $@.new && \
476 $(call get-url,$@.new,$(REPO)/$*.tar.gz) && \
477 mv $@.new $@
478
479$(foreach p, $(PACKAGES), $(call pkg-stamp,$p,unpack)): \
480 $(call pkg-stamp,%,unpack): $(SRCDIR)/%.tar.gz
481 $(call v_tag,EXTRACT)rm -rf $(SRCDIR)/$* && \
482 mkdir $(SRCDIR)/$*.tmp-unpack && \
483 cd $(SRCDIR)/$*.tmp-unpack && \
484 gzip -cd ../$*.tar.gz | tar xf - && \
485 mv * ../$* && \
486 cd .. && \
487 rmdir $*.tmp-unpack && \
488 mkdir $*/build && \
489 touch $*/build/unpack-stamp
490
491$(foreach p, $(PACKAGES), $(call pkg-stamp,$p,configure)): \
492 $(call pkg-stamp,%,configure): \
493 $(call pkg-stamp,%,unpack) \
494 $$(foreach p, $$($$*_DEPS), $$(DEP_$$p))
495 $(call v_tag,CONFIG)cd $(dir $@) && \
496 ../configure --prefix=$(HOME) \
497 PKG_CONFIG_PATH=$(HOME)/lib/pkgconfig \
498 $($*_CONFIG) >>buildlog 2>&1 && \
499 touch configure-stamp
500
501$(foreach p, $(PACKAGES), $(call pkg-stamp,$p,build)): \
502 $(call pkg-stamp,%,build): \
503 $(call pkg-stamp,%,configure)
504 $(call v_tag,BUILD)cd $(dir $@) && \
505 $(MAKE) $($*_MAKEFLAGS) >>buildlog 2>&1 && \
506 touch build-stamp
507
508$(foreach p, $(PACKAGES), $(call pkg-stamp,$p,install)): \
509 $(call pkg-stamp,%,install): \
510 $(call pkg-stamp,%,build)
511 $(call v_tag,INSTALL)cd $(dir $@) && \
512 $(MAKE) $($*_MAKEFLAGS) install >>buildlog 2>&1 && \
513 touch install-stamp
f6c3a80b 514 $(package-hook/$*)
67b1a15a 515
807c317e 516all: $(foreach p, $(PACKAGES), $(DEP_$p))
67b1a15a
MW
517$(foreach p, $(PACKAGES), $(eval _pkg.$p: $(call pkg-stamp,$p,install)))
518
519###----- That's all, folks --------------------------------------------------