1# install-programs.mk: install programs
2#
3################################################################
4# Copyright (C) 2001, 2002 Tom Lord
5#
6# See the file "COPYING" for further information about
7# the copyright and warranty status of this work.
8#
9
10
11
12ifndef install-programs-mk
13install-programs-mk	:= 1
14
15# Already set upon entry (see also "programs.mk"):
16#
17#	$(programs)	the file-names (no directories) of the programs
18#
19# After installation, the build directory will contain "Installed-programs"
20# which is a list of the programs that were installed.
21#
22
23include $(makefiles)/rules.mk
24
25install:	install-programs Installed-programs
26
27install-programs Installed-programs: $(programs)
28ifdef programs
29	for f in $(programs) ; do test ! -e $(program-install-dir)/$$f || rm -f $(program-install-dir)/$$f; done
30	mkdir -p $(program-install-dir)
31	cp $(programs) $(program-install-dir)
32endif
33	echo $(programs) | sed -f $(makefiles)/column.sed > Installed-programs
34
35clean: clean-install-programs
36
37clean-install-programs:
38	test ! -e Installed-programs || rm Installed-programs
39
40endif
41
42# arch-tag: Tom Lord Tue Dec  4 14:47:15 2001 (install-programs.mk)
43#
44