1#! /bin/sh 2# 3# nana-c++lg.in - does a compile, link and go all in command using g++ 4# It is used in the test system and is sometimes of use for doing 5# quick tests or for first year students. 6# 7# usage: 8# 9# % nana-c++lg main.c 10# % nana-c++lg -O3 main.c -lm 11# % nana-c++lg -O3 main.c lib.c -lm 12# 13# Copyright (c) 1997 Phil Maker 14# All rights reserved. 15# 16# Redistribution and use in source and binary forms, with or without 17# modification, are permitted provided that the following conditions 18# are met: 19# 1. Redistributions of source code must retain the above copyright 20# notice, this list of conditions and the following disclaimer. 21# 2. Redistributions in binary form must reproduce the above copyright 22# notice, this list of conditions and the following disclaimer in the 23# documentation and/or other materials provided with the distribution. 24# 25# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 26# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 29# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35# SUCH DAMAGE. 36# 37# Id: nana-c++lg.in,v 1.2 1998/07/03 03:25:31 pjm Exp 38 39case $1 40in 41 --version) 42 echo "nana-c++lg (GNU @PACKAGE@) @VERSION@" 43 echo "Copyright (C) 1997 Phil Maker" 44 echo "Nana comes with NO WARRANTY, to the extent permitted by law." 45 echo "You may redistribute copies of nana without charge." 46 echo "See the file COPYING for more details." 47 exit 0 48 ;; 49 --help) 50 echo "usage: nana-c++lg [g++ arguments ...]" 51 echo "" 52 echo "nana-c++lg compiles your program using g++," 53 echo " generates gdb commands and finally runs your program" 54 echo " inside gdb. This script is intended for the quick testing" 55 echo " of small programs." 56 echo "" 57 echo "See also:" 58 echo " <ftp://ftp.cs.ntu.edu.au/pub/nana>" 59 echo " <http://www.cs.ntu.edu.au/homepages/pjm/nana-home>" 60 echo "" 61 echo "Report suggestions to majordomo list - nana@it.ntu.edu.au" 62 echo "Report bugs to nana-bug@it.ntu.edu.au" 63 exit 0 64 ;; 65esac 66 67 68NANACC=@CXX@ ${NANABIN-@bindir@}/nana-clg $* 69 70 71