[OpenWrt-Devel] [PATCH 1/1] [package] GNU Make

Yousong Zhou yszhou4tech at gmail.com
Mon Dec 21 20:50:40 EST 2015


On 22 December 2015 at 06:08, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> OpenWRT provides gcc but lacks make. So building foreign software is
> difficult.
>

GCC is provided as part of the OpenWrt packages feeds
(https://github.com/openwrt/packages), so maybe this should also go
there.

> This patch provides GNU Make 4.1.
>
> Built on Debian Jessie amd64.
> Tested on TP-Link MR3020 (ar71xx/generic).
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  package/devel/make/Makefile | 52 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
>  create mode 100644 package/devel/make/Makefile
>
> diff --git a/package/devel/make/Makefile b/package/devel/make/Makefile
> new file mode 100644
> index 0000000..7c938bd
> --- /dev/null
> +++ b/package/devel/make/Makefile
> @@ -0,0 +1,52 @@
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +include $(TOPDIR)/rules.mk
> +
> +PKG_NAME:=make
> +PKG_VERSION:=4.1
> +PKG_RELEASE:=1
> +
> +PKG_SOURCE_URL:=@GNU/make
> +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
> +PKG_VERSION:=$(PKG_VERSION)

This line should not be necessary.

> +PKG_MD5SUM:=654f9117957e6fa6a1c49a8f08270ec9
> +PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk at gmx.de>
> +PKG_LICENSE:=GPL-3.0+
> +
> +PKG_INSTALL:=1
> +
> +include $(INCLUDE_DIR)/package.mk
> +
> +define Package/make
> +  SECTION:=devel
> +  CATEGORY:=Development
> +  TITLE:=make
> +  DEPENDS:=
> +  URL:=https://www.gnu.org/software/make/
> +endef
> +
> +define Package/make/description
> +  The Make package contains a tool to create executables from source files.
> +endef
> +
> +TARGET_CFLAGS += $(FPIC) -Wno-unused-value
> +
> +CONFIGURE_ARGS += \
> +       --host=$(REAL_GNU_TARGET_NAME) \
> +       --target=$(REAL_GNU_TARGET_NAME) \
> +       --prefix=/usr

Could this package be built and run without these statements?

> +
> +define Package/make/install
> +       $(INSTALL_DIR) $(1)/usr/bin
> +       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/make $(1)/usr/bin/
> +       $(INSTALL_DIR) $(1)/usr/include
> +       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
> +endef
> +
> +$(eval $(call BuildPackage,make))
> --
> 2.1.4
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list