I created a luci application, but found that it was no recognized in menuconfig.
Through debugging I found that I had to add the following in the last line of the makefile
# call BuildPackage - OpenWrt buildroot signature
This is supposed to be a comment line, is there any special purpose for this comment line?
Yes, the OpenWrt buildroot metadata scanner will grep for the string „call BuildPackage“ in Makefiles and only consider those that contain it. The intent is to not invoke unrelated Makefiles which do not describe OpenWrt packages.
Since LuCI's build system factored out most OpenWrt package build recipes it requires/contains no $(call BuildPackage,luci-…)) macro invocation, hence the need for the magic comment to make LuCI package Makefiles recognized as OpenWrt package Makefile.