Hi TP ,
You can make use of the $(if ...) construct of GNU make for this scenario. $(if $(call strip,$(filter $(1),$(PACKAGES_ALL))),true_portion,false_portion) The true portion you already noted as a warning funtion. And in case the false portion of the $(if ...) clause is too big and hampers maintainability of the code, you factor out into another user-defined macro, and have that macro called up in the false portion in the false portion. For more info, you can check the manual out: https://www.gnu.org/software/make/manual/html_node/Conditional-Functions.html#Conditional-Functions Thanks, Rakesh ________________________________ From: Help-make <help-make-bounces+sharma__r=hotmail....@gnu.org> on behalf of Toan Pham <tpham3...@gmail.com> Sent: Friday, January 26, 2018 9:43 AM To: help-make@gnu.org Subject: Break or exit out of user defined procedure Hi, Is it possible to exit a user defined procedure with something like this? define inner-generic-package ifneq ($(call strip,$(filter $(1),$(PACKAGES_ALL))),) $$(warning Package '$(1)' defined a second time in '$(pkgdir)'; \ previous definition was in '$$($(2)_PKGDIR)') *return* endif <do alot of things> endef thanks, TP _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make Help-make -- Users list for the GNU implementation of make<https://lists.gnu.org/mailman/listinfo/help-make> lists.gnu.org This list is for users and installers of GNU make to ask for help. Please send bug reports to bug-m...@gnu.org instead of posting them here. To see the collection of ... _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make