mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
build: Add common-rules.mk, common rules for all Makefiles.
This file is mainly a central place to: - include localenv if it exists, and - define the RHEL 5 backwards compatibility macros, instead of spreading them over every other file.
This commit is contained in:
@@ -15,8 +15,7 @@
|
||||
# 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_builddir)/localenv
|
||||
|
||||
include $(top_srcdir)/common-rules.mk
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
||||
29
common-rules.mk
Normal file
29
common-rules.mk
Normal file
@@ -0,0 +1,29 @@
|
||||
# libguestfs
|
||||
# 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.
|
||||
|
||||
# 'common-rules.mk' should be included in every Makefile.am.
|
||||
# cf. 'subdir-rules.mk'
|
||||
|
||||
-include $(top_builddir)/localenv
|
||||
|
||||
# Old RHEL 5 autoconf defines these, but RHEL 5 automake doesn't
|
||||
# create variables for them. So define them here if they're not
|
||||
# defined already.
|
||||
builddir ?= @builddir@
|
||||
abs_builddir ?= @abs_builddir@
|
||||
srcdir ?= @srcdir@
|
||||
abs_srcdir ?= @abs_srcdir@
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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 = \
|
||||
LICENSE \
|
||||
create_disk.erl \
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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 = \
|
||||
LICENSE \
|
||||
guestfs-examples.pod \
|
||||
|
||||
@@ -15,14 +15,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_builddir.
|
||||
abs_builddir ?= $(shell pwd)
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/generator && pwd)
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
# In alphabetical order.
|
||||
sources = \
|
||||
|
||||
@@ -15,14 +15,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/gobject/docs && pwd)
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_builddir.
|
||||
abs_builddir ?= $(shell pwd)
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
# The name of the module, e.g. 'glib'.
|
||||
DOC_MODULE=guestfs
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
export EXAMPLE_XML = \
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
java_prefix = com/redhat/et/libguestfs
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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 = \
|
||||
LICENSE \
|
||||
CreateDisk.java \
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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 = \
|
||||
LICENSE \
|
||||
create_disk.lua \
|
||||
|
||||
@@ -15,12 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/ocaml && pwd)
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
generator_built = \
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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 = \
|
||||
LICENSE \
|
||||
create_disk.ml \
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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 = \
|
||||
LICENSE \
|
||||
create_disk.pl \
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/php && pwd)
|
||||
|
||||
generator_built = \
|
||||
extension/php_guestfs_php.h \
|
||||
extension/guestfs_php.c
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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
|
||||
|
||||
# XXX The use of po4a is naive here. Also we should integrate this
|
||||
# into the po/ directory and the translations into the usual
|
||||
# libguestfs.pot file.
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
# identical. If you create a new $lang.po, create the $lang/
|
||||
# subdirectory and copy the Makefile.am from an existing language.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
LINGUA = $(shell basename -- `pwd`)
|
||||
|
||||
CLEANFILES = *.1 *.3 stamp-update-po
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
# identical. If you create a new $lang.po, create the $lang/
|
||||
# subdirectory and copy the Makefile.am from an existing language.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
LINGUA = $(shell basename -- `pwd`)
|
||||
|
||||
CLEANFILES = *.1 *.3 stamp-update-po
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/po && pwd)
|
||||
|
||||
DOMAIN = $(PACKAGE_NAME)
|
||||
COPYRIGHT_HOLDER = Red Hat Inc.
|
||||
MSGID_BUGS_ADDRESS = https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
generator_built = \
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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 = \
|
||||
LICENSE \
|
||||
create_disk.py \
|
||||
|
||||
@@ -15,12 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/resize && pwd)
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
generator_built = \
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# 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 = \
|
||||
LICENSE \
|
||||
create_disk.rb \
|
||||
|
||||
@@ -17,12 +17,6 @@
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/sparsify && pwd)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(SOURCES) \
|
||||
virt-sparsify.pod \
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# subdir-rules.mk should be included in every *subdirectory* Makefile.am.
|
||||
|
||||
include $(top_srcdir)/common-rules.mk
|
||||
|
||||
# Individual Makefile.am's should define generator_built if that
|
||||
# subdirectory contains any files which are built by the generator.
|
||||
# Set generator_built to the list of those files.
|
||||
|
||||
@@ -15,15 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/sysprep && pwd)
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_builddir.
|
||||
abs_builddir ?= $(shell pwd)
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have builddir.
|
||||
builddir ?= .
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Old RHEL 5 autoconf doesn't have abs_srcdir.
|
||||
abs_srcdir ?= $(shell cd $(top_srcdir)/tests/xml && pwd)
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
|
||||
Reference in New Issue
Block a user