Kaynağa Gözat

unifdef: add target package

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Reviewed-by: Thomas Devoogdt <thomas@devoogdt.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Brandon Maier 1 yıl önce
ebeveyn
işleme
0a16452704
4 değiştirilmiş dosya ile 20 ekleme ve 0 silme
  1. 1 0
      DEVELOPERS
  2. 1 0
      package/Config.in
  3. 9 0
      package/unifdef/Config.in
  4. 9 0
      package/unifdef/unifdef.mk

+ 1 - 0
DEVELOPERS

@@ -513,6 +513,7 @@ F:	package/iftop/
 F:	package/ncdu/
 
 N:	Brandon Maier <brandon.maier@collins.com>
+F:	package/unifdef/
 F:	package/vmtouch/
 
 N:	Brock Williams <brock@cottonwoodcomputer.com>

+ 1 - 0
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
 

+ 9 - 0
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/

+ 9 - 0
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))