@@ -6,6 +6,7 @@ echo \#buildapi-variable-no-builddir > /dev/null
6
6
prefix=/usr
7
7
8
8
enable_documentation=yes
9
+ enable_dracut_cpio=no
9
10
10
11
CC=" ${CC:- cc} "
11
12
PKG_CONFIG=" ${PKG_CONFIG:- pkg-config} "
@@ -48,6 +49,7 @@ while (($# > 0)); do
48
49
--infodir) read_arg infodir " $@ " || shift ;;
49
50
--systemdsystemunitdir) read_arg systemdsystemunitdir " $@ " || shift ;;
50
51
--bashcompletiondir) read_arg bashcompletiondir " $@ " || shift ;;
52
+ --enable-dracut-cpio) enable_dracut_cpio=yes ;;
51
53
* ) echo " Ignoring unknown option '$1 '" ;;
52
54
esac
53
55
shift
@@ -102,6 +104,15 @@ if test $found = no; then
102
104
exit 1
103
105
fi
104
106
107
+ if test " $enable_dracut_cpio " = " yes" ; then
108
+ cargo --version > /dev/null
109
+ ret=$?
110
+ if test $ret -ne 0; then
111
+ echo " dracut couldn't find cargo for dracut-cpio build"
112
+ exit 1
113
+ fi
114
+ fi
115
+
105
116
cat > Makefile.inc.$$ << EOF
106
117
prefix ?= ${prefix}
107
118
libdir ?= ${libdir:- ${prefix} / lib}
@@ -110,6 +121,7 @@ sysconfdir ?= ${sysconfdir:-${prefix}/etc}
110
121
sbindir ?= ${sbindir:- ${prefix} / sbin}
111
122
mandir ?= ${mandir:- ${prefix} / share/ man}
112
123
enable_documentation ?= ${enable_documentation:- yes}
124
+ enable_dracut_cpio ?= ${enable_dracut_cpio}
113
125
bindir ?= ${bindir:- ${prefix} / bin}
114
126
KMOD_CFLAGS ?= $( ${PKG_CONFIG} --cflags " libkmod >= 23 " )
115
127
KMOD_LIBS ?= $( ${PKG_CONFIG} --libs " libkmod >= 23 " )
0 commit comments