head	1.25;
access;
symbols
	perseant-exfatfs-base-20250801:1.25
	perseant-exfatfs-base-20240630:1.25
	cjep_sun2x:1.25.0.44
	cjep_sun2x-base:1.25
	cjep_staticlib_x-base1:1.25
	cjep_staticlib_x:1.25.0.42
	cjep_staticlib_x-base:1.25
	phil-wifi-20200421:1.25
	phil-wifi-20200411:1.25
	phil-wifi-20200406:1.25
	pgoyette-compat-merge-20190127:1.25
	pgoyette-compat-20190127:1.25
	pgoyette-compat-20190118:1.25
	pgoyette-compat-1226:1.25
	pgoyette-compat-1126:1.25
	pgoyette-compat-1020:1.25
	pgoyette-compat-0930:1.25
	pgoyette-compat-0906:1.25
	pgoyette-compat-0728:1.25
	pgoyette-compat-0625:1.25
	pgoyette-compat-0521:1.25
	pgoyette-compat-0502:1.25
	pgoyette-compat-0422:1.25
	pgoyette-compat-0415:1.25
	pgoyette-compat-0407:1.25
	pgoyette-compat-0330:1.25
	pgoyette-compat-0322:1.25
	pgoyette-compat-0315:1.25
	pgoyette-compat:1.25.0.40
	pgoyette-compat-base:1.25
	perseant-stdc-iso10646:1.25.0.38
	perseant-stdc-iso10646-base:1.25
	prg-localcount2-base3:1.25
	prg-localcount2-base2:1.25
	prg-localcount2-base1:1.25
	prg-localcount2:1.25.0.36
	prg-localcount2-base:1.25
	pgoyette-localcount-20170426:1.25
	bouyer-socketcan-base1:1.25
	pgoyette-localcount-20170320:1.25
	bouyer-socketcan:1.25.0.34
	bouyer-socketcan-base:1.25
	pgoyette-localcount-20170107:1.25
	pgoyette-localcount-20161104:1.25
	localcount-20160914:1.25
	pgoyette-localcount-20160806:1.25
	pgoyette-localcount-20160726:1.25
	pgoyette-localcount:1.25.0.32
	pgoyette-localcount-base:1.25
	netbsd-5-2-3-RELEASE:1.25
	netbsd-5-1-5-RELEASE:1.25
	yamt-pagecache-base9:1.25
	yamt-pagecache-tag8:1.25
	tls-earlyentropy:1.25.0.28
	tls-earlyentropy-base:1.25
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.25
	riastradh-drm2-base3:1.25
	netbsd-5-2-2-RELEASE:1.25
	netbsd-5-1-4-RELEASE:1.25
	netbsd-5-2-1-RELEASE:1.25
	netbsd-5-1-3-RELEASE:1.25
	agc-symver:1.25.0.30
	agc-symver-base:1.25
	tls-maxphys-base:1.25
	yamt-pagecache-base8:1.25
	netbsd-5-2:1.25.0.26
	yamt-pagecache-base7:1.25
	netbsd-5-2-RELEASE:1.25
	netbsd-5-2-RC1:1.25
	yamt-pagecache-base6:1.25
	yamt-pagecache-base5:1.25
	yamt-pagecache-base4:1.25
	netbsd-5-1-2-RELEASE:1.25
	netbsd-5-1-1-RELEASE:1.25
	yamt-pagecache-base3:1.25
	yamt-pagecache-base2:1.25
	yamt-pagecache:1.25.0.24
	yamt-pagecache-base:1.25
	bouyer-quota2-nbase:1.25
	bouyer-quota2:1.25.0.22
	bouyer-quota2-base:1.25
	matt-nb5-pq3:1.25.0.20
	matt-nb5-pq3-base:1.25
	netbsd-5-1:1.25.0.18
	netbsd-5-1-RELEASE:1.25
	netbsd-5-1-RC4:1.25
	netbsd-5-1-RC3:1.25
	netbsd-5-1-RC2:1.25
	netbsd-5-1-RC1:1.25
	netbsd-5-0-2-RELEASE:1.25
	netbsd-5-0-1-RELEASE:1.25
	jym-xensuspend-nbase:1.25
	netbsd-5-0:1.25.0.16
	netbsd-5-0-RELEASE:1.25
	netbsd-5-0-RC4:1.25
	netbsd-5-0-RC3:1.25
	netbsd-5-0-RC2:1.25
	jym-xensuspend:1.25.0.14
	jym-xensuspend-base:1.25
	netbsd-5-0-RC1:1.25
	netbsd-5:1.25.0.12
	netbsd-5-base:1.25
	mjf-devfs2:1.25.0.10
	mjf-devfs2-base:1.25
	yamt-pf42-base4:1.25
	yamt-pf42-base3:1.25
	hpcarm-cleanup-nbase:1.25
	yamt-pf42-base2:1.25
	yamt-pf42:1.25.0.8
	yamt-pf42-base:1.25
	keiichi-mipv6:1.25.0.6
	keiichi-mipv6-base:1.25
	cube-autoconf:1.25.0.4
	cube-autoconf-base:1.25
	hpcarm-cleanup:1.25.0.2
	hpcarm-cleanup-base:1.25
	netbsd-1-3-PATCH003:1.22
	netbsd-1-3-PATCH003-CANDIDATE2:1.22
	netbsd-1-3-PATCH003-CANDIDATE1:1.22
	netbsd-1-3-PATCH003-CANDIDATE0:1.22
	netbsd-1-3-PATCH002:1.22
	netbsd-1-3-PATCH001:1.22
	netbsd-1-3-RELEASE:1.22
	netbsd-1-3-BETA:1.22
	netbsd-1-3:1.22.0.2
	netbsd-1-3-base:1.22
	cjs-build-against-obj-dir:1.21.0.2
	netbsd-1-2-PATCH001:1.9
	libg++-2-7-2:1.1.1.2
	netbsd-1-2-RELEASE:1.9
	netbsd-1-2-BETA:1.9
	netbsd-1-2-base:1.9
	netbsd-1-2:1.9.0.4
	libg++-2-7-1:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.25
date	98.09.13.22.23.02;	author tv;	state dead;
branches;
next	1.24;

1.24
date	98.02.26.02.26.27;	author jonathan;	state Exp;
branches;
next	1.23;

1.23
date	97.10.25.09.27.11;	author lukem;	state Exp;
branches;
next	1.22;

1.22
date	97.05.31.21.21.20;	author cjs;	state Exp;
branches;
next	1.21;

1.21
date	97.05.26.04.24.42;	author cjs;	state Exp;
branches;
next	1.20;

1.20
date	97.04.20.20.20.12;	author thorpej;	state Exp;
branches;
next	1.19;

1.19
date	97.04.16.20.42.46;	author thorpej;	state Exp;
branches;
next	1.18;

1.18
date	97.03.16.15.45.15;	author veego;	state Exp;
branches;
next	1.17;

1.17
date	97.02.07.07.14.02;	author mikel;	state Exp;
branches;
next	1.16;

1.16
date	96.12.22.20.46.06;	author cgd;	state Exp;
branches;
next	1.15;

1.15
date	96.12.22.13.37.30;	author pk;	state Exp;
branches;
next	1.14;

1.14
date	96.12.20.01.04.17;	author cgd;	state Exp;
branches;
next	1.13;

1.13
date	96.12.17.21.32.26;	author cgd;	state Exp;
branches;
next	1.12;

1.12
date	96.12.17.19.14.16;	author phil;	state Exp;
branches;
next	1.11;

1.11
date	96.10.18.02.54.55;	author thorpej;	state Exp;
branches;
next	1.10;

1.10
date	96.05.22.02.05.52;	author mrg;	state Exp;
branches;
next	1.9;

1.9
date	96.05.16.21.03.25;	author phil;	state Exp;
branches;
next	1.8;

1.8
date	96.05.15.22.56.16;	author phil;	state Exp;
branches;
next	1.7;

1.7
date	96.04.25.01.16.10;	author jtc;	state Exp;
branches;
next	1.6;

1.6
date	96.04.08.02.45.57;	author phil;	state Exp;
branches;
next	1.5;

1.5
date	96.04.04.23.33.45;	author phil;	state Exp;
branches;
next	1.4;

1.4
date	96.03.11.04.58.24;	author thorpej;	state Exp;
branches;
next	1.3;

1.3
date	96.03.11.02.38.44;	author thorpej;	state Exp;
branches;
next	1.2;

1.2
date	96.03.09.00.20.44;	author phil;	state Exp;
branches;
next	1.1;

1.1
date	96.03.09.00.00.57;	author phil;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.03.09.00.00.57;	author phil;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	96.12.17.18.54.26;	author phil;	state Exp;
branches;
next	;


desc
@@


1.25
log
@Nuke libg++, leaving only libstdc++ for GCC 2.7-based systems.
@
text
@#!/usr/local/bin/perl
#
#	$NetBSD: libg++2netbsd,v 1.24 1998/02/26 02:26:27 jonathan Exp $
#
#  Perl script to convert a standard distribution directory for libg++ into
#	a NetBSD source tree.
#
#  This is done as a script so that as each distribution is released,
#	only changes from the previous one need to be dealt with as
#	modifications to this script and related files.  This should
#	reduce the cost of updating from a new release of libg++ by an
#	order of magnitude (or more?)
#
#  Written by Phil Nelson,  December 13, 1995.  (for libg++-2.7.1)
#  Updated for libg++-2.7.2 by Chris Demetriou, September 13, 1996.
#

$version = "2.7.2";
$srcdir = $ENV{'SRCDIR'};
if (!$srcdir) { $srcdir = "libg++-$version" };
$targetdir = "libg++";

# definitions ...

@@subdirs = ("include", "include/gen", "libg++", "libg++/genclass",
	    "libg++/src", "libio", "libiostream", "librx", "libstdc++",
	    "libstdc++/std", "libstdc++/stl");

@@gf = ("ACG.cc", "AllocRing.cc", "Binomial.cc", "BitSet.cc",
       "BitString.cc", "CursesW.cc", "DLList.cc", "DiscUnif.cc",
       "Erlang.cc", "Fix.cc", "Fix16.cc", "Fix24.cc", "Geom.cc",
       "GetOpt.cc", "HypGeom.cc", "Intdouble.cc", "Integer.cc",
       "LogNorm.cc", "MLCG.cc", "NegExp.cc", "Normal.cc",
       "Obstack.cc", "Poisson.cc", "RNG.cc", "Random.cc",
       "Rational.cc", "Regex.cc", "RndInt.cc", "SLList.cc",
       "SmplHist.cc", "SmplStat.cc", "String.cc", "Uniform.cc",
       "Weibull.cc", "bitand.c", "bitany.c", "bitblt.c", "bitclear.c",
       "bitcopy.c", "bitcount.c", "bitinvert.c", "bitlcomp.c",
       "bitset1.c", "bitxor.c", "builtin.cc", "compare.cc",
       "error.cc", "fmtq.cc", "gcd.cc", "hash.cc", "ioob.cc", "lg.cc",
       "pow.cc", "sqrt.cc", "timer.c");

@@gh = ("ACG.h", "AllocRing.h", "Binomial.h", "BitSet.h",
       "BitString.h", "Complex.h", "CursesW.h", "DLList.h",
       "DiscUnif.h", "Erlang.h", "Fix.h", "Fix16.h", "Fix24.h",
       "Geom.h", "GetOpt.h", "HypGeom.h", "Incremental.h",
       "Integer.h", "Integer.hP", "LogNorm.h", "MLCG.h", "NegExp.h",
       "Normal.h", "Obstack.h", "Pix.h", "Poisson.h", "RNG.h",
       "Random.h", "Rational.h", "Regex.h", "RndInt.h", "SLList.h",
       "SmplHist.h", "SmplStat.h", "String.h", "Uniform.h",
       "Weibull.h", "bitdo1.h", "bitdo2.h", "bitprims.h", "bool.h",
       "builtin.h", "compare.h", "generic.h", "getpagesize.h",
       "libc.h", "minmax.h", "osfcn.h", "std.h", "strclass.h",
       "swap.h", "sysent.h", "typemacros.h" );

@@iosf = ("PlotFile.cc", "SFile.cc", "builtinbuf.cc", "editbuf.cc",
        "filebuf.cc", "fstream.cc", "indstream.cc", "ioassign.cc",
        "ioextend.cc", "iomanip.cc", "iostream.cc", "isgetline.cc",
        "isgetsb.cc", "isscan.cc", "osform.cc", "parsestream.cc",
        "pfstream.cc", "procbuf.cc", "sbform.cc", "sbgetline.cc",
        "sbscan.cc", "stdiostream.cc", "stdstrbufs.cc",
        "stdstreams.cc", "stream.cc", "streambuf.cc", "strstream.cc",
        "cleanup.c", "filedoalloc.c", "fileops.c", "floatconv.c",
        "genops.c", "iofclose.c", "iofgetpos.c", "iofread.c",
        "iofscanf.c", "iofsetpos.c", "iogetdelim.c", "iogetline.c",
        "ioignore.c", "iopadn.c", "iopopen.c", "ioprims.c",
        "ioprintf.c", "ioseekoff.c", "ioseekpos.c", "iostrerror.c",
        "ioungetc.c", "iovfprintf.c", "iovfscanf.c", "outfloat.c",
        "strops.c", );

@@iosh = ("PlotFile.h", "SFile.h", "builtinbuf.h",
        "editbuf.h", "floatio.h", "fstream.h", "indstream.h",
        "iolibio.h", "iomanip.h", "iostdio.h", "iostream.h",
        "iostreamP.h", "istream.h", "libio.h", "libioP.h",
        "ostream.h", "parsestream.h", "pfstream.h", "procbuf.h",
        "stdiostream.h", "stream.h", "streambuf.h", "strfile.h",
        "strstream.h" );

@@iof = ("chr.cc", "cleanup.c", "filedoalloc.c", "fileops.c", "floatconv.c",
	"genops.c", "iofclose.c", "iofdopen.c", "iofflush.c",
	"iofgetpos.c", "iofgets.c", "iofopen.c", "iofprintf.c",
	"iofputs.c", "iofread.c", "iofscanf.c", "iofsetpos.c",
	"ioftell.c", "iofwrite.c", "iogetdelim.c", "iogetline.c",
	"iogets.c", "ioignore.c", "iopadn.c", "ioperror.c",
	"iopopen.c", "ioprims.c", "ioprintf.c", "ioputs.c",
	"ioscanf.c", "ioseekoff.c", "ioseekpos.c", "iosetbuffer.c",
	"iosetvbuf.c", "iosprintf.c", "iosscanf.c", "iostrerror.c",
	"ioungetc.c", "iovfprintf.c", "iovfscanf.c", "iovsprintf.c",
	"iovsscanf.c", "outfloat.c", "str.cc", "stdfiles.c", "strops.c");

@@iocf = ("iofdopen.c", "iofflush.c", "iofgets.c", "iofopen.c",
	"iofprintf.c", "iofputs.c", "ioftell.c", "iofwrite.c",
	"iogets.c", "ioperror.c", "ioputs.c", "ioscanf.c",
	"iosetbuffer.c", "iosetvbuf.c", "iosprintf.c", "iosscanf.c",
	"iovsprintf.c", "iovsscanf.c", "stdfiles.c");

@@genclf = ("genclass.sh");

@@genf = ("AVLMap.ccP", "AVLMap.hP", "AVLSet.ccP", "AVLSet.hP",
         "AVec.ccP", "AVec.hP", "BSTSet.ccP", "BSTSet.hP", "Bag.ccP",
         "Bag.hP", "CHBag.ccP", "CHBag.hP", "CHMap.ccP", "CHMap.hP",
         "CHNode.ccP", "CHNode.hP", "CHSet.ccP", "CHSet.hP",
         "DLDeque.ccP", "DLDeque.hP", "DLList.ccP", "DLList.hP",
         "Deque.ccP", "Deque.hP", "FPQueue.ccP", "FPQueue.hP",
         "FPStack.ccP", "FPStack.hP", "FPlex.ccP", "FPlex.hP",
         "List.ccP", "List.hP", "MPlex.ccP", "MPlex.hP", "Map.ccP",
         "Map.hP", "OSLBag.ccP", "OSLBag.hP", "OSLSet.ccP",
         "OSLSet.hP", "OXPBag.ccP", "OXPBag.hP", "OXPSet.ccP",
         "OXPSet.hP", "PHPQ.ccP", "PHPQ.hP", "PQ.ccP", "PQ.hP",
         "PSList.hP", "PVec.hP", "Plex.ccP", "Plex.hP", "Queue.ccP",
         "Queue.hP", "RAVLMap.ccP", "RAVLMap.hP", "RPlex.ccP",
         "RPlex.hP", "SLBag.ccP", "SLBag.hP", "SLList.ccP",
         "SLList.hP", "SLQueue.ccP", "SLQueue.hP", "SLSet.ccP",
         "SLSet.hP", "SLStack.ccP", "SLStack.hP", "Set.ccP", "Set.hP",
         "SkipBag.ccP", "SkipBag.hP", "SkipMap.ccP", "SkipMap.hP",
         "SkipSet.ccP", "SkipSet.hP", "SplayBag.ccP", "SplayBag.hP",
         "SplayMap.ccP", "SplayMap.hP", "SplayNode.ccP",
         "SplayNode.hP", "SplayPQ.ccP", "SplayPQ.hP", "SplaySet.ccP",
         "SplaySet.hP", "Stack.ccP", "Stack.hP", "VHBag.ccP",
         "VHBag.hP", "VHMap.ccP", "VHMap.hP", "VHSet.ccP", "VHSet.hP",
         "VOHSet.ccP", "VOHSet.hP", "VQueue.ccP", "VQueue.hP",
         "VStack.ccP", "VStack.hP", "Vec.ccP", "Vec.hP", "XPBag.ccP",
         "XPBag.hP", "XPDeque.ccP", "XPDeque.hP", "XPPQ.ccP",
         "XPPQ.hP", "XPQueue.ccP", "XPQueue.hP", "XPSet.ccP",
         "XPSet.hP", "XPStack.ccP", "XPStack.hP", "XPlex.ccP",
         "XPlex.hP", "defs.hP", "intSList.hP", "intVec.hP" );

@@lstdcf =("cmathi.cc", "cstdlibi.cc", "cstringi.cc", "exceptioni.cc",
	  "newi.cc", "stddefi.cc", "stdexcepti.cc", "typeinfoi.cc");

@@lstdcf2 = ("cstrmain.cc", "cstrio.cc", "fcomplex.cc", "fcomio.cc",
	    "dcomplex.cc", "dcomio.cc", "ldcomplex.cc", "ldcomio.cc");

@@lstdcof =("algorithm", "cassert", "cctype", "cerrno", "cfloat",
	   "ciso646", "climits", "clocale", "cmath", "complex",
	   "complex.h", "csetjmp", "csignal", "cstdarg", "cstddef",
	   "cstdio", "cstdlib", "cstring", "ctime", "cwchar",
	   "cwctype", "deque", "exception", "functional", "iterator",
	   "list", "map", "memory", "new", "new.h", "numeric",
	   "queue", "set", "stack", "stddef", "stdexcept", "stl.h",
	   "string", "typeinfo", "utility", "vector", "cinst.cc",
	   "sinst.cc" );

@@rxf = ("rx.c");

@@rxof = ("rx.h");

@@stdf = ("bastring.cc",  "complext.cc");

@@stdof = ("bastring.h", "cassert.h", "cctype.h", "cerrno.h",
	  "cfloat.h", "cinst.h", "ciso646.h", "climits.h",
	  "clocale.h", "cmath.h", "complex.h", "complext.h",
	  "csetjmp.h", "csignal.h", "cstdarg.h", "cstddef.h",
	  "cstdio.h", "cstdlib.h", "cstring.h", "ctime.h", "cwchar.h",
	  "cwctype.h", "dcomplex.h", "exception.h", "fcomplex.h",
	  "ldcomplex.h", "new.h", "sinst.h", "stddef.h",
	  "stdexcept.h", "straits.h", "string.h", "typeinfo.h" );

@@stlf = ("random.cc", "tempbuf.cc", "tree.cc");

@@stlof = ("algo.h", "algobase.h", "bvector.h", "defalloc.h",
	 "deque.h", "faralloc.h", "fdeque.h", "flist.h", "fmap.h",
	 "fmultmap.h", "fmultset.h", "fset.h", "function.h", "hdeque.h",
	 "heap.h", "hlist.h", "hmap.h", "hmultmap.h", "hmultset.h",
	 "hset.h", "hugalloc.h", "hvector.h", "iterator.h", "lbvector.h",
	 "ldeque.h", "list.h", "llist.h", "lmap.h", "lmultmap.h",
	 "lmultset.h", "lngalloc.h", "lset.h", "map.h", "multimap.h",
	 "multiset.h", "neralloc.h", "nmap.h", "nmultmap.h", "nmultset.h",
	 "nset.h", "pair.h", "projectn.h", "set.h", "stack.h", "tempbuf.h",
	 "tree.h", "vector.h");

# sed edit list: file, sed-program
@@sedlist = (
    "libg++/genclass/genclass.sh", "'s/<VERSION>/$version/g'",
    "libg++/genclass/genclass.sh",
	    "'s/^PROTODIR=.*\$/PROTODIR=\\/usr\\/include\\/g++\\/gen/g'");

#
# Utility Subroutines
#

# &copyfiles (fromdir, todir, list of files);
sub copyfiles {
    local ($fdir, $tdir, @@list) = @@_;
    local ($f);

    foreach $f (@@list) {
	print "  $fdir/$f --> $tdir/$f\n";
	system ("cp -p $fdir/$f $tdir/$f");
    }
}

sub dumpsrcs {
    local (@@names) = @@_;
    local ($count);

    print ODATA "SRCS=\t";
    $count = 0;
    foreach $f (@@names) {
        print ODATA "$f ";
	if ($count == 5) {
	    print ODATA "\\\n";
	    $count = 0;
	} else {
	    $count += 1;
	}
    }
    if ($count != 0) {
	print ODATA "\n";
    }
}

#  Following functions written by Christos Zoulas, January 15, 1996.

sub dumparray {
    local (@@names) = @@_;

    foreach $f (@@names) {
	print ODATA "$f ";
    }
}

sub dumpfrag {
    @@cstrmain = ("REP", "MAIN", "TRAITS", "ADDSS", "ADDPS", "ADDCS", "ADDSP",
		 "ADDSC", "EQSS", "EQPS", "EQSP", "NESS", "NEPS", "NESP",
		 "LTSS", "LTPS", "LTSP", "GTSS", "GTPS", "GTSP", "LESS",
		 "LEPS", "LESP", "GESS", "GEPS", "GESP");

    @@complex = ("MAIN", "ADDCC", "ADDCF", "ADDFC", "SUBCC", "SUBCF", "SUBFC",
		"MULCC", "MULCF", "MULFC", "DIVCC", "DIVCF", "DIVFC", "PLUS",
		"MINUS", "EQCC", "EQCF", "EQFC", "NECC", "NECF", "NEFC", "ABS",
		"ARG", "POLAR", "CONJ", "NORM", "COS", "COSH", "EXP", "LOG", 
		"POWCC", "POWCF", "POWCI", "POWFC", "SIN", "SINH", "SQRT");

    @@cstrio = ("EXTRACT", "INSERT", "GETLINE");

    @@comio = ("EXTRACT", "INSERT");

    %prefix = ("ld", "LD", "d", "D", "f", "F");

    print "  Dumping frags\n";

    foreach $f (@@lstdcf2) {
	print ODATA "$f: Makefile\n";
	print ODATA "\t\@@echo Creating $f\n";
	print ODATA "\t@@(for i in ";
	if ($f eq "cstrmain.cc") {
		&dumparray(@@cstrmain);
		$inc = "sinst.cc";
		$fl = "C";
	} 
	elsif ($f eq "cstrio.cc") {
		&dumparray(@@cstrio);
		$inc = "sinst.cc";
		$fl = "C";
	} 
	elsif ($f =~ /(.*)complex\.cc/) {
		$fl = $prefix{$1};
		&dumparray(@@complex);
		$inc = "cinst.cc";
	}
	elsif ($f =~ /(.*)comio\.cc/) {
		$fl = $prefix{$1};
		&dumparray(@@comio);
		$inc = "cinst.cc";
	}
	else {
		die "Unknown target type $f";
	}
	print ODATA "; do \\\n";
	print ODATA "\t\techo \"#define \$\$i\"; \\\n";
	print ODATA "\t\tdone;\\\n";
	print ODATA "\techo '#define $fl';\\\n";
	print ODATA "\tcat \$(.CURDIR)/$inc) > \$(.TARGET)";
	print ODATA "\nCLEANFILES+=$f\n\n";
    }
}

sub dumprtti {
    local (@@name) = @@_;

    print "  Dumping rtti for @@name\n";

    print ODATA "@@name.o: @@name.cc\n";
    print ODATA "\t\@@echo \"\$(COMPILE.cc) -frtti \$(.IMPSRC)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) -frtti \$(.IMPSRC) -o \$(.TARGET).o\n";
    print ODATA "\t\@@\$(LD) -x -r \$(.TARGET).o -o \$(.TARGET)\n";
    print ODATA "\t\@@rm -f \$(.TARGET).o\n";
    print ODATA "\n";

    print ODATA "@@name.po: @@name.cc\n";
    print ODATA "\t\@@echo \"\$(COMPILE.cc) -p -frtti \$(.IMPSRC) -o \$(.TARGET)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) -p -frtti \$(.IMPSRC) -o \$(.TARGET).o\n";
    print ODATA "\t\@@\$(LD) -X -r \$(.TARGET).o -o \$(.TARGET)\n";
    print ODATA "\t\@@rm -f \$(.TARGET).o\n";
    print ODATA "\n";

    print ODATA "@@name.so: @@name.cc\n";
    print ODATA "\t\@@echo \"\$(COMPILE.cc) \$(CPICFLAGS) -frtti \$(.IMPSRC) -o \$(.TARGET)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) \$(CPICFLAGS) -frtti \$(.IMPSRC) -o \$(.TARGET).o\n";
    print ODATA "\t\@@\$(LD) -x -r \$(.TARGET).o -o \$(.TARGET)\n";
    print ODATA "\t\@@rm -f \$(.TARGET).o\n";
    print ODATA "\n";
}

#
# Main progarm.
# 

if (!$srcdir) {
    die "You must define the environment variables SRCDIR.\n"
} 
print "Making the NetBSD directory tree.\n";
mkdir ($targetdir,0777);
foreach $f (@@subdirs) { 
    print "   -->$f\n";
    mkdir ("$targetdir/$f",0777);
}

print "Populating $targetdir.\n";
&copyfiles ($srcdir, $targetdir, "COPYING");

print "Populating $targetdir/libg++/src\n";
&copyfiles ("$srcdir/libg++/src", "$targetdir/libg++/src", @@gf, @@gh);
# Special file needed.
&copyfiles ("$srcdir/librx", "$targetdir/libg++/src", "rx.h");

print "Populating $targetdir/libg++/genclass\n";
&copyfiles ("$srcdir/libg++/genclass", "$targetdir/libg++/genclass", @@genclf);

print "Populating $targetdir/libio\n";
&copyfiles ("$srcdir/libio", "$targetdir/libio", @@iocf, @@iosf, @@iosh);

print "Populating $targetdir/include/gen\n";
&copyfiles ("$srcdir/libg++/src/gen", "$targetdir/include/gen", @@genf);

print "Populating $targetdir/librx\n";
&copyfiles ("$srcdir/librx", "$targetdir/librx", @@rxf, @@rxof);

print "Populating $targetdir/libstdc++\n";
&copyfiles ("$srcdir/libstdc++", "$targetdir/libstdc++", @@lstdcf, @@lstdcof);

print "Populating $targetdir/libstdc++/std\n";
&copyfiles ("$srcdir/libstdc++/std", "$targetdir/libstdc++/std",
	    @@stdf, @@stdof);

print "Populating $targetdir/libstdc++/stl\n";
&copyfiles ("$srcdir/libstdc++/stl", "$targetdir/libstdc++/stl",
	    @@stlf, @@stlof);

#
# Build makefiles
#

$first = "True";
while ($line = <DATA>) {
    chop ($line);
    if (substr($line,0,2) eq "%%") {
	@@cmd = split (/ /,$line);
	if ($cmd[1] eq "file") {
	    print "Building $targetdir/$cmd[2]\n";
	    if ($first eq "") {
		close (ODATA);
	    } else {
		$first = "";
	    }
	    open (ODATA, ">$targetdir/$cmd[2]") ||
		die "Could now create $targetdir/$cmd[2]";
	} elsif ($cmd[1] eq "srcs") {
	    print "  Defining SRCS for $cmd[2]\n";
	    if ($first) {
		die "Data section must start with a %% file!";
	    }
	    if ($cmd[2] eq "libg++") {
		&dumpsrcs (@@gf);
	    } elsif ($cmd[2] eq "genclass") {
		&dumpsrcs (@@genclf);
	    } elsif ($cmd[2] eq "iostream") {
		&dumpsrcs (@@iosf);
	    } elsif ($cmd[2] eq "io") {
		&dumpsrcs (@@iof);
	    } elsif ($cmd[2] eq "stdc++") {
		&dumpsrcs (@@iosf, @@lstdcf, @@lstdcf2, @@stlf, @@rxf);
	    } else {
		die "Unknown SRCS command";
	    }
	} elsif ($cmd[1] eq "rtti") {
	    &dumprtti($cmd[2]);
	} elsif ($cmd[1] eq "frag") {
	    &dumpfrag();
	} elsif ($cmd[1] eq "NetBSD") {
	    if ($first) {
		die "Data section must start with a %% file!";
	    }
	    print ODATA "#	\$"."NetBSD".": \$\n";
	}
    } else {
	if ($first) {
	    die "Data section must start with a %% file!";
	}
	print ODATA "$line\n";
    }
}    
close (ODATA);

#
# Sed transformations of files
#

for ($i=0; $i<@@sedlist; $i+=2) {
    $f = $sedlist[$i];
    $p = $sedlist[$i+1];
    print "Modifying $f\n";
    system ("cd $targetdir; sed $p $f > tmp;  mv -f tmp $f");
}

#
# end of the script
#

# what follows is the data for makefiles and other special files
# that need to be created.

__END__
%% file Makefile
%% NetBSD

SUBDIR= libg++ libstdc++ # libio libiostream

HEADERS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \
         csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \
         cwchar cwctype new stddef string exception stdexcept typeinfo \
         algorithm deque list map queue set stack vector utility functional \
         iterator memory numeric


includes:
	@@echo installing includes from libg++/src
	@@(cd libg++/src ; for j in *.[ih]; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/$$j; \
	done)
	@@echo installing includes from include/gen
	@@(cd include/gen ; for j in *.*P; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/gen/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/gen/$$j; \
	done)
	@@echo installing includes from libio
	@@(cd libio ; for j in *.h; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/$$j; \
	done)
	@@echo installing includes from libstdc++/std
	@@(cd libstdc++/std ; for j in *.h *.cc; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/std/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/std/$$j; \
	done)
	@@echo installing includes from libstdc++/stl
	@@(cd libstdc++/stl ; for j in *.h *.cc; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/$$j; \
	done)
	@@echo installing includes from libstdc++
	@@(cd libstdc++ ; for j in *.h ${HEADERS}; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/$$j; \
	done)

.include <bsd.subdir.mk>
%% file libg++/Makefile
%% NetBSD
SUBDIR = src genclass

.include <bsd.subdir.mk>
%% file libg++/genclass/Makefile
%% NetBSD
# Makefile for g++ library genclass 

BINDIR?= /usr/bin

beforeinstall:
	${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
	    ${.CURDIR}/genclass.sh ${DESTDIR}${BINDIR}/genclass

.include <bsd.prog.mk>
%% file libg++/src/Makefile
%% NetBSD

LIB=		g++

%% srcs libg++

CXXFLAGS+=	-nostdinc++ -I$(.CURDIR)/../../include \
		  -I$(.CURDIR)/../../libio -I$(.CURDIR)/../../libstdc++
CPPFLAGS+=	-I$(.CURDIR) -I$(.CURDIR)/../../libio
.if (${MACHINE} == "alpha")
LDADD=		-lcurses
DPADD=		${LIBCURSES}
.else
LDADD=		${DESTDIR}/usr/lib/c++rt0.o -lcurses
DPADD=		${DESTDIR}/usr/lib/c++rt0.o ${LIBCURSES}
.endif
NOMAN=		noman
NOLINT=		nolint
LIBCURSES!=	printf "xxx:\n\techo \$${LIBCURSES}\n.include <bsd.prog.mk>" |\
			$(MAKE) -r -s -f - xxx | grep curses

.include <bsd.lib.mk>
%% file libio/Makefile
%% NetBSD

LIB=	io

%% srcs io

CXXFLAGS+=	-nostdinc++ -I$(.CURDIR)/../include 
CPPFLAGS+=	-I$(.CURDIR)
NOMAN=		noman
NOLINT=		nolint

.include <bsd.lib.mk>
%% file libiostream/Makefile
%% NetBSD

LIB=	iostream

%% srcs iostream

CXXFLAGS+=	-nostdinc++ -I$(.CURDIR)/../include \
		  -I$(.CURDIR)/../libio 
CPPFLAGS+=	-I$(.CURDIR) -I$(.CURDIR)/../libio
NOMAN=		noman
NOLINT=		nolint

.PATH: $(.CURDIR)/../libio

.include <bsd.lib.mk>
%% file libstdc++/Makefile
%% NetBSD

LIB=	stdc++

%% srcs stdc++

CXXFLAGS+=	-nostdinc++ 
CPPFLAGS+=	-I$(.CURDIR) -I$(.CURDIR)/../libio -I$(.CURDIR)/stl
NOMAN=		noman
NOLINT=		nolint

.PATH: $(.CURDIR)/../libio  $(.CURDIR)/stl $(.CURDIR)/../librx

.if (${MACHINE} != "alpha")
LDADD=	${DESTDIR}/usr/lib/c++rt0.o
DPADD=	${DESTDIR}/usr/lib/c++rt0.o
.endif

.include <bsd.lib.mk>

%% frag
%% rtti typeinfoi
%% rtti stdexcepti

%% file libio/_G_config.h
/* AUTOMATICALLY GENERATED; DO NOT EDIT! */ 
#ifndef _G_config_h
#define _G_config_h
#define _G_LIB_VERSION "2.7.2"
#if ! defined(__alpha__) && !defined(__mips)	/* ELF */
#define _G_NAMES_HAVE_UNDERSCORE 1
#else /* ELF */
#define _G_NAMES_HAVE_UNDERSCORE 0
#endif /* ELF */
#define _G_VTABLE_LABEL_HAS_LENGTH 1
#if ! defined(__alpha__) && !defined(__mips)	/* ELF */
#define _G_VTABLE_LABEL_PREFIX "__vt$"
#else 	/* ELF */
#define _G_VTABLE_LABEL_PREFIX "_vt$"
#endif 	/* ELF */
#define _G_HAVE_ST_BLKSIZE 1
#ifndef __alpha__
typedef unsigned long _G_clock_t;
#else /* __alpha__ */
typedef int _G_clock_t;
#endif /* __alpha__ */
typedef int _G_dev_t;
#ifndef __alpha__
typedef long long _G_fpos_t;
#else /* __alpha__ */
typedef long _G_fpos_t;
#endif /* __alpha__ */
typedef unsigned int _G_gid_t;
typedef unsigned int _G_ino_t;
typedef unsigned short _G_mode_t;
typedef unsigned short _G_nlink_t;
#ifndef __alpha__
typedef long long _G_off_t;
#else /* __alpha__ */
typedef long _G_off_t;
#endif /* __alpha__ */
typedef int _G_pid_t;
#ifndef __PTRDIFF_TYPE__
#ifndef __alpha__
#define __PTRDIFF_TYPE__ int
#else /* __alpha__ */
#define __PTRDIFF_TYPE__ long
#endif /* __alpha__ */
#endif
typedef __PTRDIFF_TYPE__ _G_ptrdiff_t;
typedef unsigned int _G_sigset_t;
#ifndef __SIZE_TYPE__
#ifndef __alpha__
#define __SIZE_TYPE__ unsigned int
#else /* __alpha__ */
#define __SIZE_TYPE__ unsigned long
#endif /* __alpha__ */
#endif
typedef __SIZE_TYPE__ _G_size_t;
#ifndef __alpha__
typedef long _G_time_t;
#else /* __alpha__ */
typedef int _G_time_t;
#endif /* __alpha__ */
typedef unsigned int _G_uid_t;
typedef int _G_wchar_t;
#ifndef __alpha__
typedef int _G_ssize_t;
typedef int /* default */ _G_wint_t;
#ifndef __powerpc__
typedef char * _G_va_list;
#else
#define _G_NEED_STDARG_H 1
#endif /* __powerpc__ */
#else /* __alpha__ */
typedef long _G_ssize_t;
typedef unsigned int /* default */ _G_wint_t;
#define _G_NEED_STDARG_H
#define _G_va_list va_list
#endif /* __alpha__ */
#define _G_signal_return_type void
#define _G_sprintf_return_type int

#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
typedef          int   _G_int8_t __attribute__((__mode__(__QI__)));
typedef unsigned int  _G_uint8_t __attribute__((__mode__(__QI__)));
typedef          int  _G_int16_t __attribute__((__mode__(__HI__)));
typedef unsigned int _G_uint16_t __attribute__((__mode__(__HI__)));
typedef          int  _G_int32_t __attribute__((__mode__(__SI__)));
typedef unsigned int _G_uint32_t __attribute__((__mode__(__SI__)));
typedef          int  _G_int64_t __attribute__((__mode__(__DI__)));
typedef unsigned int _G_uint64_t __attribute__((__mode__(__DI__)));
#else
typedef  short  _G_int16_t;
typedef unsigned short _G_uint16_t;
typedef  int  _G_int32_t;
typedef unsigned int _G_uint32_t;
#endif

#define _G_BUFSIZ 1024
#define _G_FOPEN_MAX 20
#define _G_FILENAME_MAX 1024
#define _G_NULL 0 /* default */
#if defined (__cplusplus) || defined (__STDC__)
#define _G_ARGS(ARGLIST) ARGLIST
#else
#define _G_ARGS(ARGLIST) ()
#endif
#if !defined (__GNUG__) || defined (__STRICT_ANSI__)
#define _G_NO_NRV
#endif
#if !defined (__GNUG__)
#define _G_NO_EXTERN_TEMPLATES
#endif
#define _G_HAVE_ATEXIT 1
#define _G_HAVE_SYS_RESOURCE 1
#define _G_HAVE_SYS_TIMES 1
#define _G_HAVE_SYS_SOCKET 1
#define _G_HAVE_SYS_CDEFS 1
#define _G_HAVE_SYS_WAIT 1
#define _G_HAVE_UNISTD 1
#define _G_HAVE_DIRENT 1
#define _G_HAVE_CURSES 1
#define _G_MATH_H_INLINES 0
#define _G_HAVE_BOOL 1
#endif /* !_G_config_h */
%% file libg++/src/shlib_version
major=4
minor=0
%% file libiostream/shlib_version
major=0
minor=1
%% file libio/shlib_version
major=0
minor=1
%% file libstdc++/shlib_version
major=0
minor=1
%% file VERSION
This is libg++ 2.7.2 from the Free Software Foundation.

Complete, unmodified libg++ sources are available from
prep.ai.mit.edu and prep's mirrors.

@


1.24
log
@Mips uses ELF. Add !defined(__mips) to the toolchain-dependent
``#ifndef __alpha''s in  _G_config.h and to the source in libg++2netbsd.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.23 1997/10/25 09:27:11 lukem Exp $
@


1.23
log
@use CPPFLAGS instead of CFLAGS
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.22 1997/05/31 21:21:20 cjs Exp $
d574 1
a574 1
#ifndef __alpha__
d576 1
a576 1
#else /* __alpha__ */
d578 1
a578 1
#endif /* __alpha__ */
d580 1
a580 1
#ifndef __alpha__
d582 1
a582 1
#else /* __alpha__ */
d584 1
a584 1
#endif /* __alpha__ */
@


1.22
log
@Back out BUILDDIR and NOINSTALL changes.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.20 1997/04/20 20:20:12 thorpej Exp $
d501 1
a501 1
CFLAGS+=	-I$(.CURDIR) -I$(.CURDIR)/../../libio
d523 1
a523 1
CFLAGS+=	-I$(.CURDIR)
d537 1
a537 1
CFLAGS+=	-I$(.CURDIR) -I$(.CURDIR)/../libio
d551 4
a554 4
CXXFLAGS+=  -nostdinc++ 
CFLAGS+=    -I$(.CURDIR) -I$(.CURDIR)/../libio -I$(.CURDIR)/stl
NOMAN=	    noman
NOLINT=	    nolint
@


1.21
log
@These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.
@
text
@a435 1
.include <bsd.own.mk>   # for OBJDIR
d437 1
a437 39
.PHONY: builddir
builddir:
	@@echo ${INSTALL} -d ${BUILDDIR}/usr/include/g++/gen
	@@${INSTALL} -d ${BUILDDIR}/usr/include/g++/gen
	@@echo ${INSTALL} -d ${BUILDDIR}/usr/include/g++/std
	@@${INSTALL} -d ${BUILDDIR}/usr/include/g++/std
	@@echo installing includes from libg++/src
	@@(cd libg++/src ; for j in *.[ih]; do \
		cmp -s $$j ${BUILDDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/$$j; \
	done)
	@@echo installing includes from include/gen
	@@(cd include/gen ; for j in *.*P; do \
		cmp -s $$j ${BUILDDIR}/usr/include/g++/gen/$$j || \
		${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/gen/$$j; \
	done)
	@@echo installing includes from libio
	@@(cd libio ; for j in *.h; do \
		cmp -s $$j ${BUILDDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/$$j; \
	done)
	@@echo installing includes from libstdc++/std
	@@(cd libstdc++/std ; for j in *.h *.cc; do \
		cmp -s $$j ${BUILDDIR}/usr/include/g++/std/$$j || \
		${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/std/$$j; \
	done)
	@@echo installing includes from libstdc++/stl
	@@(cd libstdc++/stl ; for j in *.h *.cc; do \
		cmp -s $$j ${BUILDDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/$$j; \
	done)
	@@echo installing includes from libstdc++
	@@(cd libstdc++ ; for j in *.h ${HEADERS}; do \
		cmp -s $$j ${BUILDDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/$$j; \
	done)

.PHONY: destdir
destdir:
a474 9
.if defined(OBJDIR)
includes: builddir
.else
includes: destdir
.endif	# defined(OBJDIR)

.PHONY: install
install: destdir

a498 2
.include <bsd.own.mk>	# for BUILDDIR

d506 2
a507 2
LDADD=		${BUILDDIR}/usr/lib/c++rt0.o -lcurses
DPADD=		${BUILDDIR}/usr/lib/c++rt0.o ${LIBCURSES}
a557 2
.include <bsd.lib.mk>

d562 2
@


1.20
log
@Fix a botch in the last change made (to accomodate the PowerPC), pointed
out by Chris Demetriou <cgd@@netbsd.org>
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.19 1997/04/16 20:42:46 thorpej Exp $
d436 1
d438 39
a476 1
includes:
d514 9
d547 2
d556 2
a557 2
LDADD=		${DESTDIR}/usr/lib/c++rt0.o -lcurses
DPADD=		${DESTDIR}/usr/lib/c++rt0.o ${LIBCURSES}
d608 2
a613 2

.include <bsd.lib.mk>
@


1.19
log
@Define _G_NEED_STDARG_H - needed for NetBSD/powerpc's varargs/stdarg
implementation.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.18 1997/03/16 15:45:15 veego Exp $
d634 1
d636 3
a689 1
#define _G_NEED_STDARG_H 1
@


1.18
log
@changes for bsd.lib.mk: s/PICFLAG/CPICFLAGS/
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.17 1997/02/07 07:14:02 mikel Exp $
d686 1
@


1.17
log
@install *.cc headers from libstdc++/st[dl]; from Steven J. Dovich in
  PR lib/2488.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.16 1996/12/22 20:46:06 cgd Exp $
d299 2
a300 2
    print ODATA "\t\@@echo \"\$(COMPILE.cc) \$(PICFLAG) -frtti \$(.IMPSRC) -o \$(.TARGET)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) \$(PICFLAG) -frtti \$(.IMPSRC) -o \$(.TARGET).o\n";
@


1.16
log
@convert genclass makefile to standard 'just install the shell script' form,
a la /usr/bin/true's makefile and others like it.  It's simpler than
what was here before, and more correct in terms of providing the variables
that the .mk files expected.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.15 1996/12/22 13:37:30 pk Exp $
d457 1
a457 1
	@@(cd libstdc++/std ; for j in *.h; do \
d463 1
a463 1
	@@(cd libstdc++/stl ; for j in *.h; do \
@


1.15
log
@Include c++rt.o when building shared library in libstdc++/Makefile
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.14 1996/12/20 01:04:17 cgd Exp $
d485 1
a485 5
PROG=		genclass
%% srcs genclass
NOMAN=
NOLING=
STRIP=
d487 3
a489 6
SRCDIR=${.CURDIR}

BINDIR ?= /usr/bin

genclass:	genclass.sh
	cp $(SRCDIR)/genclass.sh genclass
a491 1

@


1.14
log
@don't bother trying to lint c++ libraries, since lint can't deal with
c++ and a lint library containing only the C functions is pretty
much useless.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.13 1996/12/17 21:32:26 cgd Exp $
d565 5
@


1.13
log
@on the Alpha, don't include c++rt0.o on the link line.  (1) it doesn't
exist, and (2) its purpose on the link line is taken care of automatically
by the library-building process.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.12 1996/12/17 19:14:16 phil Exp $
d488 1
d518 1
d533 1
d547 1
d562 1
@


1.12
log
@Fix conflicts in libg++ 2.7.2 import.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.10 1996/05/22 02:05:52 mrg Exp $
d509 4
d515 1
@


1.11
log
@Use ${INSTALL}.
@
text
@d1 1
a1 1
#!/usr/gnu/bin/perl
d11 1
a11 1
#	reduce the cost of updating from a new release of gcc by an
d15 1
d18 1
a18 1
$version = "2.7.1";
d39 1
a39 1
       "bitset1.c", "bitxor.c", "builtin.cc", "chr.cc", "compare.cc",
d41 1
a41 1
       "pow.cc", "sqrt.cc", "str.cc", "timer.c");
d79 1
a79 1
@@iof = ("cleanup.c", "filedoalloc.c", "fileops.c", "floatconv.c",
d89 1
a89 1
	"iovsscanf.c", "outfloat.c", "stdfiles.c", "strops.c");
d566 2
a567 1
#define _G_LIB_VERSION "2.7.1"
d569 3
d573 1
d575 3
d579 1
d581 3
d585 1
d587 3
d594 1
d596 3
d601 1
d603 3
d610 1
d612 3
d617 1
d619 3
d624 1
d628 6
d681 1
a681 1
major=3
d685 1
a685 1
minor=0
d688 1
a688 1
minor=0
d691 1
a691 1
minor=0
d693 1
a693 1
This is libg++ 2.7.1 from the Free Software Foundation.
@


1.10
log
@don't create directories here; let mtree do it
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.9 1996/05/16 21:03:25 phil Exp $
d440 1
a440 1
		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
d446 1
a446 1
		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
d452 1
a452 1
		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
d458 1
a458 1
		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
d464 1
a464 1
		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
d470 1
a470 1
		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
@


1.9
log
@Back out the change to include libio and libiostream.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.8 1996/05/15 22:56:16 phil Exp $
a436 6
	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
		${DESTDIR}/usr/include/g++
	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
		${DESTDIR}/usr/include/g++/gen
	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
		${DESTDIR}/usr/include/g++/std
@


1.8
log
@Install includes from libio and enable building and installation of libio and
libiostream.  Some functions are duplicated in libio, libiostream and
libstdc++.  If needed, we can remove duplicated functions later.
(Fixes PR 2390)
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.7 1996/04/25 01:16:10 jtc Exp $
d427 1
a427 1
SUBDIR= libg++ libstdc++ libio libiostream
@


1.7
log
@Use 'includes' instead of 'beforeinstall' target to install headersUpdate libg++2netbsd to match
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.6 1996/04/08 02:45:57 phil Exp $
d427 1
a427 1
SUBDIR= libg++ libstdc++ # libio libiostream
d454 6
@


1.6
log
@Fix problems with which and where includes are installed.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.5 1996/04/04 23:33:45 phil Exp $
d436 1
a436 1
beforeinstall:
@


1.5
log
@Adding librx to libg++ tree.  (Closes PR 2271 and 2298.)
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.4 1996/03/11 04:58:24 thorpej Exp $
d429 7
a442 2
	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
		${DESTDIR}/usr/include/g++/stl
d463 1
a463 1
		cmp -s $$j ${DESTDIR}/usr/include/g++/stl/$$j || \
d465 7
a471 1
			${DESTDIR}/usr/include/g++/stl/$$j; \
@


1.4
log
@Fix installation of header files.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.2 1996/03/09 00:20:44 phil Exp $
d25 1
a25 1
	    "libg++/src", "libio", "libiostream", "libstdc++",
d143 4
d336 3
d382 1
a382 1
		&dumpsrcs (@@iosf, @@lstdcf, @@lstdcf2, @@stlf);
d542 1
a542 1
.PATH: $(.CURDIR)/../libio  $(.CURDIR)/stl
@


1.3
log
@s/ALLSRC/IMPSRC/ so that we don't try to compile header files.  From
Gary D. Duzan <gary@@wheel.tiac.net>.
@
text
@a421 2
INCLUDEDIRS= include libg++/src 

d431 6
a436 8
	@@-for i in ${INCLUDEDIRS}; do \
		echo installing includes from $$i ; \
		(cd $$i; for j in *.[ih]; do \
			cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
			install -c -o ${BINOWN} -g ${BINGRP} -m 644 $$j \
				${DESTDIR}/usr/include/g++/$$j; \
		done); \
	done
d445 1
a445 1
		cmp -s $$j ${DESTDIR}/usr/libstdc++/g++/std/$$j || \
d447 1
a447 1
			${DESTDIR}/usr/libstdc++/g++/std/$$j; \
d451 1
a451 1
		cmp -s $$j ${DESTDIR}/usr/libstdc++/g++/stl/$$j || \
d453 1
a453 1
			${DESTDIR}/usr/libstdc++/g++/stl/$$j; \
@


1.2
log
@Fix typo in comment.
@
text
@d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.1.1.1 1996/03/09 00:00:57 phil Exp $
d280 2
a281 2
    print ODATA "\t\@@echo \"\$(COMPILE.cc) -frtti \$(.ALLSRC)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) -frtti \$(.ALLSRC) -o \$(.TARGET).o\n";
d287 2
a288 2
    print ODATA "\t\@@echo \"\$(COMPILE.cc) -p -frtti \$(.ALLSRC) -o \$(.TARGET)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) -p -frtti \$(.ALLSRC) -o \$(.TARGET).o\n";
d294 2
a295 2
    print ODATA "\t\@@echo \"\$(COMPILE.cc) \$(PICFLAG) -frtti \$(.ALLSRC) -o \$(.TARGET)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) \$(PICFLAG) -frtti \$(.ALLSRC) -o \$(.TARGET).o\n";
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
#	$NetBSD: $
d208 1
a208 1
#  Following functions ritten by Christos Zoulas, January 15, 1996.
@


1.1.1.1
log
@Import of libg++-2.7.1.
@
text
@@


1.1.1.2
log
@Import of libg++ 2.7.2.
@
text
@d1 1
a1 1
#!/usr/local/bin/perl
d3 1
a3 1
#	$NetBSD: libg++2netbsd,v 1.10 1996/05/22 02:05:52 mrg Exp $
d11 1
a11 1
#	reduce the cost of updating from a new release of libg++ by an
a14 1
#  Updated for libg++-2.7.2 by Chris Demetriou, September 13, 1996.
d17 1
a17 1
$version = "2.7.2";
d25 1
a25 1
	    "libg++/src", "libio", "libiostream", "librx", "libstdc++",
d38 1
a38 1
       "bitset1.c", "bitxor.c", "builtin.cc", "compare.cc",
d40 1
a40 1
       "pow.cc", "sqrt.cc", "timer.c");
d78 1
a78 1
@@iof = ("chr.cc", "cleanup.c", "filedoalloc.c", "fileops.c", "floatconv.c",
d88 1
a88 1
	"iovsscanf.c", "outfloat.c", "str.cc", "stdfiles.c", "strops.c");
a142 4
@@rxf = ("rx.c");

@@rxof = ("rx.h");

d208 1
a208 1
#  Following functions written by Christos Zoulas, January 15, 1996.
d280 2
a281 2
    print ODATA "\t\@@echo \"\$(COMPILE.cc) -frtti \$(.IMPSRC)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) -frtti \$(.IMPSRC) -o \$(.TARGET).o\n";
d287 2
a288 2
    print ODATA "\t\@@echo \"\$(COMPILE.cc) -p -frtti \$(.IMPSRC) -o \$(.TARGET)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) -p -frtti \$(.IMPSRC) -o \$(.TARGET).o\n";
d294 2
a295 2
    print ODATA "\t\@@echo \"\$(COMPILE.cc) \$(PICFLAG) -frtti \$(.IMPSRC) -o \$(.TARGET)\"\n";
    print ODATA "\t\@@\$(COMPILE.cc) \$(PICFLAG) -frtti \$(.IMPSRC) -o \$(.TARGET).o\n";
a331 3
print "Populating $targetdir/librx\n";
&copyfiles ("$srcdir/librx", "$targetdir/librx", @@rxf, @@rxof);

d375 1
a375 1
		&dumpsrcs (@@iosf, @@lstdcf, @@lstdcf2, @@stlf, @@rxf);
d422 1
a422 5
HEADERS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \
         csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \
         cwchar cwctype new stddef string exception stdexcept typeinfo \
         algorithm deque list map queue set stack vector utility functional \
         iterator memory numeric
d424 17
a440 8

includes:
	@@echo installing includes from libg++/src
	@@(cd libg++/src ; for j in *.[ih]; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/$$j; \
	done)
d444 1
a444 1
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
a446 6
	@@echo installing includes from libio
	@@(cd libio ; for j in *.h; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/$$j; \
	done)
d449 3
a451 3
		cmp -s $$j ${DESTDIR}/usr/include/g++/std/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/std/$$j; \
d455 3
a457 9
		cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/$$j; \
	done)
	@@echo installing includes from libstdc++
	@@(cd libstdc++ ; for j in *.h ${HEADERS}; do \
		cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \
		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
			${DESTDIR}/usr/include/g++/$$j; \
d539 1
a539 1
.PATH: $(.CURDIR)/../libio  $(.CURDIR)/stl $(.CURDIR)/../librx
d551 1
a551 2
#define _G_LIB_VERSION "2.7.2"
#ifndef __alpha__
a552 3
#else /* __alpha__ */
#define _G_NAMES_HAVE_UNDERSCORE 0
#endif /* __alpha__ */
a553 1
#ifndef __alpha__
a554 3
#else /* __alpha__ */
#define _G_VTABLE_LABEL_PREFIX "_vt$"
#endif /* __alpha__ */
a555 1
#ifndef __alpha__
a556 3
#else /* __alpha__ */
typedef int _G_clock_t;
#endif /* __alpha__ */
a557 1
#ifndef __alpha__
a558 3
#else /* __alpha__ */
typedef long _G_fpos_t;
#endif /* __alpha__ */
a562 1
#ifndef __alpha__
a563 3
#else /* __alpha__ */
typedef long _G_off_t;
#endif /* __alpha__ */
a565 1
#ifndef __alpha__
a566 3
#else /* __alpha__ */
#define __PTRDIFF_TYPE__ long
#endif /* __alpha__ */
a570 1
#ifndef __alpha__
a571 3
#else /* __alpha__ */
#define __SIZE_TYPE__ unsigned long
#endif /* __alpha__ */
a573 1
#ifndef __alpha__
a574 3
#else /* __alpha__ */
typedef int _G_time_t;
#endif /* __alpha__ */
a576 1
#ifndef __alpha__
a579 6
#else /* __alpha__ */
typedef long _G_ssize_t;
typedef unsigned int /* default */ _G_wint_t;
#define _G_NEED_STDARG_H
#define _G_va_list va_list
#endif /* __alpha__ */
d627 1
a627 1
major=4
d631 1
a631 1
minor=1
d634 1
a634 1
minor=1
d637 1
a637 1
minor=1
d639 1
a639 1
This is libg++ 2.7.2 from the Free Software Foundation.
@
