More experimentation with obfuscation. Wondering why it is slow.
authorMatt McCutchen <hashproduct@gmail.com>
Sun, 3 Jun 2007 13:45:01 +0000 (09:45 -0400)
committerMatt McCutchen <hashproduct@gmail.com>
Mon, 4 Jun 2007 16:29:53 +0000 (12:29 -0400)
Evidently all the stat calls are the bottleneck.  That makes me
wonder whether there is a way to get make to think a file was
explicitly named as an alternative to using a file that exists.

experiments/obfuscation-dump.mk

index aaa0953..3c6bd9f 100644 (file)
@@ -1,14 +1,9 @@
 .SECONDEXPANSION:
 
-obfn1=/./.
+obfn1:=/./.
 #obfn=$(obfn1)$(eval obfn1=$(patsubst /.//////%,/.//./%,$(subst /.//////,//./,$(obfn1)/)))
-define obfn
-$(obfn1)$(eval 
-pr$(obfn1)=$1
-cmd$(obfn1)=$2
-obfn1=$(subst /.//////,//./,$(patsubst /.//////%,/././%,$(obfn1:.=/.)))
-)
-endef
+#obfn=$(obfn1)$(eval pr$(obfn1)=$1)$(eval cmd$(obfn1)=$2)$(eval obfn1:=$(subst /.//////,//./,$(patsubst /.//////%,/././%,$(obfn1:.=/.))))
+obfn=$(obfn1)$(eval pr=$1)$(eval cmd=$2)$(eval obfn1:=$(subst /.//////,//./,$(patsubst /.//////%,/././%,$(obfn1:.=/.))))
 
 digits=0 1 2 3 4 5 6 7 8 9
 
@@ -18,8 +13,9 @@ digits=0 1 2 3 4 5 6 7 8 9
        
 %yx: $(foreach d,$(digits),%$dy)
        
-%y: $$(call obfn,FORCE,$$$$(info Running $$@ $$$$@))
+#%y: $$(call obfn,FORCE,$$$$(info Running $$@ $$$$@))
+%y: $$(call obfn,,)
        
-/./%: $$(pr$$@)
-       $(cmd$@)
+/./%: $$(pr)
+       $(cmd)
 FORCE: