On Mon, Jan 22, 2007 at 07:22:40PM +0100, [EMAIL PROTECTED] wrote:
> Author: tg
> Date: 2007-01-22 19:22:40 +0100 (Mon, 22 Jan 2007)
> New Revision: 1720
>
> Modified:
>    trunk/freewrt/package/asterisk/Makefile
> Log:
> this should fix n0-1@'s problem if I understood it correctly
>
>
> Modified: trunk/freewrt/package/asterisk/Makefile
> ===================================================================
> --- trunk/freewrt/package/asterisk/Makefile   2007-01-22 18:21:25 UTC (rev 
> 1719)
> +++ trunk/freewrt/package/asterisk/Makefile   2007-01-22 18:22:40 UTC (rev 
> 1720)
> @@ -17,20 +17,48 @@
>  include $(TOPDIR)/mk/package.mk
>
>  $(eval $(call 
> PKG_template,ASTERISK,asterisk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
> +ifneq (${FWRT_PACKAGE_ASTERISK_PGSQL},)
>  $(eval $(call 
> PKG_template,ASTERISK_PGSQL,asterisk-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
> +endif

I didn't know this would work. IIRC the last time I tried to put
if-else conditions around a package template, it complained about
missing else's when evaluating the templates. I wonder what I must have
done wrong, as this seems to work.
Anyway, I consider this as rather a bad solution, the templates itself
already consume many LoC, now even more. I would tend to putting
corresponding if-cases together, what on the other hand would pull the
template definitions appart and spread them over the whole makefile what
definitely would mean overkill for readability.
What about some make function like:

( ifneq (${1},) || ifneq (${SINGLE_PACKAGE_MODE},) )

This could be added to the package template itself, and be used in the
package makefiles for installing/building conditionally.

Greetings, Phil

_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to