virt-v2v/ocaml-dep.sh.in
Richard W.M. Jones 69b4e83935 -o qemu: Replace hard-coded UEFI paths
Update the qemu shell script to simply find the UEFI paths as
required.

Remove lib/uefi.ml:find_uefi_firmware as this function is no longer
needed.

Remove common/mlv2v/ everywhere.  This contained a list of UEFI code
and NVRAM files which is no longer used.

Update common submodule.  This pulls in:

  Richard W.M. Jones (5):
      mlcustomize/customize_run.ml: Move 'in' to new line
      mlstdutils/guestfs_config: Define host_os
      mlcustomize, mltools: Check guest OS is compatible before allowing --run
      Remove mlv2v/ subdirectory
      qemuopts: Add ability to add raw, unquoted output to qemu scripts
      qemuopts: Fix missing break statement
2024-11-15 14:15:57 +00:00

88 lines
2.8 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash -
# (C) Copyright 2009-2020 Red Hat Inc.
# @configure_input@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# This is a smarter wrapper around ocamldep(1) which is used to create
# the .depend files which are present in each subdirectory that builds
# OCaml code.
#
# Usage:
# .depend: *.mli *.ml
# $(top_builddir)/ocaml-dep.sh $^
# -include .depend
set -e
# List of directories that contain common OCaml libraries. If it
# contains OCaml code that can be included from another directory,
# then it should go here. Note that OCaml modules in these
# directories must have unique names (eg. not Utils) else
# dependencies don't get built right.
include_dirs="
common/mlcustomize
common/mldrivers
common/mlgettext
common/mlpcre
common/mlprogress
common/mlstdutils
common/mltools
common/mlutils
common/mlvisit
common/mlxml
lib
convert
input
output
"
# Output file is always created in the current directory.
output=.depend
subdir=$(realpath --relative-to=@abs_top_builddir@ .)
srcdir=$(realpath --relative-to=. @abs_top_srcdir@/${subdir})
srcdir_re=$(realpath --relative-to=. @abs_top_srcdir@/${subdir} | sed 's/\./[.]/g')
top_builddir=$(realpath --relative-to=. @abs_top_builddir@)
includes="-I @abs_top_srcdir@/$subdir -I @abs_top_builddir@/$subdir"
for i in $include_dirs; do
includes="$includes -I @abs_top_srcdir@/$i -I @abs_top_builddir@/$i"
done
rm -f $output $output-t
echo "# OCaml dependencies generated by $0" > $output-t
echo >> $output-t
# Rewrite paths
# 1. Normalize absolute srcdir to relative path
# 2. Object files (*.cm*, *.o), in srcdir: Rewrite to builddir
# 3. Generated _config.ml in srcdir: Rewrite to builddir
# 4. Other object files below abs_top_srcdir: rewrite to corresponding builddir
# 5. Eliminate "./" prefix
@OCAMLFIND@ ocamldep -all -one-line $includes "$@" \
| sed \
-e "s,@abs_top_srcdir@/${subdir},.,g" \
-e "s,\B${srcdir_re}/\\([^ ]*[.]\\)\\(cm[^ ]*\\|o\\),\\1\\2,g" \
-e "s,\B${srcdir_re}/\\([^ /]*_config[.]ml\\),\\1,g" \
-e "s,@abs_top_srcdir@/\\([^ ]*[.]\\)\\(cm[^ ]*\\|o\\),${top_builddir}/\\1\\2,g" \
-e 's,\(^\| \)./,\1,g' \
>> $output-t
chmod -w $output-t
mv $output-t $output