From 510858353986af10fa1e2d546408509d42b7c237 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Thu, 28 Jun 2012 18:08:06 +1000 Subject: [PATCH] Add VLAN to image description and name when VLAN=y is defined --- release/src/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/release/src/Makefile b/release/src/Makefile index 7de8716678..f9d4360af8 100644 --- a/release/src/Makefile +++ b/release/src/Makefile @@ -53,6 +53,12 @@ ifeq ($(NVRAM_SIZE),) NVRAM_SIZE = 0 endif +ifeq ($(VLAN),y) +EXTRA_PREDESC = 'VLAN-' +else +EXTRA_PREDESC = '' +endif + -include tomato_profile.mak # This could be simpler by just using $(TOMATO_PROFILE_NAME) like it used to be, @@ -381,7 +387,7 @@ define RouterOptions if [ "$(USERPPTP)" = "y" ]; then \ sed -i "/TCONFIG_USERPPTP/d" $(1); \ echo "TCONFIG_USERPPTP=y" >>$(1); \ - fi; \ + fi; \ if [ "$(VLAN)" = "y" ]; then \ sed -i "/TCONFIG_VLAN/d" $(1); \ echo "TCONFIG_VLAN=y" >>$(1); \ @@ -849,7 +855,7 @@ setprofile: echo '#define TOMATO_PROFILE PROFILE_$(N)' >> router/shared/tomato_profile.h echo '#define TOMATO_PROFILE_NAME "$(N)"' >> router/shared/tomato_profile.h echo '#define TOMATO_BUILD_NAME "$(B)"' >> router/shared/tomato_profile.h - echo '#define TOMATO_BUILD_DESC "$(DESC)"' >> router/shared/tomato_profile.h + echo '#define TOMATO_BUILD_DESC "$(EXTRA_PREDESC)$(DESC)"' >> router/shared/tomato_profile.h echo '#ifndef CONFIG_NVRAM_SIZE' >> router/shared/tomato_profile.h echo '#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router/shared/tomato_profile.h echo '#endif' >> router/shared/tomato_profile.h @@ -862,7 +868,7 @@ setprofile: echo 'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak echo 'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak echo 'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak - echo 'TOMATO_BUILD_DESC = "$(DESC)"' >> tomato_profile.mak + echo 'TOMATO_BUILD_DESC = "$(EXTRA_PREDESC)$(DESC)"' >> tomato_profile.mak echo 'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak echo 'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak echo 'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak @@ -949,6 +955,6 @@ endif @echo "cleankernel -C Linux distclean (but preserves .config)" @echo "distclean distclean of Linux & busybox (but preserve .configs)" @echo "prepk -C Linux oldconfig dep" - + .PHONY: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help .PHONY: a b c d m Makefile allversions tomato_profile.mak -- 2.11.4.GIT