2 # various install rules
5 local _ttt = [ Split "$(<[1])" ] ;
6 local _len = [ ListLength $(_ttt) ];
7 if $(_len) != "0" && $(_ttt[$(_len)]) != "/" { _ttt = "$(<[1])/" ; } else { _ttt = $(<[1]) ; }
13 local ddd = [ AddSlash $(DESTDIR) ] ;
14 local spl = [ Split $(<) ] ;
17 local ppp = [ AddSlash $(PREFIX) ] ;
18 if ! $(ppp) { ppp = "/usr/local/" ; }
19 if $(ddd) { ppp = $(ddd)$(ppp) ; }
27 # InstallInto dir : sources ;
31 t = $(>:G=$(INSTALLGRIST)) ;
32 ddir = [ InstallDestDir $(<) ] ;
34 # Arrange for jam install
35 # Arrange for jam uninstall
36 # sources are in SEARCH_SOURCE
39 Depends install : $(t) ;
40 Clean uninstall : $(t) ;
41 SEARCH on $(ddir) = $(SEARCH_SOURCE) ;
42 MakeLocate $(t) : $(ddir) ;
44 # For each source, make gristed target name
45 # and Install, Chmod, Chown, and Chgrp
47 local tt = $(i:G=$(INSTALLGRIST)) ;
49 Depends $(tt) : $(i) ;
50 Install $(tt) : $(i) ;
53 if $(OWNER) && $(CHOWN) {
55 OWNER on $(tt) = $(OWNER) ;
57 if $(GROUP) && $(CHGRP) {
59 GROUP on $(tt) = $(GROUP) ;
65 # /InstallBin dir : sources ;
67 # Copy _sources_ into _dir_ with mode $(EXEMODE)
70 local _t = [ FAppendSuffix $(>) : $(SUFEXE) ] ;
72 InstallInto $(<) : $(_t) ;
73 MODE on $(_t:G=$(INSTALLGRIST)) = $(EXEMODE) ;
77 # /InstallFile dir : sources ;
79 # Copy _sources_ into _dir_ with mode $(FILEMODE)
82 InstallInto $(<) : $(>) ;
83 MODE on $(>:G=$(INSTALLGRIST)) = $(FILEMODE) ;
87 # /InstallLib dir : sources ;
89 # Copy _sources_ into _dir_ with mode $(FILEMODE)
92 InstallInto $(<) : $(>) ;
93 MODE on $(>:G=$(INSTALLGRIST)) = $(FILEMODE) ;
97 # /InstallMan dir : sources ;
99 # Copy _sources_ into the appropriate subdirectory of _dir_ with mode
100 # $(FILEMODE). The subdirectory is manS, where S is the suffix of each of
104 # Really this just strips the . from the suffix
109 case .1 : s = 1 ; case .2 : s = 2 ; case .3 : s = 3 ;
110 case .4 : s = 4 ; case .5 : s = 5 ; case .6 : s = 6 ;
111 case .7 : s = 7 ; case .8 : s = 8 ; case .l : s = l ;
112 case .n : s = n ; case .man : s = 1 ;
115 InstallInto $(d:R=$(<)) : $(i) ;
117 MODE on $(>:G=$(INSTALLGRIST)) = $(FILEMODE) ;
121 # /InstallShell dir : sources ;
123 # Copy _sources_ into _dir_ with mode $(SHELLMODE)
126 InstallInto $(<) : $(>) ;
127 MODE on $(>:G=$(INSTALLGRIST)) = $(SHELLMODE) ;