mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
Make "make distcheck" work.
* Makefile.am: Expand some "*" wildcards, and (for now) disable the relatively unimportant, distuninstallcheck target. Fix a few redirect-directly-to-target bugs. Add a few $(srcdir)/ prefixes and add an uninstall-local rule. * docs/Makefile.am: More of the same. Split some long lines. * python/Makefile.am: Likewise. * python/tests/Makefile.am: Likewise. * qemud/Makefile.am: Likewise. * tests/Makefile.am: Remove the directories already listed in SUBDIRS. * docs/examples/index.py: Adapt to produce the desired changes in docs/examples/Makefile.am. Also, sort *.c, so results are reproducible, and emit a comment telling emacs and vi that the file is read-only. * docs/examples/Makefile.am: Regenerate. Author: Jim Meyering <meyering@redhat.com>
This commit is contained in:
parent
a4499a22c5
commit
d5117af382
19
ChangeLog
19
ChangeLog
@ -1,3 +1,20 @@
|
||||
Thu Nov 15 14:00:04 CET 2007 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
Make "make distcheck" work.
|
||||
* Makefile.am: Expand some "*" wildcards, and (for now) disable
|
||||
the relatively unimportant, distuninstallcheck target.
|
||||
Fix a few redirect-directly-to-target bugs.
|
||||
Add a few $(srcdir)/ prefixes and add an uninstall-local rule.
|
||||
* docs/Makefile.am: More of the same. Split some long lines.
|
||||
* python/Makefile.am: Likewise.
|
||||
* python/tests/Makefile.am: Likewise.
|
||||
* qemud/Makefile.am: Likewise.
|
||||
* tests/Makefile.am: Remove the directories already listed in SUBDIRS.
|
||||
* docs/examples/index.py: Adapt to produce the desired changes in
|
||||
docs/examples/Makefile.am. Also, sort *.c, so results are reproducible,
|
||||
and emit a comment telling emacs and vi that the file is read-only.
|
||||
* docs/examples/Makefile.am: Regenerate.
|
||||
|
||||
Thu Nov 15 11:54:40 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/stats_linux.c: patch from Jim Paris to fix compilation
|
||||
@ -7,7 +24,7 @@ Thu Nov 15 11:54:40 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
Wed Nov 14 18:09:31 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* doc/libvir.html doc/format.html: add missing docs for
|
||||
* doc/libvir.html doc/format.html: add missing docs for
|
||||
<shareable/> on disk devices
|
||||
* src/Makefile.am: fix the tst build rule for missing libraries
|
||||
|
||||
|
@ -41,3 +41,6 @@ cov-am:
|
||||
> $(top_builddir)/coverage/index.html
|
||||
for i in $(top_builddir)/src/*.gcov ; do o=`echo $$i | sed -e 's,$(top_builddir)/src,coverage,'` ; \
|
||||
perl $(srcdir)/scripts/coverage-report-entry.pl $$i > $$o.html ; done
|
||||
|
||||
# disable this check
|
||||
distuninstallcheck:
|
||||
|
@ -7,18 +7,82 @@ DOC_SOURCE_DIR=../src
|
||||
PAGES= index.html bugs.html FAQ.html remote.html
|
||||
APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
|
||||
APIsymbols.html APIchunk0.html
|
||||
EXTRA_DIST= \
|
||||
libvirt-api.xml libvirt-refs.xml apibuild.py \
|
||||
*.xsl *.html *.gif html/*.html html/*.png \
|
||||
*.xml *.rng
|
||||
|
||||
|
||||
man_MANS=
|
||||
|
||||
html = \
|
||||
book1.html \
|
||||
index.html \
|
||||
libvirt-conf.html \
|
||||
libvirt-lib.html \
|
||||
libvirt-libvirt.html \
|
||||
libvirt-virterror.html
|
||||
|
||||
png = \
|
||||
left.png \
|
||||
up.png \
|
||||
home.png \
|
||||
right.png
|
||||
|
||||
gif = \
|
||||
Libxml2-Logo-90x34.gif \
|
||||
architecture.gif \
|
||||
node.gif \
|
||||
redhat.gif
|
||||
|
||||
dot_html = \
|
||||
APIchunk0.html \
|
||||
APIchunk1.html \
|
||||
APIchunk2.html \
|
||||
APIchunk3.html \
|
||||
APIchunk4.html \
|
||||
APIchunk5.html \
|
||||
APIchunk6.html \
|
||||
APIchunk7.html \
|
||||
APIconstructors.html \
|
||||
APIfiles.html \
|
||||
APIfunctions.html \
|
||||
APIsymbols.html \
|
||||
FAQ.html \
|
||||
architecture.html \
|
||||
bugs.html \
|
||||
downloads.html \
|
||||
errors.html \
|
||||
format.html \
|
||||
hvsupport.html \
|
||||
index.html \
|
||||
intro.html \
|
||||
libvir.html \
|
||||
news.html \
|
||||
python.html \
|
||||
remote.html \
|
||||
uri.html
|
||||
|
||||
xml = \
|
||||
libvirt-api.xml \
|
||||
libvirt-refs.xml \
|
||||
testdomfc4.xml \
|
||||
testdomfv0.xml \
|
||||
testnetdef.xml \
|
||||
testnetpriv.xml \
|
||||
testnode.xml
|
||||
|
||||
rng = \
|
||||
libvirt.rng \
|
||||
network.rng
|
||||
|
||||
EXTRA_DIST= \
|
||||
libvirt-api.xml libvirt-refs.xml apibuild.py \
|
||||
site.xsl newapi.xsl api.xsl \
|
||||
$(dot_html) $(gif) html \
|
||||
$(xml) $(rng)
|
||||
|
||||
all: web $(top_builddir)/NEWS $(man_MANS)
|
||||
|
||||
virsh.1: virsh.pod
|
||||
pod2man -c "Virtualization Support" virsh.pod > virsh.1 && cp virsh.1 $(top_builddir)
|
||||
pod2man -c "Virtualization Support" $(srcdir)/virsh.pod > $@-t
|
||||
mv $@-t $@
|
||||
cp $@ $(top_builddir)
|
||||
|
||||
api: libvirt-api.xml libvirt-refs.xml $(APIPAGES) $(srcdir)/html/index.html
|
||||
|
||||
@ -50,7 +114,9 @@ $(srcdir)/html/index.html: libvirt-api.xml $(srcdir)/newapi.xsl
|
||||
echo "Validating the resulting XHTML pages" ; \
|
||||
$(XMLLINT) --nonet --valid --noout html/*.html ; fi );
|
||||
|
||||
libvirt-api.xml libvirt-refs.xml: apibuild.py ../include/libvirt/*.h ../src/*.h ../src/*.c
|
||||
libvirt-api.xml libvirt-refs.xml: apibuild.py \
|
||||
$(srcdir)/../include/libvirt/*.h \
|
||||
$(srcdir)/../src/*.h $(srcdir)/../src/*.c
|
||||
-(./apibuild.py)
|
||||
|
||||
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html
|
||||
@ -67,8 +133,15 @@ rebuild: api all
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html $(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html \
|
||||
$(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif \
|
||||
$(DESTDIR)$(HTML_DIR)
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
|
||||
-@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
|
||||
-@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
|
||||
for h in $(html); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/html/$$h $(DESTDIR)$(HTML_DIR)/html; done
|
||||
for p in $(png); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/html/$$p $(DESTDIR)$(HTML_DIR)/html; done
|
||||
|
||||
uninstall-local:
|
||||
for h in $(html); do rm $(DESTDIR)$(HTML_DIR)/html/$$h; done
|
||||
for p in $(png); do rm $(DESTDIR)$(HTML_DIR)/html/$$p; done
|
||||
|
@ -1,41 +1,45 @@
|
||||
# -*- buffer-read-only: t -*- vi: set ro:
|
||||
# Beware this is autogenerated by index.py
|
||||
SUBDIRS=python
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
|
||||
DEPS = $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la
|
||||
|
||||
rebuild: examples.xml index.html
|
||||
|
||||
examples.xml: index.py *.c
|
||||
examples.xml: index.py info1.c suspend.c
|
||||
-@($(srcdir)/index.py)
|
||||
|
||||
index.html: examples.xml examples.xsl $(top_srcdir)/docs/site.xsl
|
||||
-@(if [ -x $(XSLTPROC) ] ; then $(XSLTPROC) examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html ; fi)
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
$(XSLTPROC) examples.xsl examples.xml \
|
||||
&& echo "Rebuilt web page" \
|
||||
&& xmllint --valid --noout index.html; \
|
||||
fi)
|
||||
|
||||
install-data-local:
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml \
|
||||
$(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
|
||||
|
||||
EXTRA_DIST=examples.xsl index.py examples.xml
|
||||
|
||||
noinst_PROGRAMS=suspend info1
|
||||
|
||||
suspend_SOURCES=suspend.c
|
||||
suspend_LDFLAGS=
|
||||
suspend_DEPENDENCIES= $(DEPS)
|
||||
suspend_LDADD= $(LDADDS)
|
||||
noinst_PROGRAMS=info1 suspend
|
||||
|
||||
info1_SOURCES=info1.c
|
||||
info1_LDFLAGS=
|
||||
info1_DEPENDENCIES= $(DEPS)
|
||||
info1_LDADD= $(LDADDS)
|
||||
|
||||
suspend_SOURCES=suspend.c
|
||||
suspend_LDFLAGS=
|
||||
suspend_DEPENDENCIES= $(DEPS)
|
||||
suspend_LDADD= $(LDADDS)
|
||||
|
||||
valgrind:
|
||||
$(MAKE) CHECKER='valgrind' tests
|
||||
|
||||
tests: $(noinst_PROGRAMS)
|
||||
@(echo '## examples regression tests')
|
||||
@($(CHECKER) ./suspend)
|
||||
@($(CHECKER) ./info1)
|
||||
|
||||
|
||||
@($(CHECKER) ./suspend)
|
||||
|
@ -177,10 +177,10 @@ def parse(filename, output):
|
||||
type = id.get_type()
|
||||
output.write(" <%s line='%d' name='%s'/>\n" % (type,
|
||||
line, name))
|
||||
|
||||
|
||||
output.write(" </uses>\n")
|
||||
output.write(" </example>\n")
|
||||
|
||||
|
||||
return idx
|
||||
|
||||
def dump_symbols(output):
|
||||
@ -220,24 +220,29 @@ def dump_Makefile():
|
||||
extras.append(file)
|
||||
for file in glob.glob('*.res'):
|
||||
extras.append(file)
|
||||
Makefile="""# Beware this is autogenerated by index.py
|
||||
Makefile="""# -*- buffer-read-only: t -*- vi: set ro:
|
||||
# Beware this is autogenerated by index.py
|
||||
SUBDIRS=python
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
|
||||
DEPS = $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la
|
||||
|
||||
rebuild: examples.xml index.html
|
||||
|
||||
examples.xml: index.py *.c
|
||||
examples.xml: index.py __C_SOURCES__
|
||||
-@($(srcdir)/index.py)
|
||||
|
||||
index.html: examples.xml examples.xsl $(top_srcdir)/docs/site.xsl
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
$(XSLTPROC) examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html ; fi)
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \\
|
||||
$(XSLTPROC) examples.xsl examples.xml \\
|
||||
&& echo "Rebuilt web page" \\
|
||||
&& xmllint --valid --noout index.html; \\
|
||||
fi)
|
||||
|
||||
install-data-local:
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml \\
|
||||
$(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
|
||||
|
||||
"""
|
||||
EXTRA_DIST=""
|
||||
@ -258,7 +263,9 @@ install-data-local:
|
||||
for test in tests:
|
||||
Makefile = Makefile + "\t@($(CHECKER) %s)\n" % (test)
|
||||
# Makefile = Makefile + '\t@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)\n'
|
||||
Makefile = Makefile + "\n\n"
|
||||
|
||||
c_src = [("%s.c" % x) for x in examples]
|
||||
Makefile = Makefile.replace("__C_SOURCES__", string.join(c_src, ' '))
|
||||
try:
|
||||
old = open("Makefile.am", "r").read()
|
||||
if old != Makefile:
|
||||
@ -284,13 +291,15 @@ Makefile
|
||||
print "Updated .cvsignore"
|
||||
except:
|
||||
print "Failed to read or save .cvsignore"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
load_api()
|
||||
output = open("examples.xml", "w")
|
||||
output.write("<examples>\n")
|
||||
|
||||
for file in glob.glob('*.c'):
|
||||
c_src = glob.glob('*.c')
|
||||
c_src.sort()
|
||||
for file in c_src:
|
||||
parse(file, output)
|
||||
examples.append(file[:-2])
|
||||
|
||||
@ -299,4 +308,3 @@ if __name__ == "__main__":
|
||||
output.write("</examples>\n")
|
||||
output.close()
|
||||
dump_Makefile()
|
||||
|
||||
|
@ -49,7 +49,8 @@ $(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
||||
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
|
||||
|
||||
libvirt.py: $(srcdir)/libvir.py libvirtclass.py
|
||||
cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py
|
||||
cat $(srcdir)/libvir.py libvirtclass.py > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
$(libvirtmod_la_OBJECTS): $(GENERATED)
|
||||
|
||||
@ -60,6 +61,9 @@ install-data-local:
|
||||
@(for doc in $(DOCS) ; \
|
||||
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(pythondir)/libvirt.py
|
||||
|
||||
CLEANFILES= $(GENERATED) libvirt.py
|
||||
|
||||
else
|
||||
|
@ -32,3 +32,5 @@ install-data-local:
|
||||
-(for test in $(PYTESTS); \
|
||||
do @INSTALL@ -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
|
||||
|
||||
uninstall-local:
|
||||
for test in $(PYTESTS); do rm -f $(DESTDIR)$(EXAMPLE_DIR)/$$test; done
|
||||
|
@ -47,19 +47,23 @@ libvirtd_CFLAGS += $(AVAHI_CFLAGS)
|
||||
libvirtd_LDADD += $(AVAHI_LIBS)
|
||||
endif
|
||||
|
||||
default_xml_dest = libvirt/qemu/networks/default.xml
|
||||
install-data-local: install-init
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart
|
||||
$(INSTALL_DATA) $(srcdir)/default-network.xml $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
|
||||
sed -i -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
|
||||
$(INSTALL_DATA) $(srcdir)/default-network.xml \
|
||||
$(DESTDIR)$(sysconfdir)/$(default_xml_dest)
|
||||
sed -i -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," \
|
||||
$(DESTDIR)$(sysconfdir)/$(default_xml_dest)
|
||||
test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
|
||||
ln -s ../default.xml $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
|
||||
ln -s ../default.xml \
|
||||
$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt
|
||||
|
||||
uninstall-local: uninstall-init
|
||||
rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
|
||||
rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
|
||||
rm -f $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
|
||||
rmdir $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart || :
|
||||
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
|
||||
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
|
||||
@ -95,20 +99,24 @@ remote_dispatch_proc_switch.h: remote_generate_stubs.pl remote_protocol.x
|
||||
if LIBVIRT_INIT_SCRIPTS_RED_HAT
|
||||
install-init: libvirtd.init
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||
$(INSTALL_SCRIPT) libvirtd.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
||||
$(INSTALL_SCRIPT) libvirtd.init \
|
||||
$(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
|
||||
$(INSTALL_SCRIPT) $(srcdir)/libvirtd.sysconf $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||
$(INSTALL_SCRIPT) $(srcdir)/libvirtd.sysconf \
|
||||
$(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||
|
||||
uninstall-init:
|
||||
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
||||
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd \
|
||||
$(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||
|
||||
libvirtd.init: libvirtd.init.in
|
||||
sed \
|
||||
-e s!\@localstatedir\@!@localstatedir@!g \
|
||||
-e s!\@sbindir\@!@sbindir@!g \
|
||||
-e s!\@sysconfdir\@!@sysconfdir@!g \
|
||||
< $< > $@
|
||||
chmod a+x libvirtd.init
|
||||
< $< > $@-t
|
||||
chmod a+x $@-t
|
||||
mv $@-t $@
|
||||
|
||||
CLEANFILES = libvirtd.init
|
||||
else
|
||||
|
@ -34,14 +34,8 @@ LDADDS = \
|
||||
EXTRA_DIST = \
|
||||
xmlrpcserver.py \
|
||||
test_conf.sh \
|
||||
confdata \
|
||||
qemuxml2argvdata \
|
||||
xml2sexprdata \
|
||||
nodeinfodata \
|
||||
virshdata \
|
||||
xencapsdata \
|
||||
sexpr2xmldata \
|
||||
xmconfigdata
|
||||
nodeinfodata
|
||||
|
||||
noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
|
||||
reconnect xmconfigtest xencapstest qemuxml2argvtest qemuxml2xmltest \
|
||||
|
Loading…
Reference in New Issue
Block a user