Skip to content

Stepping through macro expansions #124

@deliciouslytyped

Description

@deliciouslytyped

Related to #123 ,

I want to debug the following Makefile;
the make-dirs call expands to nothing:

define _make-dir
$1/.dum: $(not-dir $1)/.dum
        mkdir $(dir $@)
        touch $(dir $@)/.dum
endef

# we dont try to create/depend on /.dum
define make-dir
$(if $(not-dir $1),$(call _make-dir,$1),)
endef

$(call make-dir,test/)

I've skimmed through the manual earlier and looked through the in-REPL documentation, maybe I'm missing something but

  • I don't see any way to step through macro expansions
  • I don't see a way to dump the contents of the file after expansion
  • are there other techniques for debugging macros?
    Are there any existing solutions to these, or are there features that could be implemented?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions