Changeset 452


Ignore:
Timestamp:
Oct 21, 2012, 12:02:17 AM (8 years ago)
Author:
amain
Message:

plugin: add support for enabling and disabling plugins

Location:
branches/contrib
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/contrib/Config.in

    r392 r452  
    2525        bool
    2626
     27config DO_CONF_TARGETS
     28        bool
     29        default y
     30
    2731mainmenu "DebWrt Configuration"
    2832
     33source "config/plugin.in"
     34
    2935source "config/archs.in"
    30 source "config/config-target.in"
     36source "config/target.in"
    3137
    3238source "config/image_name.in"
  • branches/contrib/config/config.mk

    r451 r452  
    3232# note: include the select <target> lines, exlcude all other selects
    3333config/target: openwrt/menuconfig
    34         LC_ALL=C cat $(OPENWRT_BUILD_DIR)/tmp/.config-target.in | awk '/select\W+[[:lower:]]/ { print $0 } /select.*HAS_SUBTARGETS/ { print $0 } ! /select/ { print $0 }' >$(TOPDIR)/config/target.in
     34        LC_ALL=C cat $(OPENWRT_BUILD_DIR)/tmp/.config-target.in \
     35          | awk \
     36            '/select\W+[[:lower:]]/ { \
     37               print $0 \
     38             } \
     39             \
     40             /select.*HAS_SUBTARGETS/ { \
     41               print $0 \
     42             } \
     43             ! /select/ { \
     44               print $0 \
     45             }' \
     46             | sed \
     47                -e 's/prompt "Target System"/prompt "Target System" if DO_CONF_TARGETS/' \
     48                -e 's/prompt "Target Profile"/prompt "Target Profile" if DO_CONF_TARGETS/' \
     49             >$(TOPDIR)/config/target.in
    3550        cat $(OPENWRT_BUILD_DIR)/target/Config.in \
    3651          | grep -v "source " \
     
    4055        $(MAKE) -C $(MCONF_DIR) clean
    4156
    42 .config:
     57.config: plugins/generate-config
    4358        @echo "Please run make menuconfig to create a configuration. Then run make again. Type make help to get a list of available DebWrt make commands"
    4459        @exit 1
    4560
    46 config: plugins/apply config/mconf/conf FORCE
     61config: plugins/generate-config plugins/apply config/mconf/conf FORCE
    4762        $(CONF) Config.in
    4863        @echo "Type make help to get a list of available DebWrt make commands"
    4964
    50 defconfig: config/mconf/conf FORCE
     65defconfig: plugins/generate-config config/mconf/conf FORCE
    5166        touch .config
    5267        $(CONF) -D .config Config.in
    5368        @echo "Type make help to get a list of available DebWrt make commands"
    5469
    55 oldconfig: plugins/apply config/mconf/conf FORCE
     70oldconfig: plugins/generate-config plugins/apply config/mconf/conf FORCE
    5671        $(CONF) -o Config.in
    5772        @echo "Type make help to get a list of available DebWrt make commands"
    5873
    59 menuconfig: plugins/apply config/mconf/mconf FORCE
     74menuconfig: plugins/generate-config plugins/apply config/mconf/mconf FORCE
    6075        $(MCONF) Config.in
    6176        @echo "Type make help to get a list of available DebWrt make commands"
  • branches/contrib/config/target.in

    r450 r452  
    11choice
    2         prompt "Target System"
     2        prompt "Target System" if DO_CONF_TARGETS
    33        default TARGET_ar71xx
    44        reset if !DEVEL
     
    762762
    763763choice
    764         prompt "Target Profile"
     764        prompt "Target Profile" if DO_CONF_TARGETS
    765765
    766766config TARGET_rb532_Default
  • branches/contrib/plugins

    • Property svn:ignore
      •  

        old new  
        55de-apply-debwrt
        66de-apply-openwrt
         7generate-config
  • branches/contrib/plugins/plugins.mk

    r449 r452  
    3333PLUGIN_NAME:=\<invalid\>
    3434
    35 PLUGIN_CONFIG_LINE = \
    36 config PLUGINS_$${plugin_up}_ENABLED\n\
    37 \tbool \"$${plugin}\"\n\
    38 \tdefault y\n\
    39 \thelp\n\
    40 \t  Enable/disable plugin $${plugin}\n
    41 
     35PLUGIN_CONFIG_LINE = menu \"Plugin $${plugin_up}\"\n\
     36\tsource plugins/$${plugin}/Config.in\nendmenu\n\n
    4237
    4338# add the plugin patches to the list of patches to OpenWRT
    4439OPENWRT_PATCH_DIRS += $(wildcard $(addprefix $(PLUGINS_DIR)/,$(addsuffix /openwrt,$(PLUGIN_LIST))))
    4540
    46 plugins/config_plugins.in:
    47         @for plugin in $(PLUGIN_LIST) hello; \
     41plugins/generate-config:
     42        rm -f $(TOPDIR)/tmp/plugins-generated.in
     43        @for plugin in $(PLUGIN_LIST); \
    4844        do \
    4945          plugin_up=$$(echo $${plugin} | tr [a-z] [A-Z]); \
    50           /bin/echo -e "$(PLUGIN_CONFIG_LINE)" >>$@; \
     46          echo "Generating config for plugin: $${plugin_up}"; \
     47          /bin/echo -e "$(PLUGIN_CONFIG_LINE)" >>$(TOPDIR)/tmp/plugins-generated.in; \
    5148        done
     49        touch $@
    5250
    5351plugins/menuconfig: $(MCONF) plugins/config_plugins.in
     
    9694
    9795.PHONY: plugins/list \
    98         plugins/clean
     96        plugins/clean \
Note: See TracChangeset for help on using the changeset viewer.