*** target pattern contains no '%'

I have followed the instruction to create a build environment for Openwrt and it is running ok. (Debian 4.19.152-1). After compiling a basic image for my router, i have started to add a local package. Followed the instruction as per Hello World example.
However, as soon as i execute ./scripts/feeds update mypackages, I get the above menioned error. APRX is an existing package and i have working Makefile and directories from the old days on the chaos chalmer version.

pa0esh@nagios:~/openwrt$ ./scripts/feeds update mypackages
Updating feed 'mypackages' from '/home/pa0esh/openwrt/mypackages/aprx' ...
Create index file './feeds/mypackages.index' 
/home/pa0esh/openwrt/feeds/mypackages.tmp/info/.files-packageinfo.mk:1: *** target pattern contains no '%'.  Stop.
pa0esh@nagios:~/openwrt$ 

Below is the current Makefile for aprx. Any help pointing me in the right directionis appreciated.

#
# Copyright (C) 2020 Erik Schott <erik@pa0esh.com>
# The old aprx package has been adapted by pa0esh for Openwrt Lede
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=aprx
PKG_REV:=""
PKG_VERSION:=2.9.0
PKG_RELEASE:=Stable
PKG_PROTO_NAME:=git
PKG_SOURCE_URL:=https://github.com/videobuff/openwrt-aprx.git

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$PKG_RELEASE.tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=$(PKG_PROTO_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/aprx
  SECTION:=net
  CATEGORY:=Network
  TITLE:=APRS RX & TX igate / Digipeater PhirePhly version 2.9.0 Github
  URL:=https://github.com/videobuff/aprx.git
  DEPENDS:=+libpthread
endef

define Package/aprx/description
	This daemon listens for traffic on the specified serial interfaces.
	It then forwards appropriate packets to APRS-IS servers.
endef

CONFIGURE_ARGS += \
	--with-embedded \

# Package preparation instructions; create the build directory and copy the source code. 
# The last command is necessary to ensure our preparation instructions remain compatible with the patching system.
define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        cp $(SOURCE_DIR)/* $(PKG_BUILD_DIR)
        $(Build/Patch)
endef

# Package build instructions; invoke the target-specific compiler to first compile the source file, and then to link the file into the final executable
define Build/Compile
        $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/aprx.o -c $(PKG_BUILD_DIR)/aprx.c
        $(TARGET_CC) $(TARGET_CCFLAGS) -o $(PKG_BUILD_DIR)/$1 $(PKG_BUILD_DIR)/aprx.o
endef

# Package install instructions; create a directory inside the package to hold our executable, and then copy the executable we built previously into the folder
define Package/aprx/install
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/aprx.init $(1)/etc/init.d/aprx
	$(INSTALL_DIR) $(1)/etc
	$(INSTALL_CONF) $(PKG_BUILD_DIR)/aprx.conf $(1)/etc/
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/aprx $(1)/usr/sbin/
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/aprx-stat $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,aprx))

I cannot reproduce the issue on master branch. Please consider sharing content of that generated file, or at least the first line.

Here is the makefile:

include $(TOPDIR)/rules.mk

# Name, version and release number
# The name and version of your package are used to define the variable to point to the build directory of your package: $(PKG_BUILD_DIR)
PKG_NAME:=helloworld
PKG_VERSION:=1.0
PKG_RELEASE:=1

# Source settings (i.e. where to find the source codes)
# This is a custom variable, used below
SOURCE_DIR:=/home/buildbot/helloworld

include $(INCLUDE_DIR)/package.mk

# Package definition; instructs on how and where our package will appear in the overall configuration menu ('make menuconfig')
define Package/helloworld
  SECTION:=examples
  CATEGORY:=Examples
  TITLE:=Hello, World!
endef

# Package description; a more verbose description on what our package does
define Package/helloworld/description
  A simple "Hello, world!" -application.
endef

# Package preparation instructions; create the build directory and copy the source code. 
# The last command is necessary to ensure our preparation instructions remain compatible with the patching system.
define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        cp $(SOURCE_DIR)/* $(PKG_BUILD_DIR)
        $(Build/Patch)
endef

# Package build instructions; invoke the target-specific compiler to first compile the source file, and then to link the file into the final executable
define Build/Compile
        $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/helloworld.o -c $(PKG_BUILD_DIR)/helloworld.c
        $(TARGET_CC) $(TARGET_LDFLAGS) -o $(PKG_BUILD_DIR)/$1 $(PKG_BUILD_DIR)/helloworld.o
endef

# Package install instructions; create a directory inside the package to hold our executable, and then copy the executable we built previously into the folder
define Package/helloworld/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/usr/bin
endef

# This command is always the last, it uses the definitions and variables we give above in order to get the job done
$(eval $(call BuildPackage,helloworld))

I mean the following file as reported in the stderr

/home/pa0esh/openwrt/feeds/mypackages.tmp/info/.files-packageinfo.mk

Sorry for the late reply. Newyear and covid-19 issues. So Happy New Year to you.....
I just checked and this is the content of the file

$(eval $(call PackageDir,Makefile:$(eval $(call BuildPackage,aprx)),Makefile:$(eval $(call BuildPackage,aprx)),))

Really happy with your help..... Got already stuck for a long time

This is unexpected. I checked with relevant code and it should not generate such content. The Makefile:... part should have been stripped with sed command.

Please share the version of openwrt base system here. Likely the layout of your feeds (mypackages) and it's location relative to the base system are also relevant here.