vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

AUTOGEN (1225B)


      1 #!/bin/sh
      2 
      3 # Most of the library files come in virtually unchanged.
      4 # Rather than maintain the few changes by hand, we keep a set
      5 # of ed scripts that we can run on the originals to produce 
      6 # the versions we need.
      7 #
      8 # Note that the headers are in ../a
      9 
     10 autofiles="
     11 /sys/src/libmemdraw/alloc.c
     12 /sys/src/libmemdraw/arc.c
     13 /sys/src/libmemdraw/arctest.c
     14 /sys/src/libmemdraw/cload.c
     15 /sys/src/libmemdraw/cmap.c
     16 /sys/src/libmemdraw/defont.c
     17 /sys/src/libmemdraw/draw.c
     18 /sys/src/libmemdraw/ellipse.c
     19 /sys/src/libmemdraw/fillpoly.c
     20 /sys/src/libmemdraw/line.c
     21 /sys/src/libmemdraw/load.c
     22 /sys/src/libmemdraw/poly.c
     23 /sys/src/libmemdraw/string.c
     24 /sys/src/libmemdraw/subfont.c
     25 /sys/src/libmemdraw/unload.c
     26 "
     27 
     28 case "$#" in
     29 0)
     30 	;;
     31 *)
     32 	autofiles="$*"
     33 esac
     34 
     35 plan9=/home/rsc/plan9/4e
     36 
     37 for f in $autofiles
     38 do
     39 	ed=`echo $f | sed 's;.*/;;; s;\.[ch]$;;; s;$;.ed;'`
     40 	out=`echo $f | sed 's;.*/;;;'`
     41 	echo $f '->' $out
     42 	test -f $out && chmod +w $out
     43 	(
     44 		echo ',s;"../port/;";g'
     45 		echo ',s;#include.*<;#include ";g'
     46 		echo ',s;#include.*>;&FIXINCLUDEME;g'
     47 		echo ',s;>FIXINCLUDEME;";g'
     48 		echo ',s;"libc.h";"lib.h";g'
     49 		echo 'g/#pragma/d'
     50 		test -f $ed && cat $ed
     51 		echo w $out
     52 		echo q
     53 	) | ed $plan9/$f 2>&1 | egrep -v '^[0-9?]+$'
     54 	chmod -w $out
     55 done