#!/bin/sh -e

# Workaround.
for dir in /usr/bin /usr/share/man/ /etc/X11/ /etc/X11/app-defaults
do
	mkdir -p "$1/$dir"
done

make
make PREFIX="$1/usr" MANDIR="$1/usr/share/man/" MWMRCDIR="$1/etc/X11/mwm" APPLRESDIR="$1/etc/X11/app-defaults" install

#install -Dm755 emwm "$1/usr/bin/emwm"
#install -Dm644 system.mwmrc "$1/usr/etc/X11/mwm/system.emwmrc"
#install -Dm644 emwm.1 "$1/usr/share/man/man1/emwm.1"
