xref: /dragonfly/usr.bin/wmake/wmake.sh (revision 6fb88001)
1#!/bin/sh
2#
3# $DragonFly: src/usr.bin/wmake/wmake.sh,v 1.2 2005/09/23 00:31:37 corecode Exp $
4#
5# This script was written by Matt Dillon and has been placed in the
6# public domain.
7
8path=$PWD
9while [ "$path" != "" ]; do
10    if [ -f $path/Makefile.inc1 ]; then
11	break
12    fi
13    path=${path%/*}
14done
15if [ "$path" = "" ]; then
16    echo "Unable to locate Makefile.inc through parent dirs"
17fi
18
19escaped_args=`echo "$@" | sed -e "s/'/\\'/"`
20
21eval `cd $path; make WMAKE_ARGS="'$escaped_args'" -f Makefile.inc1 wmake`
22