From 0a164527045a2a1bda576ab9cb72122b5cbf2f67 Mon Sep 17 00:00:00 2001 From: Brandon Maier Date: Thu, 28 Sep 2023 00:27:28 +0000 Subject: [PATCH] unifdef: add target package Signed-off-by: Brandon Maier Reviewed-by: Thomas Devoogdt Signed-off-by: Yann E. MORIN --- DEVELOPERS | 1 + package/Config.in | 1 + package/unifdef/Config.in | 9 +++++++++ package/unifdef/unifdef.mk | 9 +++++++++ 4 files changed, 20 insertions(+) create mode 100644 package/unifdef/Config.in diff --git a/DEVELOPERS b/DEVELOPERS index e8b78a8d46..defeb502ab 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -513,6 +513,7 @@ F: package/iftop/ F: package/ncdu/ N: Brandon Maier +F: package/unifdef/ F: package/vmtouch/ N: Brock Williams diff --git a/package/Config.in b/package/Config.in index e8dbadadf3..e70479059e 100644 --- a/package/Config.in +++ b/package/Config.in @@ -201,6 +201,7 @@ menu "Development tools" source "package/sed/Config.in" source "package/subversion/Config.in" source "package/tree/Config.in" + source "package/unifdef/Config.in" source "package/yasm/Config.in" endmenu diff --git a/package/unifdef/Config.in b/package/unifdef/Config.in new file mode 100644 index 0000000000..a1a44d9f5a --- /dev/null +++ b/package/unifdef/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_UNIFDEF + bool "unifdef" + help + The unifdef utility selectively processes conditional C + preprocessor #if and #ifdef directives. It removes from a file + both the #directives and the additional text that they + delimit, while otherwise leaving the file alone. + + http://dotat.at/prog/unifdef/ diff --git a/package/unifdef/unifdef.mk b/package/unifdef/unifdef.mk index fd74455894..6761e32b69 100644 --- a/package/unifdef/unifdef.mk +++ b/package/unifdef/unifdef.mk @@ -9,6 +9,14 @@ UNIFDEF_SITE = https://dotat.at/prog/unifdef UNIFDEF_LICENSE = BSD-2-Clause, BSD-3-Clause UNIFDEF_LICENSE_FILES = COPYING +define UNIFDEF_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define UNIFDEF_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) prefix=$(TARGET_DIR) install +endef + define HOST_UNIFDEF_BUILD_CMDS $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) endef @@ -17,4 +25,5 @@ define HOST_UNIFDEF_INSTALL_CMDS $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) prefix=$(HOST_DIR) install endef +$(eval $(generic-package)) $(eval $(host-generic-package))