aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-08-18 19:51:17 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:39 -0400
commitc9322ab5bfe17e9db099646978f43a745816073e (patch)
tree2f8288fd9dcc73173d260756467c765f7e9ce1bb /scripts
parentb309c321256fc48cd7164c55582eaa37bc77b6ab (diff)
meson: cpu-emu
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/feature_to_c.sh24
1 files changed, 8 insertions, 16 deletions
diff --git a/scripts/feature_to_c.sh b/scripts/feature_to_c.sh
index c8ce9b88f6..b1169899c1 100644
--- a/scripts/feature_to_c.sh
+++ b/scripts/feature_to_c.sh
@@ -19,16 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
-output=$1
-shift
-
-if test -z "$output" || test -z "$1"; then
- echo "Usage: $0 OUTPUTFILE INPUTFILE..."
- exit 1
-fi
-
-if test -e "$output"; then
- echo "Output file \"$output\" already exists; refusing to overwrite."
+if test -z "$1"; then
+ echo "Usage: $0 INPUTFILE..."
exit 1
fi
@@ -60,17 +52,17 @@ for input; do
printf "'\''\\n'\'', \n"
} END {
print " 0 };"
- }' < $input >> $output
+ }' < $input
done
-echo >> $output
-echo "const char *const xml_builtin[][2] = {" >> $output
+echo
+echo "const char *const xml_builtin[][2] = {"
for input; do
basename=$(echo $input | sed 's,.*/,,')
arrayname=xml_feature_$(echo $input | sed 's,.*/,,; s/[-.]/_/g')
- echo " { \"$basename\", $arrayname }," >> $output
+ echo " { \"$basename\", $arrayname },"
done
-echo " { (char *)0, (char *)0 }" >> $output
-echo "};" >> $output
+echo " { (char *)0, (char *)0 }"
+echo "};"