X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=python%2FMakefile-files;h=1721af11010434a2fde462a0e27ab6bce106dbce;hb=b1264daf5e3cd561bcceca11518a3ad1f978d56f;hp=e50416672a85a82131ea1a9974dc7fcaff42e422;hpb=0754ac0a3b5ac2cc77cbb0cb85c6f8888459d1f6;p=util-vserver.git diff --git a/python/Makefile-files b/python/Makefile-files index e504166..1721af1 100644 --- a/python/Makefile-files +++ b/python/Makefile-files @@ -24,11 +24,14 @@ python__libvserver_la_CFLAGS = $(AM_CFLAGS) $(PYTHON_CFLAGS) \ python__libvserver_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) python__libvserver_la_LIBADD = $(LIBVSERVER_GLIBC) +EXTRA_DIST += python/ctags-constants.awk + # FIXME: Dude, this is ugly. python/_libvserver.c: $(top_builddir)/python/_libvserver-constants.c -$(top_builddir)/python/_libvserver-constants.c: lib/vserver.h - ctags -x $(top_srcdir)/lib/vserver.h | \ - awk '$$2 == "macro" || $$2 == "enumerator" { print $$1 }' | \ - egrep '^(vc|VC|CLONE)' | grep -v VC_ATTR_ | \ - awk '{ printf " PyModule_AddIntConstant(mod, \"%s\", %s);\n", $$1, $$1 }' \ +$(top_builddir)/python/_libvserver-constants.c: lib/vserver.h \ + $(top_srcdir)/python/ctags-constants.awk + $(CTAGS) -x $(top_srcdir)/lib/vserver.h | \ + $(AWK) -f $(top_srcdir)/python/ctags-constants.awk \ > $(top_builddir)/python/_libvserver-constants.c + +CLEANFILES += python/_libvserver-constants.c