[OpenWrt-Devel] Need help with Makefile error *** missing separator

Andy Wong axisaxisgz at 163.com
Mon Jan 4 07:06:31 EST 2016


#
# 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


PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)


include $(INCLUDE_DIR)/package.mk


define Package/openwrt-dist-luci/Default
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=$(1) LuCI interface
PKGARCH:=all
endef


Package/luci-app-chinadns = $(call Package/openwrt-dist-luci/Default,ChinaDNS)
Package/luci-app-redsocks2 = $(call Package/openwrt-dist-luci/Default,RedSocks2)
Package/luci-app-pdnsd = $(call Package/openwrt-dist-luci/Default,pdnsd)
Package/luci-app-adbyby = $(call Package/openwrt-dist-luci/Default,adbyby)


define Package/openwrt-dist-luci/description
LuCI Support for $(1).
endef


Package/luci-app-chinadns/description = $(call Package/openwrt-dist-luci/description,ChinaDNS)
Package/luci-app-redsocks2/description = $(call Package/openwrt-dist-luci/description,RedSocks2)
Package/luci-app-pdnsd/description = $(call Package/openwrt-dist-luci/description,pdnsd)
Package/luci-app-adbyby/description = $(call Package/openwrt-dist-luci/description,adbyby)


define Build/Prepare
endef


define Build/Configure
endef


define Build/Compile
endef


define Package/openwrt-dist-luci/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
( . /etc/uci-defaults/luci-$(1) ) && rm -f /etc/uci-defaults/luci-$(1)
chmod 755 /etc/init.d/$(1) >/dev/null 2>&1
/etc/init.d/$(1) enable >/dev/null 2>&1
fi
exit 0
endef


Package/luci-app-chinadns/postinst = $(call Package/openwrt-dist-luci/postinst,chinadns)
Package/luci-app-redsocks2/postinst = $(call Package/openwrt-dist-luci/postinst,redsocks2)
Package/luci-app-pdnsd/postinst = $(call Package/openwrt-dist-luci/postinst,pdnsd)
Package/luci-app-adbyby/postinst = $(call Package/openwrt-dist-luci/postinst,adbyby)


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
$(INSTALL_DATA) ./files/luci/model/cbi/$(2).lua $(1)/usr/lib/lua/luci/model/cbi/$(2).lua
$(INSTALL_DIR) $(1)/etc/uci-defaults
        $(INSTALL_BIN) ./files/root/etc/uci-defaults/luci-$(2) $(1)/etc/uci-defaults/luci-$(2)
if [ -f "./files/luci/i18n/$(2).zh-cn.lmo" ]; then
        $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
        $(INSTALL_DATA) ./files/luci/i18n/$(2).zh-cn.lmo $(1)/usr/lib/lua/luci/i18n
fi
exit 0
endef


Package/luci-app-chinadns/install = $(call Package/openwrt-dist-luci/install,$(1),chinadns)
Package/luci-app-redsocks2/install = $(call Package/openwrt-dist-luci/install,$(1),redsocks2)
Package/luci-app-pdnsd/install = $(call Package/openwrt-dist-luci/install,$(1),pdnsd)
Package/luci-app-adbyby/install = $(call Package/openwrt-dist-luci/install,$(1),adbyby)


$(eval $(call BuildPackage,luci-app-chinadns))
$(eval $(call BuildPackage,luci-app-redsocks2))
$(eval $(call BuildPackage,luci-app-pdnsd))
$(eval $(call BuildPackage,luci-app-adbyby))




With the highlighted "if,then" course.This error appear:
Makefile:97: *** missing separator.  Stop.


Line 97 is pointing to
Package/luci-app-chinadns/install = $(call Package/openwrt-dist-luci/install,$(1),chinadns)
 
I've looked up the forum.Jow said this error almost always indicates that you used leading spaces in a place where a tab was expected.But mine did not use spaces.I can't find other reason causing this error.So I came here for faster answer than the forum.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20160104/b1fb4095/attachment.htm>
-------------- next part --------------
_______________________________________________
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