Changeset 414


Ignore:
Timestamp:
Oct 7, 2012, 12:27:48 AM (8 years ago)
Author:
ehem
Message:

Add the variable $(PLUGIN_NAME) when including plugin Makefiles. Quite tricky
to use due to how Make works, but hopefully helpful.

Location:
branches/contrib/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/contrib/plugins/README

    r410 r414  
    1919plugin.mk is included by the plugins.mk Makefile.  The suggested usage is to
    2020add a plugin's target as a prerequisite of an existing DebWrt target.  The
    21 plugin's target will then be invoked before that DebWrt target.
     21plugin's target will then be invoked before that DebWrt target.  The variable
     22$(PLUGIN_NAME) will be set to the name (directory) of the plugin during the
     23time Make is parsing the file, beware it WILL change afterwards (very tricky to
     24use!).
    2225
    2326Make targets to manage plugings. Normally only needed when developing a plugin. Targets:
  • branches/contrib/plugins/plugins.mk

    r410 r414  
    2626endif
    2727
    28 -include $(addprefix plugins/,$(addsuffix /plugin.mk,$(PLUGIN_LIST)))
     28$(foreach plugin,$(PLUGIN_LIST),$(eval PLUGIN_NAME:=$(plugin))\
     29$(eval -include $(addprefix plugins/,$(addsuffix /plugin.mk,$(plugin)))))
     30PLUGIN_NAME:=\<invalid\>
    2931
    3032##need to resolve the -p0 vs -p1 issue first
Note: See TracChangeset for help on using the changeset viewer.