libevent: convert old-style hook to new-style hook
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 1 Sep 2010 15:13:56 +0000 (17:13 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Sep 2010 17:24:58 +0000 (19:24 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libevent/libevent.mk

index f71bf9a113e499676a6540ebd3c1e7c0d012a3f5..4df62708758dc8d9d2b92806b6d8c9575135a991 100644 (file)
@@ -12,12 +12,14 @@ LIBEVENT_LIBTOOL_PATCH = NO
 LIBEVENT_INSTALL_STAGING = YES
 LIBEVENT_INSTALL_TARGET = YES
 
-$(eval $(call AUTOTARGETS,package,libevent))
+define LIBEVENT_REMOVE_PYSCRIPT
+       rm $(TARGET_DIR)/usr/bin/event_rpcgen.py
+endef
 
+# libevent installs a python script to target - get rid of it if we
+# don't have python support enabled
 ifneq ($(BR2_PACKAGE_PYTHON),y)
-# libevent installs a python script to target - get rid of it if
-# we don't have python support enabled
-$(LIBEVENT_HOOK_POST_INSTALL):
-       rm $(TARGET_DIR)/usr/bin/event_rpcgen.py
-       touch $@
+LIBEVENT_POST_INSTALL_TARGET_HOOKS += LIBEVENT_REMOVE_PYSCRIPT
 endif
+
+$(eval $(call AUTOTARGETS,package,libevent))