head	14.5;
access;
symbols
	stable-branch:14.3
	rel-7-4-2:14.4
	rel-7-4-branch:14.4.0.2
	rel-7-4-0:14.4
	rel-7-2-6:14.3
	rel-7-2-4:14.3
	rel-7-2-2:14.3
	rel-7-2-0:14.3
	rel-7-0-4:14.2
	rel-7-0-2:14.2
	rel-7-0-1:14.2
	opensource-post:14.2
	opensource-pre:1.1
	rel-7-0-branch:1.1.0.2
	rel-7-0:1.1;
locks; strict;
comment	@# @;


14.5
date	2005.07.17.00.57.38;	author brlcad;	state dead;
branches;
next	14.4;

14.4
date	2005.07.11.05.34.03;	author brlcad;	state Exp;
branches;
next	14.3;

14.3
date	2005.01.30.20.30.15;	author brlcad;	state Exp;
branches;
next	14.2;

14.2
date	2004.12.18.00.58.19;	author morrison;	state Exp;
branches;
next	14.1;

14.1
date	2004.11.16.19.42.12;	author morrison;	state Exp;
branches;
next	1.1;

1.1
date	2004.05.20.15.18.41;	author morrison;	state Exp;
branches;
next	;


desc
@@


14.5
log
@replace awf with awf.in template so that it may be decoupled from machinetype.sh and pathing problems
@
text
@#!/bin/sh
#                             A W F
# BRL-CAD
#
# Copyright (C) 2004-2005 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above 
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# 3. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###

eval `machinetype.sh -v`		# BRL mod: sets $BASEDIR
PATH=/bin:/usr/bin ; export PATH
# AWFLIB is where the pieces live
AWFLIB=${AWFLIB-$BASEDIR/share/brlcad/7.4.0/awf}		# BRL mod

tmp=/tmp/awp$$			# tempfile for building pass 2
errs=/tmp/awe$$		# error messages (awk can't send to stderr)

case "$1" in
-ms)	mac=ms	;;
-man)	mac=man	;;
*)	echo "$0: must specify -ms or -man" >&2
	exit 2
	;;
esac
shift

dev="$AWFLIB/dev.$TERM"
if test ! -r $dev
then
	dev="$AWFLIB/dev.dumb"
fi

trap "rm -f $tmp $errs ; exit 0" 0 1 2

# build the full, macro-set-dependent, pass-2 awk program
(
	sed -n '1,/^#include/p' $AWFLIB/pass2.base
	cat $AWFLIB/pass2.$mac
	sed -n '/^#include/,$p' $AWFLIB/pass2.base
) >$tmp

# do it
(
	echo ".^x $errs"
	echo ".^b"
	echo ".^# 1 <prolog>"
	cat $dev $AWFLIB/common $AWFLIB/mac.$mac
	if test " $*" = " "
	then
		echo ".^# 1 <stdin>"
		cat
	else
		for f
		do
			echo ".^# 1 $f"
			cat $f
		done
	fi
	echo ".^e"
) | awk -f $AWFLIB/pass1 | awk -f $tmp | awk -f $AWFLIB/pass3

# error messages, if any
if test -s $errs
then
	cat $errs >&2
	exit 1
else
	exit 0
fi
@


14.4
log
@stupid quick-fix hack to make brlman work for the 7.4.0 release -- need to decouple machinetype.sh
@
text
@@


14.3
log
@update copyright to 2005
@
text
@d40 1
a40 1
AWFLIB=${AWFLIB-$BASEDIR/etc}		# BRL mod
@


14.2
log
@assign copyright and BSD license
@
text
@d5 2
a6 2
# Copyright (c) 2004 United States Government as represented by the
# U.S. Army Research Laboratory.
@


14.1
log
@dawn of a new revision.  it shall be numbered 14 to match release 7.  begin the convergence by adding emacs/vi local variable footer blocks to encourage consistent formatting.
@
text
@d1 36
a36 1
#! /bin/sh
@


1.1
log
@Vast reorganization begins.  Sources moved from top-level directories into src/.
@
text
@@

