mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user