diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2009-09-16 14:03:53 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2009-09-21 14:41:46 +0100 |
commit | a9ea906035bcf5cbe95db64f51ed2ff7cec2b503 (patch) | |
tree | 0f55b2a22a6e4b44ec5c41b267839f82757090af /Makefile.am | |
parent | a5bab7085e42d87561c817f91c26def384611f2e (diff) | |
download | libvirt-python-a9ea906035bcf5cbe95db64f51ed2ff7cec2b503.tar.gz |
Re-arrange python generator to make it clear what's auto-generated
* README: New file describing what each file is used for
* livvirt-override.c, libvirt-override.py, libvirt-override-api.xml,
libvirt-override-virConnect.py: Manually written code overriding
the generator
* typewrappers.c, typewrappers.h: Data type wrappers
* generator.py: Automatically pre-prend contents of libvirt-override.py
to generated libvirt.py. Output into libvirt.py directly instead of
libvirtclass.py. Don't generate libvirtclass.txt at all. Write C
files into libvirt.c/.h directly
* Makefile.am: Remove rule for creating libvirt.py from libvirt-override.py
and libvirtclass.py, since generator.py does it directly
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am index a7c342e..95ae84d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,16 +13,15 @@ DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION) DOCS = ${srcdir}/TODO -CLASSES_EXTRA = virConnect.py - -EXTRA_DIST = \ - libvir.c \ - types.c \ - generator.py \ - libvirt_wrap.h \ - libvirt.py \ - libvir.py \ - libvirt-python-api.xml \ +CLASSES_EXTRA = libvirt-override-virConnect.py + +EXTRA_DIST = \ + generator.py \ + typewrappers.c \ + typewrappers.h \ + libvirt-override.c \ + libvirt-override.py \ + libvirt-override-api.xml \ $(CLASSES_EXTRA) \ $(DOCS) @@ -33,7 +32,7 @@ all-local: libvirt.py python_LTLIBRARIES = libvirtmod.la -libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h +libvirtmod_la_SOURCES = libvirt-override.c typewrappers.c libvirt.c libvirt.h # Python <= 2.4 header files contain a redundant decl, hence we # need extra flags here libvirtmod_la_CFLAGS = @WARN_PYTHON_CFLAGS@ @@ -44,12 +43,11 @@ libvirtmod_la_LIBADD = $(mylibs) \ @CYGWIN_EXTRA_LIBADD@ @CYGWIN_EXTRA_PYTHON_LIBADD@ GENERATE = generator.py -API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml +API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml GENERATED= libvirt-export.c \ - libvirtclass.txt \ - libvirt-py.c \ - libvirt-py.h \ - libvirtclass.py + libvirt.c \ + libvirt.h \ + libvirt.py generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC) $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir) @@ -57,10 +55,6 @@ generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC) $(GENERATED): generated.stamp -libvirt.py: $(srcdir)/libvir.py $(GENERATED) $(CLASSES_EXTRA) - cat $(srcdir)/libvir.py libvirtclass.py > $@-t - mv $@-t $@ - $(libvirtmod_la_OBJECTS): $(GENERATED) install-data-local: @@ -73,7 +67,7 @@ install-data-local: uninstall-local: rm -f $(DESTDIR)$(pythondir)/libvirt.py -CLEANFILES= $(GENERATED) generated.stamp libvirt.py +CLEANFILES= $(GENERATED) generated.stamp else all: |