head	1.2;
access;
symbols
	ePerl_2_2_14:1.1.1.1 RSE:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2000.07.03.09.05.26;	author rse;	state Exp;
branches;
next	1.1;

1.1
date	99.05.02.14.43.39;	author rse;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	99.05.02.14.43.39;	author rse;	state Exp;
branches;
next	;


desc
@@


1.2
log
@*** empty log message ***
@
text
@:
eval 'exec perl -S $0 ${1+"$@@"}'
    if $running_under_some_shell;
##
##  mkproto -- generate prototype header
##  Copyright (c) Ralf S. Engelschall, All Rights Reserved.
##

$header = $ARGV[0];
shift @@ARGV;
$sources = join(" ", @@ARGV);

open(IN, "<$header");
open(OUT, ">$header.n");
while (<IN>) {
	if (m|^/\*_BEGIN_PROTO_\*/|) {
		while (<IN>) {
	        last if (m|^/\*_END_PROTO_\*/|);
		}
		print OUT "/*_BEGIN_PROTO_*/\n";
        open(CP, "cproto -DMKPROTO -e -f3 -v $sources 2>/dev/null|");
		while (<CP>) {
			if (m|^/\* .+\.c \*/|) {
				print OUT "\n";
			}
			print OUT $_;
		}
        close(CP);
		print OUT "/*_END_PROTO_*/\n";
		next;
	}
	print OUT $_;
}

close(OUT);
close(IN);
system("mv $header.n $header");
@


1.1
log
@Initial revision
@
text
@d1 7
a7 1
#!/sw/bin/perl
@


1.1.1.1
log
@Import of ePerl 2.2.14
@
text
@@
