Move the source files into a subdirectory
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 1 Sep 2023 12:49:55 +0000 (13:49 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 1 Sep 2023 13:17:51 +0000 (14:17 +0100)
.gitignore
Makefile.am
configure.ac
src/Makefile.am [new file with mode: 0644]
src/init.c [moved from init.c with 100% similarity]
src/qemu-sanity-check.in [moved from qemu-sanity-check.in with 100% similarity]
tests/Makefile.am
tests/run-qemu-sanity-check

index edcd1ac..a9ac667 100644 (file)
@@ -18,13 +18,13 @@ Makefile.in
 /configure
 /depcomp
 /local*
-/init
-/initrd
 /install-sh
 /missing
-/qemu-sanity-check
 /qemu-sanity-check.1
 /qemu-sanity-check.pod
 /qemu-sanity-check-*.tar.gz
+/src/init
+/src/initrd
+/src/qemu-sanity-check
 /stamp-h1
 /test-driver
index 657b6dc..5fc5815 100644 (file)
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-SUBDIRS = . tests
+SUBDIRS = src tests
 
 EXTRA_DIST = \
        .gitignore \
        qemu-sanity-check.1 \
-       qemu-sanity-check.in \
        qemu-sanity-check.pod \
        qemu-sanity-check.pod.in
 
 CLEANFILES = \
-       *~ \
-       qemu-sanity-check
-
-bin_SCRIPTS = qemu-sanity-check
-initrddir = $(libdir)/qemu-sanity-check
-initrd_DATA = initrd
-
-# Build the initramfs.
-initrd: init
-       echo $< | cpio --quiet -o -H newc > $@-t
-       mv $@-t $@
-
-noinst_PROGRAMS = init
-init_SOURCES = init.c
-init_CFLAGS = -static
-init_LDFLAGS = -static
+       *~
 
 # Build the man pages.
 qemu-sanity-check.pod: qemu-sanity-check.pod.in Makefile
index 432c63e..31d3627 100644 (file)
@@ -70,7 +70,7 @@ AM_CONDITIONAL([HAVE_POD2MAN], [test "x$POD2MAN" != "xno"])
 
 dnl Produce output files.
 AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([qemu-sanity-check],[chmod 0555 qemu-sanity-check])
-AC_CONFIG_FILES([Makefile tests/Makefile])
+AC_CONFIG_FILES([src/qemu-sanity-check],[chmod 0555 src/qemu-sanity-check])
+AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
 
 AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..823a7a2
--- /dev/null
@@ -0,0 +1,37 @@
+# Makefile for qemu-sanity-check
+# Copyright (C) 2013 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.
+
+EXTRA_DIST = \
+       qemu-sanity-check.in
+
+CLEANFILES = \
+       *~ \
+       qemu-sanity-check
+
+bin_SCRIPTS = qemu-sanity-check
+initrddir = $(libdir)/qemu-sanity-check
+initrd_DATA = initrd
+
+# Build the initramfs.
+initrd: init
+       echo $< | cpio --quiet -o -H newc > $@-t
+       mv $@-t $@
+
+noinst_PROGRAMS = init
+init_SOURCES = init.c
+init_CFLAGS = -static
+init_LDFLAGS = -static
similarity index 100%
rename from init.c
rename to src/init.c
index 7185f14..010e5a3 100644 (file)
@@ -22,7 +22,7 @@ EXTRA_DIST = \
 CLEANFILES = \
        *~
 
-TESTS_ENVIRONMENT = PATH=$(abs_top_builddir):$(PATH)
+TESTS_ENVIRONMENT = PATH=$(abs_top_builddir)/src:$(PATH)
 
 TESTS = \
        run-qemu-sanity-check \
index ec015af..be32cda 100755 (executable)
@@ -17,4 +17,4 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-qemu-sanity-check -v --initrd=../initrd "$@"
+qemu-sanity-check -v --initrd=../src/initrd "$@"