diff options
author | Aravinda VK <avishwan@redhat.com> | 2016-07-28 15:49:59 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-08-01 22:49:59 -0700 |
commit | 4429e842236015b51be37f3351d8f8df640744f5 (patch) | |
tree | d26116d2331dd35823d3527a956a5be2506cc4b5 /libglusterfs/src | |
parent | 07b95cf8104da42d783d053d0fbb8497399f7d00 (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 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/Makefile.am | 10 | ||||
-rw-r--r-- | libglusterfs/src/eventtypes.h | 24 |
2 files changed, 9 insertions, 25 deletions
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am index 1d1c9d1a3ce..1fdd5a70fa4 100644 --- a/libglusterfs/src/Makefile.am +++ b/libglusterfs/src/Makefile.am @@ -1,4 +1,4 @@ -noinst_PYTHON = generator.py gen-defaults.py +noinst_PYTHON = generator.py gen-defaults.py $(top_srcdir)/events/eventskeygen.py libglusterfs_la_CFLAGS = $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \ -DDATADIR=\"$(localstatedir)\" @@ -72,9 +72,13 @@ libglusterfs_la_SOURCES += $(CONTRIBDIR)/uuid/clear.c \ endif if BUILD_EVENTS +BUILT_SOURCES += eventtypes.h libglusterfs_la_SOURCES += events.c libglusterfs_la_HEADERS += events.h eventtypes.h + +eventtypes.h: $(top_srcdir)/events/eventskeygen.py + $(PYTHON) $(top_srcdir)/events/eventskeygen.py C_HEADER endif libgfchangelog_HEADERS = changelog.h @@ -104,3 +108,7 @@ CLEANFILES += *.gcda *.gcno *_xunit.xml noinst_PROGRAMS = TESTS = endif + +if BUILD_EVENTS +CLEANFILES += eventtypes.h +endif diff --git a/libglusterfs/src/eventtypes.h b/libglusterfs/src/eventtypes.h deleted file mode 100644 index 20c4b02ebab..00000000000 --- a/libglusterfs/src/eventtypes.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __EVENTTYPES_H__ -#define __EVENTTYPES_H__ - -typedef enum { - EVENT_SEND_OK, - EVENT_ERROR_INVALID_INPUTS, - EVENT_ERROR_SOCKET, - EVENT_ERROR_CONNECT, - EVENT_ERROR_SEND, -} event_errors_t; - -typedef enum { - EVENT_PEER_ATTACH, - EVENT_PEER_DETACH, - EVENT_VOLUME_CREATE, - EVENT_VOLUME_START, - EVENT_VOLUME_STOP, - EVENT_VOLUME_DELETE, - EVENT_VOLUME_SET, - EVENT_VOLUME_RESET, - EVENT_LAST -} eventtypes_t; - -#endif /* __EVENTTYPES_H__ */ |