X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=python%2Fautomake.mk;h=96720421075c44763dd9378f659f3210e6829416;hb=ed93d0fda84b375802c1c7fd70a25f2cc82712ad;hp=d63eb4d59f5a7cc52d7d2829eada84be93b9de20;hpb=79982e900ba733bc870e1516e46fdcda67cf9cc1;p=openvswitch diff --git a/python/automake.mk b/python/automake.mk index d63eb4d5..96720421 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -28,8 +28,11 @@ ovs_pyfiles = \ python/ovs/socket_util.py \ python/ovs/stream.py \ python/ovs/timeval.py \ - python/ovs/vlog.py \ - python/ovs/util.py + python/ovs/unixctl.py \ + python/ovs/util.py \ + python/ovs/version.py \ + python/ovs/vlog.py + PYFILES = $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles) EXTRA_DIST += $(PYFILES) PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover) @@ -56,3 +59,13 @@ install-data-local: ovs-install-data-local UNINSTALL_LOCAL += ovs-uninstall-local ovs-uninstall-local: rm -f $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py + +ALL_LOCAL += $(srcdir)/python/ovs/version.py +$(srcdir)/python/ovs/version.py: config.status + $(ro_shell) > $@.tmp + echo 'VERSION = "$(VERSION)"' >> $@.tmp + if [ "$(BUILDNR)" != "0" ]; \ + then echo 'BUILDNR = "+build$(BUILDNR)"' >> $@.tmp; \ + else echo 'BUILDNR = ""' >> $@.tmp; \ + fi; + mv $@.tmp $@