kyu08/fzf-make

Suggestion: Tabs for project sub-makefiles

Opened this issue · 1 comments

This is a suggestion to handle nicely projects with multiple sub-Makefiles.

A small section at the right (below history) could show different Makefiles of a project.
It will find a Makefile from the current path and search for others in the subdirectories.
It could also display mk files at the very end of the list.

You could enter this list to select which Makefile to use/preview.
For a folder that doesn't have any Makefile, it could also search within the sub-folders
and preview the nearest sub-Makefile automatically.

For instance, I have a project with multiple Makefiles:

.
├── common.mk
├── graphics
│   └── Makefile
├── Makefile
├── quell
│   └── Makefile
└── utilities.mk

The section could show something like the following

┌─ Makefiles ─────────┐
│ >░Makefile░░░░░░░░░ │ 
│   graphics/Makefile │ 
│   quell/Makefile    │ 
│   commons.mk        │ 
│   utilities.mk      │ 
└─────────────────────┘

When choosing the target to run, it will use the correct commands according to the context:

  • make rule as usual
  • make -C directory rule for subdirs
  • make -f some.mk rule for mk files
    even with combinations of both make -C directory -f some.mk rule

I'm sorry for the late reply. I haven't have enough time for recent few days.

Thank you for nice suggestion! Also, your example made your idea quit understandable.
This is nice idea for handling makefiles in some directories! I think this feature is useful too.
I will deal with this in some release.