0a498280f1
Don't require MTREE. Simplify Makefiles by building directly as bin/rat -- pkgsrc doesn't support multiple builds in one WRKSRC anyway.
43 lines
1.6 KiB
Text
43 lines
1.6 KiB
Text
$NetBSD: patch-ad,v 1.3 2006/02/24 00:35:59 joerg Exp $
|
|
|
|
--- Build.orig 1998-08-15 19:16:43.000000000 +0000
|
|
+++ Build
|
|
@@ -54,7 +54,7 @@ OSVERS=`uname -r`
|
|
case $OSTYPE in
|
|
Linux ) OSMVER=`echo $OSVERS | awk -F. '{printf("%d_%d", $1, $2)}'`
|
|
;;
|
|
- SunOS | IRIX | FreeBSD ) OSMVER=`echo $OSVERS | awk -F. '{print $1}'`
|
|
+ SunOS | IRIX | FreeBSD | DragonFly | NetBSD ) OSMVER=`echo $OSVERS | awk -F. '{print $1}'`
|
|
;;
|
|
HP-UX ) OSTYPE=HPUX
|
|
OSMVER=`echo $OSVERS | awk -F. '{print $2}'`
|
|
@@ -68,21 +68,23 @@ echo "OSTYPE=$OSTYPE"
|
|
echo "OSVERS=$OSVERS"
|
|
echo "OSMVER=$OSMVER"
|
|
|
|
+USER=${USER:=`whoami`}
|
|
+
|
|
# Create a directory for the .o files, if it doesn't exist...
|
|
-if [ ! -d objs/${USER:=`whoami`}/${OSTYPE}_${OSVERS} ]; then
|
|
+if [ ! -d objs/${USER}/${OSTYPE}_${OSVERS} ]; then
|
|
echo "Creating object directory objs/${USER}/${OSTYPE}_${OSVERS}..."
|
|
- mkdir bin/${USER}
|
|
- mkdir objs/${USER}
|
|
- mkdir objs/${USER}/${OSTYPE}_${OSVERS}
|
|
+ mkdir -p bin/${USER}
|
|
+ mkdir -p objs/${USER}
|
|
+ mkdir -p objs/${USER}/${OSTYPE}_${OSVERS}
|
|
chmod 775 bin/${USER}
|
|
chmod 775 objs/${USER}
|
|
chmod 775 objs/${USER}/${OSTYPE}_${OSVERS}
|
|
fi
|
|
|
|
-cmd="${MAKE:=make} OSTYPE=$OSTYPE OSMVER=$OSMVER OSVERS=$OSVERS USER=`whoami`"
|
|
+cmd="${MAKE:=make} OSTYPE=$OSTYPE OSMVER=$OSMVER OSVERS=$OSVERS USER=$USER"
|
|
case $1 in
|
|
rat ) echo "Running: $cmd bin/${USER}/rat-${OSTYPE}-${OSVERS}"
|
|
- eval $cmd bin/${USER}/rat-${OSTYPE}-${OSVERS}
|
|
+ eval $cmd bin/rat
|
|
exit
|
|
;;
|
|
depend|tags|tar|clean) echo "Running: $cmd $1"
|