File: Makefile.am

package info (click to toggle)
libguestfs 1%3A1.40.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 123,660 kB
  • sloc: ansic: 460,074; ml: 63,059; sh: 14,955; java: 9,512; makefile: 9,133; cs: 6,300; haskell: 5,652; python: 3,856; perl: 3,619; erlang: 2,435; xml: 1,683; ruby: 350; pascal: 255; lex: 135; yacc: 128; cpp: 10
file content (138 lines) | stat: -rw-r--r-- 3,953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# libguestfs virt-v2v test harness
# Copyright (C) 2009-2019 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.

# Build the V2V_test_harness library, used by external repositories
# that test virt-v2v end-to-end.

include $(top_srcdir)/subdir-rules.mk

EXTRA_DIST = \
	$(SOURCES_MLI) $(SOURCES_ML) \
	virt-v2v-test-harness.pod

SOURCES_MLI = \
	v2v_test_harness.mli

SOURCES_ML = \
	v2v_test_harness.ml

if FALSE
if HAVE_OCAML
if HAVE_OCAML_PKG_LIBVIRT

# -I $(top_builddir)/lib/.libs is a hack which forces corresponding -L
# option to be passed to gcc, so we don't try linking against an
# installed copy of libguestfs.
OCAMLPACKAGES = \
	-package str,unix,libvirt \
	-I $(top_builddir)/common/utils/.libs \
	-I $(top_builddir)/lib/.libs \
	-I $(top_builddir)/gnulib/lib/.libs \
	-I $(top_builddir)/ocaml \
	-I $(top_builddir)/common/mlstdutils \
	-I $(top_builddir)/common/mlxml \
	-I $(top_builddir)/common/mltools \
	-I $(top_builddir)/v2v

OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)'

BOBJECTS = \
	$(SOURCES_ML:.ml=.cmo) \
	$(libv2vth_a_OBJECTS)
XOBJECTS = $(BOBJECTS:.cmo=.cmx)

if !HAVE_OCAMLOPT
noinst_DATA = v2v_test_harness.cma META
else
noinst_DATA = v2v_test_harness.cmxa META
endif

v2v_test_harness.cma: $(BOBJECTS)
	$(OCAMLMKLIB) $^ -o v2v_test_harness $(LIBXML2_LIBS)

v2v_test_harness.cmxa: $(XOBJECTS)
	$(OCAMLMKLIB) $^ -o v2v_test_harness $(LIBXML2_LIBS)

# We have to recompile *.c files with -fPIC.  Do that by building an
# uninstalled library.
noinst_LIBRARIES = libv2vth.a

libv2vth_a_CPPFLAGS = \
	-DGUESTFS_PRIVATE=1 \
	-I$(top_builddir) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml \
	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib

libv2vth_a_CFLAGS = \
	$(WARN_CFLAGS) $(WERROR_CFLAGS) \
	$(LIBXML2_CFLAGS) \
	-fPIC

libv2vth_a_SOURCES = \
	dummy.c

v2v_test_harness.cmi: $(top_builddir)/ocaml/guestfs.cmi

# Run ocamlfind to perform the install.  ocamlfind refuses to install
# the package if it is already installed, so remove the old package
# first.
data_hook_files = META *.so *.a *.cmi $(srcdir)/*.mli
if !HAVE_OCAMLOPT
data_hook_files += *.cmo *.cma
else
data_hook_files += *.cmx *.cmxa
endif

install-data-hook:
	mkdir -p $(DESTDIR)$(OCAMLLIB)
	mkdir -p $(DESTDIR)$(OCAMLLIB)/stublibs
	rm -rf $(DESTDIR)$(OCAMLLIB)/v2v_test_harness
	rm -rf $(DESTDIR)$(OCAMLLIB)/stublibs/dllv2v_test_harness.so*
	$(OCAMLFIND) install \
	  -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
	  v2v_test_harness \
	  $(data_hook_files)
	rm $(DESTDIR)$(OCAMLLIB)/v2v_test_harness/libv2vth.a

# Manual pages and HTML files for the website.

man_MANS = virt-v2v-test-harness.1

noinst_DATA += $(top_builddir)/website/virt-v2v-test-harness.1.html

virt-v2v-test-harness.1 $(top_builddir)/website/virt-v2v-test-harness.1.html: stamp-virt-v2v-test-harness.pod

stamp-virt-v2v-test-harness.pod: virt-v2v-test-harness.pod
	$(PODWRAPPER) \
	  --man virt-v2v-test-harness.1 \
	  --html $(top_builddir)/website/virt-v2v-test-harness.1.html \
	  --license LGPLv2+ \
	  --warning safe \
	  $<
	touch $@

# Dependencies.
.depend: $(srcdir)/*.mli $(srcdir)/*.ml
	$(top_builddir)/ocaml-dep.sh -I .. $^
-include .depend

endif
endif
endif

.PHONY: docs