vx32

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

AUTOGEN (1192B)


      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/libmemlayer/draw.c
     12 /sys/src/libmemlayer/lalloc.c
     13 /sys/src/libmemlayer/layerop.c
     14 /sys/src/libmemlayer/ldelete.c
     15 /sys/src/libmemlayer/lhide.c
     16 /sys/src/libmemlayer/line.c
     17 /sys/src/libmemlayer/load.c
     18 /sys/src/libmemlayer/lorigin.c
     19 /sys/src/libmemlayer/lsetrefresh.c
     20 /sys/src/libmemlayer/ltofront.c
     21 /sys/src/libmemlayer/ltorear.c
     22 /sys/src/libmemlayer/unload.c
     23 "
     24 
     25 case "$#" in
     26 0)
     27 	;;
     28 *)
     29 	autofiles="$*"
     30 esac
     31 
     32 plan9=/home/rsc/plan9/4e
     33 
     34 for f in $autofiles
     35 do
     36 	ed=`echo $f | sed 's;.*/;;; s;\.[ch]$;;; s;$;.ed;'`
     37 	out=`echo $f | sed 's;.*/;;;'`
     38 	echo $f '->' $out
     39 	test -f $out && chmod +w $out
     40 	(
     41 		echo ',s;"../port/;";g'
     42 		echo ',s;#include.*<;#include ";g'
     43 		echo ',s;#include.*>;&FIXINCLUDEME;g'
     44 		echo ',s;>FIXINCLUDEME;";g'
     45 		echo ',s;"libc.h";"lib.h";g'
     46 		echo 'g/#pragma/d'
     47 		echo 'g/#include "pool/d'
     48 		test -f $ed && cat $ed
     49 		echo w $out
     50 		echo q
     51 	) | ed $plan9/$f 2>&1 | egrep -v '^[0-9?]+$'
     52 	chmod -w $out
     53 done