2 # Copyright (C) 2009 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 include $(top_srcdir)/subdir-rules.mk
26 fsdir = $(libdir)/guestfs
27 superminfsdir = $(libdir)/guestfs/supermin.d
32 supermin.d/daemon.img \
36 # This used to be a configure-generated file (as is update.sh still).
37 # However config.status always touches the destination file, which
38 # means the appliance got rebuilt too often.
40 cd $(top_builddir) && \
41 ./config.status --file=appliance/$@-t:appliance/$<
45 packagelist: packagelist.in
46 cpp -undef -D$(DISTRO)=1 < $< | \
47 grep -v '^[[:space:]]*$$' | grep -v '^#' > $@-t
50 excludelist: excludelist.in
51 cpp -undef -D$(DISTRO)=1 < $< | \
52 grep -v '^[[:space:]]*$$' | grep -v '^#' > $@-t
55 supermin.d/base.img supermin.d/hostfiles: stamp-supermin
56 stamp-supermin: make.sh packagelist excludelist
58 rm -f $@ supermin.d/base.img supermin.d/hostfiles
62 supermin.d/daemon.img: ../daemon/guestfsd
66 cd sbin && ln ../../daemon/guestfsd
67 echo -e "sbin\nsbin/guestfsd" | cpio --quiet -o -H newc > $@-t
71 supermin.d/init.img: init
72 cmp -s $(srcdir)/init $(builddir)/init || cp $(srcdir)/init $(builddir)/init
75 echo "init" | cpio --quiet -o -H newc > $@-t
80 CLEANFILES = packagelist excludelist