Skip to content

Commit

Permalink
🎨 Build out of tree and mp_vector macros
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed Dec 10, 2024
1 parent bf2ac16 commit 58da404
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pass_generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
scriptdir=`dirname "${BASH_SOURCE[0]}"`

modify() {
final=$(cat "$1" |
sed "s/XXX/$2/g" |
sed "s/xxx/$3/g")

if [ -z "$4" ]; then
echo "$final" | sed "s/ mod//g"
else
echo "$final" |
sed "s/, c)/, \&c)/g" |
sed "s/\bmod\b/$4/g" |
sed "s/_ptr_at/_at/g" |
sed "s/\*c = /c = /" |
sed "s/c->/c./g"
fi
}

modify "$scriptdir/pass/xxx.c" $1 $2 $3
#modify "$scriptdir/pass/xxx.h" $1 $2 $3

0 comments on commit 58da404

Please sign in to comment.