summaryrefslogtreecommitdiffstats
path: root/events/src
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2016-07-28 15:49:59 +0530
committerAravinda VK <avishwan@redhat.com>2016-08-01 22:49:59 -0700
commit4429e842236015b51be37f3351d8f8df640744f5 (patch)
treed26116d2331dd35823d3527a956a5be2506cc4b5 /events/src
parent07b95cf8104da42d783d053d0fbb8497399f7d00 (diff)
eventsapi: Auto generate header files during make
$SRC/libglusterfs/src/eventtypes.h and $SRC/events/src/eventtypes.py are generated by running `python $SRC/events/eventskeygen.py` Header files generation step is added to make file itself, Now All new events should be added to only to $SRC/events/eventskeygen.py file. BUG: 1361094 Change-Id: I384961ef2978ca2d0be37f288b39ac0d834bdf06 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/15035 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'events/src')
-rw-r--r--events/src/Makefile.am9
-rw-r--r--events/src/eventtypes.py11
2 files changed, 8 insertions, 12 deletions
diff --git a/events/src/Makefile.am b/events/src/Makefile.am
index 50317d45191..8b2150e3aa9 100644
--- a/events/src/Makefile.am
+++ b/events/src/Makefile.am
@@ -1,6 +1,10 @@
-EXTRA_DIST = glustereventsd.py __init__.py eventsapiconf.py.in eventtypes.py \
+noinst_PYTHON = $(top_srcdir)/events/eventskeygen.py
+EXTRA_DIST = glustereventsd.py __init__.py eventsapiconf.py.in \
handlers.py utils.py peer_eventsapi.py eventsconfig.json
+BUILT_SOURCES = eventtypes.py
+CLEANFILES = eventtypes.py
+
eventsdir = $(libexecdir)/glusterfs/events
eventspeerscriptdir = $(libexecdir)/glusterfs
eventsconfdir = $(sysconfdir)/glusterfs
@@ -10,6 +14,9 @@ events_PYTHON = __init__.py eventsapiconf.py eventtypes.py handlers.py utils.py
events_SCRIPTS = glustereventsd.py
eventspeerscript_SCRIPTS = peer_eventsapi.py
+eventtypes.py: $(top_srcdir)/events/eventskeygen.py
+ $(PYTHON) $(top_srcdir)/events/eventskeygen.py PY_HEADER
+
install-exec-hook:
$(mkdir_p) $(DESTDIR)$(sbindir)
rm -f $(DESTDIR)$(sbindir)/glustereventsd
diff --git a/events/src/eventtypes.py b/events/src/eventtypes.py
deleted file mode 100644
index b09e5bcff9a..00000000000
--- a/events/src/eventtypes.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- coding: utf-8 -*-
-all_events = [
- "EVENT_PEER_ATTACH",
- "EVENT_PEER_DETACH",
- "EVENT_VOLUME_CREATE",
- "EVENT_VOLUME_START",
- "EVENT_VOLUME_STOP",
- "EVENT_VOLUME_DELETE",
- "EVENT_VOLUME_SET",
- "EVENT_VOLUME_RESET",
-]