3 7b4d8efb 2022-02-04 op # stuff we should do in the makefile
4 7ae13e25 2022-02-04 op # but can't for portability reasons.
5 7ae13e25 2022-02-04 op # public domain
9 7b4d8efb 2022-02-04 op files="$files $2"
10 c6435c22 2022-02-04 op dotfiles="$HOME/$1 $dotfiles"
11 6b8ba66c 2022-02-04 op xxxfiles="${2%.lp} $xxxfiles"
13 c6435c22 2022-02-04 op dname=$(dirname "$HOME/$1")
14 7b4d8efb 2022-02-04 op cat <<EOF >> Makefile.local
16 c6435c22 2022-02-04 op [ ! -d "$dname" ] && mkdir -p "$dname" || true
17 7b4d8efb 2022-02-04 op ./lpp \$? > \$@
20 7e6fb0e3 2022-02-21 op if [ -n "$3" ]; then
21 7e6fb0e3 2022-02-21 op printf '\tchmod %s $@\n' "$3" >> Makefile.local
23 7e6fb0e3 2022-02-21 op echo >> Makefile.local
28 6b8ba66c 2022-02-04 op gemfiles="gem/$1.gmi $gemfiles"
29 6b8ba66c 2022-02-04 op wwwfiles="www/$1.html $wwwfiles"
30 6b8ba66c 2022-02-04 op cat <<EOF >> Makefile.local
31 6b8ba66c 2022-02-04 op gem/$1.gmi: $2
32 6b8ba66c 2022-02-04 op sed 's/EXT/gmi'/ $2 | ./unpar | ./gc > \$@
34 6b8ba66c 2022-02-04 op www/$1.html: gem/$1.gmi header.html footer.html
35 6b8ba66c 2022-02-04 op sed 's!TITLE!$1!' header.html > \$@
36 6b8ba66c 2022-02-04 op sed 's/EXT/html/' $2 | ./unpar | ./gc | ./gem2html >> \$@
37 6b8ba66c 2022-02-04 op cat footer.html >> \$@
42 7b4d8efb 2022-02-04 op rm -f Makefile.local
44 37301a13 2022-02-04 op pair .profile profile.lp
45 37301a13 2022-02-04 op pair .kshrc kshrc.lp
46 37301a13 2022-02-04 op pair lib/profile rc.lp
47 72623747 2022-02-04 op pair .sqliterc sqliterc.lp
48 456488bc 2022-02-04 op pair .psqlrc psqlrc.lp
49 7e6fb0e3 2022-02-21 op pair bin/acmerc bin/acmerc.lp +x
50 7e6fb0e3 2022-02-21 op pair bin/browser bin/browser.lp +x
52 37301a13 2022-02-04 op conv index index.lp
53 7b4d8efb 2022-02-04 op for file in $files; do
54 6b8ba66c 2022-02-04 op conv "${file%.lp}" "$file"
57 7b4d8efb 2022-02-04 op cat <<EOF >> Makefile.local
58 6b8ba66c 2022-02-04 op DOTFILES = $dotfiles
59 7b4d8efb 2022-02-04 op GEMFILES = $gemfiles
60 7b4d8efb 2022-02-04 op WWWFILES = $wwwfiles
61 6b8ba66c 2022-02-04 op XXXFILES = $(printf "%s\n" $xxxfiles | sort | xargs echo)