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