WEBKIT_INSTALL_STAGING = YES
WEBKIT_INSTALL_TARGET = YES
-WEBKIT_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install
WEBKIT_LIBTOOL_PATCH = NO
WEBKIT_DEPENDENCIES = icu curl libxml2 libxslt libgtk2 sqlite enchant \
WEBKIT_CONF_OPT += --disable-video
-$(eval $(call AUTOTARGETS,package,webkit))
+define WEBKIT_AUTOGEN_PATCH
+$(SED) 's/AUTOMAKE_FLAGS=.*/AUTOMAKE_FLAGS="--foreign --add-missing --copy"/' $(WEBKIT_DIR)/autogen.sh
+$(SED) 's/LIBTOOLIZE_FLAGS=.*/LIBTOOLIZE_FLAGS="--force --automake --copy"/' $(WEBKIT_DIR)/autogen.sh
+# Don't run the configure step yet
+cd $(WEBKIT_DIR); AUTOGEN_CONFIGURE_ARGS=--version ./autogen.sh
+endef
+
+WEBKIT_POST_EXTRACT_HOOKS += WEBKIT_AUTOGEN_PATCH
-$(WEBKIT_HOOK_POST_EXTRACT):
- $(SED) 's/AUTOMAKE_FLAGS=.*/AUTOMAKE_FLAGS="--foreign --add-missing --copy"/' $(WEBKIT_DIR)/autogen.sh
- $(SED) 's/LIBTOOLIZE_FLAGS=.*/LIBTOOLIZE_FLAGS="--force --automake --copy"/' $(WEBKIT_DIR)/autogen.sh
- # Don't run the configure step yet
- cd $(WEBKIT_DIR); AUTOGEN_CONFIGURE_ARGS=--version ./autogen.sh
- touch $@
+$(eval $(call AUTOTARGETS,package,webkit))