summaryrefslogtreecommitdiff
path: root/libc/New_subdir
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1996-03-24 21:25:23 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:29:54 +0200
commitdcc973ea3e31710429858c99d4f040334ac67c06 (patch)
tree8883b902eb18eba489957b7f03caa491fd7992a7 /libc/New_subdir
parentfe22c37817ce338fbbc90b239320248c270957fa (diff)
downloaddev86-dcc973ea3e31710429858c99d4f040334ac67c06.tar.gz
Import Dev86-0.0.5.tar.gzv0.0.5
Diffstat (limited to 'libc/New_subdir')
-rwxr-xr-xlibc/New_subdir67
1 files changed, 67 insertions, 0 deletions
diff --git a/libc/New_subdir b/libc/New_subdir
new file mode 100755
index 0000000..92f523d
--- /dev/null
+++ b/libc/New_subdir
@@ -0,0 +1,67 @@
+#!/bin/sh -
+# Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk>
+# This file is part of the Linux-8086 C library and is distributed
+# under the GNU Library General Public License.
+
+cat <<!
+This is a shell script to create the bare bones for a new part of the
+libc package. To use it you just invoke it with the directory name
+you want to create as it's argument, it'll then create that directory
+and put a few files in it.
+
+!
+if [ "$1" = "" ] ; then exit 1 ; fi
+if [ -e "$1" ]
+then echo "There is already something called '$1' in the current directory"
+ echo "You'll have to remove it or rename it first"
+ exit 1
+fi
+
+YEAR=`date +%Y`
+NAME="`finger -s $LOGNAME | head -2 | tail -1 | cut -b10-30 | sed 's/ *$//'`"
+EMAIL="$LOGNAME@`hostname -f`"
+FNAME="`echo $NAME | cut -d\ -f1`"
+
+mkdir $1
+cat <<! > $1/Makefile
+# Copyright (C) $YEAR $NAME <$EMAIL>
+# This file is part of the Linux-8086 C library and is distributed
+# under the GNU Library General Public License.
+
+TOP=..
+include \$(TOP)/Make.defs
+
+OBJ=$1.o
+
+all: \$(OBJ)
+
+libc.a: \$(OBJ)
+ ar r ../$(LIBC) \$(OBJ)
+ @touch libc.a
+
+clean:
+ rm -f *.o libc.a
+!
+cat <<! > $1/README
+Copyright (C) $YEAR $NAME <$EMAIL>
+This file is part of the Linux-8086 C library and is distributed
+under the GNU Library General Public License.
+
+There's currently nothing special about $1.
+
+-$FNAME
+!
+cat <<! > $1/$1.c
+/* Copyright (C) $YEAR $NAME <$EMAIL>
+ * This file is part of the Linux-8086 C library and is distributed
+ * under the GNU Library General Public License.
+ */
+
+$1()
+{
+ /* FIXME :-) */
+}
+!
+
+echo "Ok, the directory $1 has now been created ..."
+exit 0