aboutsummaryrefslogtreecommitdiff
path: root/docs/default.do
blob: a66ed9bcadfe5b6f782b5063e8661ae2855a2cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
. ../config.rc

# Extensionless name of file
fn="${1%.*}"

case "$1" in
    all)  redo info ;;
    allclean) redo ../clean; rm -f cpt.texi ;;
    info) redo-ifchange cpt.info cpt.texi cpt.org ;;
    *.info)
        redo-ifchange "$fn.texi"
        $MAKEINFO "$fn.texi" -o "$3"
        ;;
    *.texi)
        [ -f "$fn.org" ] || exit 0
        redo-ifchange "$fn.org"
        cp "$fn.org" "$3.org"
        $EMACS "$3.org" --batch -f org-texinfo-export-to-texinfo
        rm -f "$3.org"
        mv "$3.texi" "$3"
        ;;
    *)
        echo "Unknown target $1"
        exit 99
esac

PHONY all info html