Permalink
Browse files

Rewrite virt-make-fs in C (originally Perl).

It should be very compatible with the Perl version.
  • Loading branch information...
1 parent 40512c6 commit d3512deb6728dffbb3a958c7168b81dbde56d748 @rwmjones rwmjones committed Jan 27, 2014
Showing with 1,200 additions and 639 deletions.
  1. +3 −0 .gitignore
  2. +1 −1 Makefile.am
  3. +1 −0 configure.ac
  4. +82 −0 make-fs/Makefile.am
  5. +854 −0 make-fs/make-fs.c
  6. +4 −2 {tools → make-fs}/test-virt-make-fs.sh
  7. +249 −0 make-fs/virt-make-fs.pod
  8. +1 −0 po/POTFILES
  9. +0 −1 po/POTFILES-pl
  10. +1 −1 run.in
  11. +4 −0 src/guestfs.pod
  12. +0 −2 tools/Makefile.am
  13. +0 −632 tools/virt-make-fs
View
@@ -282,6 +282,9 @@ Makefile.in
/m4/ltsugar.m4
/m4/ltversion.m4
/maint.mk
+/make-fs/stamp-virt-make-fs.pod
+/make-fs/virt-make-fs
+/make-fs/virt-make-fs.1
/missing
/mllib/.depend
/mllib/common_gettext.ml
View
@@ -74,7 +74,7 @@ SUBDIRS += test-tool
SUBDIRS += fish
# virt-tools in C.
-SUBDIRS += align cat diff df edit format inspector rescue
+SUBDIRS += align cat diff df edit format inspector make-fs rescue
# bash-completion
SUBDIRS += bash
View
@@ -1714,6 +1714,7 @@ AC_CONFIG_FILES([Makefile
java/examples/Makefile
lua/Makefile
lua/examples/Makefile
+ make-fs/Makefile
mllib/Makefile
mllib/config.ml
ocaml/META
View
@@ -0,0 +1,82 @@
+# libguestfs virt-diff
+# Copyright (C) 2010-2014 Red Hat Inc.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+include $(top_srcdir)/subdir-rules.mk
+
+EXTRA_DIST = \
+ test-virt-make-fs.sh \
+ virt-make-fs.pod
+
+CLEANFILES = stamp-virt-make-fs.pod
+
+bin_PROGRAMS = virt-make-fs
+
+SHARED_SOURCE_FILES = \
+ ../fish/options.h \
+ ../fish/options.c \
+ ../fish/domain.c \
+ ../fish/uri.c
+
+virt_make_fs_SOURCES = \
+ $(SHARED_SOURCE_FILES) \
+ make-fs.c
+
+virt_make_fs_CPPFLAGS = \
+ -DGUESTFS_WARN_DEPRECATED=1 \
+ -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
+ -I$(top_srcdir)/src -I$(top_builddir)/src \
+ -I$(top_srcdir)/fish \
+ -I$(srcdir)/../gnulib/lib -I../gnulib/lib
+
+virt_make_fs_CFLAGS = \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(GPROF_CFLAGS) $(GCOV_CFLAGS) \
+ $(LIBXML2_CFLAGS)
+
+virt_make_fs_LDADD = \
+ $(top_builddir)/src/libutils.la \
+ $(top_builddir)/src/libguestfs.la \
+ $(LIBXML2_LIBS) \
+ ../gnulib/lib/libgnu.la
+
+# Manual pages and HTML files for the website.
+man_MANS = virt-make-fs.1
+
+noinst_DATA = \
+ $(top_builddir)/html/virt-make-fs.1.html
+
+virt-make-fs.1 $(top_builddir)/html/virt-make-fs.1.html: stamp-virt-make-fs.pod
+
+stamp-virt-make-fs.pod: virt-make-fs.pod
+ $(PODWRAPPER) \
+ --man virt-make-fs.1 \
+ --html $(top_builddir)/html/virt-make-fs.1.html \
+ --license GPLv2+ \
+ $<
+ touch $@
+
+# Tests.
+
+TESTS_ENVIRONMENT = $(top_builddir)/run --test
+
+if ENABLE_APPLIANCE
+TESTS = \
+ test-virt-make-fs.sh
+endif ENABLE_APPLIANCE
+
+check-valgrind:
+ $(MAKE) VG="$(top_builddir)/run @VG@" check
Oops, something went wrong.

0 comments on commit d3512de

Please sign in to comment.