build: Add target list.
* GNUmakefile (%): Handle all targets. * make.scm (main): Show and implement target list.
This commit is contained in:
parent
89a9decfff
commit
a7b7297ee2
|
@ -3,10 +3,13 @@ GUILE_FLAGS:=--no-auto-compile -L . -L guile -C . -C guile
|
|||
|
||||
include .config.make
|
||||
|
||||
PHONY_TARGETS:= all all-go check clean clean-go default help
|
||||
PHONY_TARGETS:= all all-go check clean clean-go default help list
|
||||
.PHONY: $(PHONY_TARGETS)
|
||||
|
||||
$(PHONY_TARGETS):
|
||||
$(GUILE) $(GUILE_FLAGS) -s make.scm $@
|
||||
|
||||
%:
|
||||
$(GUILE) $(GUILE_FLAGS) -s make.scm $@
|
||||
|
||||
.config.make: ./configure
|
||||
|
|
2
make.scm
2
make.scm
|
@ -349,6 +349,7 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$
|
|||
(cond ((member "all-go" args) #t)
|
||||
((member "clean-go" args) (map delete-file (filter file-exists? %go-files)))
|
||||
((member "clean" args) (clean))
|
||||
((member "list" args) (display (string-join (map target-file-name %targets) "\n" 'suffix)))
|
||||
((member "help" args) (format #t "Usage: ./make.scm [TARGET]...
|
||||
|
||||
Targets:
|
||||
|
@ -358,6 +359,7 @@ Targets:
|
|||
clean
|
||||
clean-go
|
||||
help~a
|
||||
list
|
||||
"
|
||||
;;(string-join (map target-file-name %targets) "\n " 'prefix)
|
||||
(string-join (filter (negate (cut string-index <> #\/)) (map target-file-name %targets)) "\n " 'prefix)))
|
||||
|
|
Loading…
Reference in a new issue