Removed "libtool" (for good).
[dotmk.git] / install.sh
blob7b47ef40dd39af57accdc0889bf2f59ee294388a
1 #!/bin/sh -e
3 build()
5 mkfile="$1"
7 echo "building \`${MKDIR}/${mkfile}' file..."
9 exec 9>&1
10 exec 1>"${MKDIR}/${mkfile}"
12 cat << EOF
13 # ${mkfile}
15 EOF
16 sed -e 's/^/# /' "${TOPDIR}/LICENSE"
17 cat << EOF
19 ifndef ${mkfile}
20 ${mkfile}= y
22 EOF
23 cat "${SRCDIR}/default-head.mk"
24 cat << EOF
26 ifneq (\$(wildcard \$(DOTMKDIR)/${mkfile%.*}-local.mk),)
27 include \$(DOTMKDIR)/${mkfile%.*}-local.mk
28 endif
30 EOF
31 echo
32 cat "${SRCDIR}/${mkfile}"
33 echo
34 cat "${SRCDIR}/default-tail.mk"
35 cat << EOF
37 endif # ndef ${mkfile}
38 EOF
40 exec 1>&9
41 exec 9>&-
44 MKDIR="mk"
45 TOPDIR="`dirname "${0}"`"
46 TOPDIR="`cd "${TOPDIR}"; pwd`"
47 SRCDIR="${TOPDIR}/src"
49 if [ $# -eq 1 ]; then
50 MKDIR="${1}/${MKDIR}"
53 mkdir -p "${MKDIR}"
55 build build.mk
56 build subdir.mk
58 echo "dotmk is now installed under the \`${MKDIR}' directory."