It works.Thanks jow for the details.
At 2016-01-05 18:45:47, "Jo-Philipp Wich" wrote:
>Each line in Make is started in a new shell. Your added lines are
>executed as (simplified):
>
>bash -c 'if [ -f "./files/luci/i18n/$(2).zh-cn.lmo" ]; then'
>bash -c '$(INSTALL_DIR)
Hi.I not quite understand.I've change the install part as below:
define Package/openwrt-dist-luci/install
#!/bin/sh
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DATA) ./files/luci/controller/$(2).lua
$(1)/usr/lib/lua/luci/controller/$(2).lua
$(INSTALL_DIR)
Each line in Make is started in a new shell. Your added lines are
executed as (simplified):
bash -c 'if [ -f "./files/luci/i18n/$(2).zh-cn.lmo" ]; then'
bash -c '$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n'
bash -c '$(INSTALL_DATA) ./files/luci/i18n/$(2).zh-cn.lmo
$(1)/usr/lib/lua/luci/i18n'
bash
#
# Copyright (C) 2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=openwrt-dist-luci
PKG_VERSION:=1.3.8
PKG_RELEASE:=1
PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=LICENSE
Hi.
Lines in the isntall section must be indented with at least one tab
since they're shell instructions.
~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Thanks.I have indented like this:define
Package/openwrt-dist-luci/install#!/bin/sh $(INSTALL_DIR)
$(1)/usr/lib/lua/luci/controller$(INSTALL_DATA)
./files/luci/controller/$(2).lua $(1)/usr/lib/lua/luci/controller/$(2).lua
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi
Andy,
Make runs one line per time. Make the "if" inline or backslash each newline
(adding semicolon when needed)
Regards
Em seg, 4 de jan de 2016 11:56, Andy Wong escreveu:
>
> For no misunderstanding.Here is the error now
> http://pastebin.com/t4Rb08kA
>
>
>
>
>
>
> 在
For no misunderstanding.Here is the error now
http://pastebin.com/t4Rb08kA
在 2016-01-04 21:18:14,"Andy Wong" 写道:
>Thanks.I have indented like this:define
>Package/openwrt-dist-luci/install#!/bin/sh $(INSTALL_DIR)
>$(1)/usr/lib/lua/luci/controller