* added compilers lcc and bcc (linux86)
[mascara-docs.git] / compilers / linux86-0.16.17 / libc / New_subdir
blobe3803c7349f20f5981833cb98c825afe156609ab
1 #!/bin/sh -
2 # Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk>
3 # This file is part of the Linux-8086 C library and is distributed
4 # under the GNU Library General Public License.
6 cat <<!
7 This is a shell script to create the bare bones for a new part of the
8 libc package. To use it you just invoke it with the directory name
9 you want to create as it's argument, it'll then create that directory
10 and put a few files in it.
13 if [ "$1" = "" ] ; then exit 1 ; fi
14 if [ -e "$1" ]
15 then echo "There is already something called '$1' in the current directory"
16 echo "You'll have to remove it or rename it first"
17 exit 1
20 YEAR=`date +%Y`
21 NAME="`finger -s $LOGNAME | head -2 | tail -1 | cut -b10-30 | sed 's/ *$//'`"
22 EMAIL="$LOGNAME@`hostname -f`"
23 FNAME="`echo $NAME | cut -d\ -f1`"
25 mkdir $1
26 cat <<! > $1/Makefile
27 # Copyright (C) $YEAR $NAME <$EMAIL>
28 # This file is part of the Linux-8086 C library and is distributed
29 # under the GNU Library General Public License.
31 OBJ=$1.o
33 CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS)
35 all: $(LIBC)($(OBJ))
37 clean:
38 rm -f *.o libc.a
40 cat <<! > $1/README
41 Copyright (C) $YEAR $NAME <$EMAIL>
42 This file is part of the Linux-8086 C library and is distributed
43 under the GNU Library General Public License.
45 There's currently nothing special about $1.
47 -$FNAME
49 cat <<! > $1/$1.c
50 /* Copyright (C) $YEAR $NAME <$EMAIL>
51 * This file is part of the Linux-8086 C library and is distributed
52 * under the GNU Library General Public License.
55 $1()
57 /* FIXME :-) */
61 echo "Ok, the directory $1 has now been created ..."
62 exit 0