head	1.1;
access;
symbols
	netbsd-11-0-RC4:1.1
	netbsd-11-0-RC3:1.1
	netbsd-11-0-RC2:1.1
	netbsd-11-0-RC1:1.1
	perseant-exfatfs-base-20250801:1.1
	netbsd-11:1.1.0.2
	netbsd-11-base:1.1;
locks; strict;
comment	@# @;


1.1
date	2025.07.17.14.26.12;	author christos;	state Exp;
branches;
next	;
commitid	9yTxET2KrcqKI63G;


desc
@@


1.1
log
@Add build glue and generated files.
@
text
@#!/bin/sh

BUILD=../../openssl-3.0.8

create() {
	sed -e "s,@@proto@@,$proto,g" -e "s/@@PROTO@@/$PROTO/g" -e "/@@SRCS@@/ {
r $fn.out
d
}" PROTO.in > $fn.inc
rm -f $fn.out
}

d=
for i in $(find ${BUILD} -name 'liblegacy-lib-*.d'); do
	nd=$(dirname "$i" | sed -e s,${BUILD}/,,)
	if [ "$nd" != "$d" ]; then
		if [ -n "$d" ]; then
			create
		fi
		fn=$(echo $nd | tr '/' '_')
		proto=$nd
		PROTO=$(echo $fn | tr '[a-z]' '[A-Z]')
		d=$nd
		rm -f $fn.out
	fi
	echo $(basename $i) | \
	    sed -e 's/.*-lib-//' -e 's/\.d/.c \\/' >> $fn.out
done
create
@
