Refactor downloading code into download.mk Support multiple file downloads Support...
[openwrt/openwrt.git] / rules.mk
index 9d5fcd72b408d060c74135bb79da48cdb9521e38..9f1c4c474970705c978b5a612bdd98c413f98662 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -132,6 +132,9 @@ $(call shvar,$(1))=$$(call $(1))
 export $(call shvar,$(1))
 endef
 
+# file extension
+ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1)))
+
 all:
 FORCE: ;
 .PHONY: FORCE