ast2firm: Factorise code to convert a value to its storage type.
[cparser] / create_builtins_h.sh
index 441f281..f8b560e 100755 (executable)
@@ -1,12 +1,14 @@
 #!/bin/sh
 
+INPUT="$1"
+
 cat <<__EOF__
 /* WARNING: automatically generated file. Generated from builtins/builtins.c */
 
 static const char builtins[] =
 __EOF__
 
-cat builtins/builtins.c | sed -e "s/^/\\\"/g" -e "s/$/\\\n\\\"/g"
+cat "$INPUT" | sed -e "s/^/\\\"/g" -e "s/$/\\\n\\\"/g"
 
 cat << __EOF__
 ;