Add symbol-sizes target to the BUILD build system module to print a size-sorted list...
[pub/lufa.git] / LUFA / Build / lufa.core.in
index bc07a94..13372c4 100644 (file)
@@ -7,7 +7,7 @@
 #\r
 \r
 LUFA_BUILD_MODULES        += CORE\r
-LUFA_BUILD_TARGETS        += info help list_targets list_modules list_mandatory list_optional \r
+LUFA_BUILD_TARGETS        += help list_targets list_modules list_mandatory list_optional \r
 LUFA_BUILD_MANDATORY_VARS += \r
 LUFA_BUILD_OPTIONAL_VARS  += \r
 \r
@@ -19,7 +19,6 @@ LUFA_BUILD_OPTIONAL_VARS  +=
 # -----------------------------------------------------------------------------\r
 # TARGETS:\r
 #\r
-#    info                      - Build system information\r
 #    help                      - Build system help\r
 #    list_targets              - List all build targets\r
 #    list_modules              - List all build modules\r
@@ -38,14 +37,17 @@ LUFA_BUILD_OPTIONAL_VARS  +=
 #\r
 # -----------------------------------------------------------------------------\r
 \r
-info:\r
+# Build sorted and filtered lists of the included build module data\r
+SORTED_LUFA_BUILD_MODULES  = $(sort $(LUFA_BUILD_MODULES))\r
+SORTED_LUFA_BUILD_TARGETS  = $(sort $(LUFA_BUILD_TARGETS))\r
+SORTED_LUFA_MANDATORY_VARS = $(sort $(LUFA_BUILD_MANDATORY_VARS))\r
+SORTED_LUFA_OPTIONAL_VARS  = $(filter-out $(SORTED_LUFA_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS)))\r
+\r
+help:\r
        @echo "==================================================================="\r
-       @echo "                  LUFA Build System 2.0                            "\r
-       @echo "      (C) Dean Camera { dean @ fourwalledcubicle . com }           "\r
+       @echo "                       LUFA Build System 2.0                       "\r
+       @echo "      (C) Dean Camera, 2012 { dean @ fourwalledcubicle . com }     "\r
        @echo "==================================================================="\r
-\r
-.PHONY: info\r
-help: info\r
        @echo "DESCRIPTION:                                                       "\r
        @echo " This build system is a set of makefile modules for (GNU) Make, to "\r
        @echo " provide a simple system for building LUFA powered applications.   "\r
@@ -58,38 +60,50 @@ help: info
        @echo " module as a required parameter before including the build module  "\r
        @echo " in your project makefile. Parameters marked as optional will      "\r
        @echo " assume a default value in the module if not user-assigned.        "\r
+       @echo "                                                                   "\r
+       @echo " By default the target output shows both a friendly summary, as    "\r
+       @echo " well as the actual invoked command. To suppress the output of the "\r
+       @echo " invoked commands and show only the friendly command output, run   "\r
+       @echo " make with the \"-s\" switch added before the target(s).           "             \r
        @echo "==================================================================="\r
        @echo "  Currently used modules in this application:                      "\r
        @echo "                                                                   "\r
-       @echo "    [" $(sort $(LUFA_BUILD_MODULES)) "]"\r
+       @printf " %b" "$(SORTED_LUFA_BUILD_MODULES:%=   - %\n)"\r
        @echo "                                                                   "\r
        @echo "                                                                   "\r
        @echo "  Currently available build targets in this application:           "\r
        @echo "                                                                   "\r
-       @echo "    [" $(sort $(LUFA_BUILD_TARGETS)) "]"\r
+       @printf " %b" "$(SORTED_LUFA_BUILD_TARGETS:%=   - %\n)"\r
        @echo "                                                                   "\r
        @echo "                                                                   "\r
        @echo "  Mandatory variables required by the selected build Modules:      "\r
        @echo "                                                                   "\r
-       @echo "    [" $(sort $(LUFA_BUILD_MANDATORY_VARS)) "]"\r
+       @printf " %b" "$(SORTED_LUFA_MANDATORY_VARS:%=   - %\n)"\r
        @echo "                                                                   "\r
        @echo "                                                                   "\r
        @echo "  Optional variables required by the selected build Modules:       "\r
        @echo "                                                                   "\r
-       @echo "    [" $(filter-out $(LUFA_BUILD_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS))) "]"\r
+       @printf " %b" "$(SORTED_LUFA_OPTIONAL_VARS:%=   - %\n)"\r
        @echo "                                                                   "\r
        @echo "==================================================================="\r
        @echo "        The LUFA BuildSystem 2.0 - Powered By Unicorns (tm)        "\r
        @echo "==================================================================="\r
        \r
-list_targets:\r
-       @echo Currently Available Build Targets: $(sort $(LUFA_BUILD_TARGETS))\r
-       \r
 list_modules:\r
-       @echo Currently Build Modules: $(sort $(LUFA_BUILD_MODULES))\r
+       @echo Currently Build Modules: $(SORTED_LUFA_BUILD_MODULES)\r
+\r
+list_targets:\r
+       @echo Currently Available Build Targets: $(SORTED_LUFA_BUILD_TARGETS)   \r
 \r
 list_mandatory:\r
-       @echo Mandatory Variables for Included Modules: $(sort $(LUFA_BUILD_MANDATORY_VARS))\r
+       @echo Mandatory Variables for Included Modules: $(SORTED_LUFA_MANDATORY_VARS)\r
        \r
 list_optional:\r
-       @echo Optional Variables for Included Modules: $(filter-out $(LUFA_BUILD_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS)))\r
+       @echo Optional Variables for Included Modules: $(SORTED_LUFA_OPTIONAL_VARS)\r
+\r
+# Phony build targets for this module\r
+.PHONY: help list_modules list_targets list_mandatory list_optional\r
+\r
+# Disable default in-built make rules (those that are needed are explicitly\r
+# defined, and doing so has performance benefits when recursively building)\r
+.SUFFIXES:\r