makefile - 如何使创建的包在 make menuconfig 上可用?

标签 makefile openwrt

我正在尝试为 OpenWrt 创建一个 libxerces 包。按照本网站 http://wiki.openwrt.org/doc/devel/packages 的说明进行操作,我在包目录中创建了一个名为 libxerces-c 的文件夹和一个简单的 Makefile,以使包在 make menuconfig 上列出,但它没有发生。

Makefile 定义如下:

#
# Copyright (C) 2006-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

# Name and release number of this package
PKG_NAME:=xerces-c
PKG_VERSION:=3.1.1
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://apache.mirror.pop-sc.rnp.br/apache//xerces/c/3/sources/
PKG_CAT:=zcat

include $(INCLUDE_DIR)/package.mk

# Specify package information for this program. 
# The variables defined here should be self explanatory.
define Package/libxerces
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=Validating XML parser written in a portable subset of C++.
  URL:=http://xerces.apache.org/
endef

define Package/libxerces/description
  Xerces-C++ is a validating XML parser written in a portable subset of
  C++.  Xerces-C++ makes it easy to give your application the ability
  to read and write XML data. A shared library is provided for parsing,
  generating, manipulating, and validating XML documents. Xerces-C++ is
  faithful to the XML 1.0 recommendation and associated standards (DOM
  1.0, DOM 2.0, SAX 1.0, SAX 2.0, Namespaces, XML Schema Part 1 and
  Part 2).  It also provides experimental implementations of XML 1.1
  and DOM Level 3.0.  The parser provides high performance, modularity,
  and scalability.
endef     

CONFIGURE_ARGS+= --host=mips-openwrt-linux

define Build/Configure
  $(call Build/Configure/Default)    
endef

define Build/Compile
  $(call Build/Compile/Default)
endef

define Package/libxerces/install
endef

$(eval $(call BuildPackage,libxerces))

我已经尝试执行安装脚本

./scripts/feeds install libxerces-c

但是什么也没发生。执行 make menuconfig 后仍然看不到包。

最佳答案

你需要

  1. feed与包一起添加到您的feeds.conf.default或创建feeds.conf

  2. 然后./scripts/feeds update -a(更新所有提要...您可以只设置提要的名称,而不是使用-a)

  3. 然后./scripts/feeds install foobar

[...]

...您显然在 libxerces-c 上调用了 install,而您的软件包名为 libxerces

关于makefile - 如何使创建的包在 make menuconfig 上可用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14736664/

相关文章:

makefile - GNU Make for 带有两个变量的循环

shell - 为什么要使用 make 而不是 shell 脚本?

合并两个共享 (.so) 库

regex - 如何用一个有效的命令在OpenWrt上安装所有iptables相关的软件包?

linux - mount_root 不工作/发现 linux openwrt

c++ - 使 LLVM 无法包含 $(LLVM_SRC_ROOT)/Makefile.rules

bash - `make` 是否在没有重定向的情况下回显到标准错误?

java - 交叉编译java应用程序

linux - mipsel-linux-uclibc/bin/ld : cannot find -lcurl

linux - ps | 之间的区别grep safe 和 ps | grep 安全\$