commit 113f47b

chld  ·  2026-08-15 22:45:34 +0000 UTC
parent a00a853
expand variables in targets
1 files changed,  +15, -10
+15, -10
 1@@ -15,19 +15,24 @@
 2 		(if (> (length (command-line)) (+ 1 1)) (cadr (command-line)) "Makefile")
 3 		))
 4 
 5+(do ((l 0 (+ l 1)))
 6+    ((>= l (length f-list)))
 7+(if (or (and
 8+	 (string-contains (list-ref f-list l) ":")
 9+	 (string-contains (list-ref f-list l) "$("))
10+	(string-contains (list-ref f-list l) "="))
11+    (if (string-contains (list-ref f-list l) "=")
12+	(set! v-list (cons (var-parse (var-expand (list-ref f-list l) v-list)) v-list))     
13+	)
14+    ))
15+
16 (do ((l (- (length f-list) 1) (- l 1)))
17     ((< l 0))
18-  
19-  
20   (if (string-contains (list-ref f-list l) ":")
21-      (set! m-list (cons (line-parse (list-ref f-list l)) m-list))
22-      (if (string-contains (list-ref f-list l) "=")
23-	  (if (string=? (list-ref (string-split (list-ref f-list l) #\space)1) "=")
24-	      (set! v-list
25-		    (cons (var-parse (list-ref f-list l)) v-list))
26-		    )
27+      (set! m-list (cons (line-parse (var-expand (list-ref f-list l) v-list)) m-list))
28       ))
29-  )
30+      
31+
32 
33 ;; (display m-list)
34 ;; (newline)(newline)
35@@ -46,7 +51,7 @@
36   ))
37 (set! t-list (list-sort (car (line-parse (list-ref f-list t-line))) m-list))
38 (set! t-list (delete-duplicates t-list equal?))
39-;; (display t-list)(newline)
40+(display t-list)(newline)
41 
42 (do ((i 0 (+ i 1)))
43     ((>= i (length t-list)))