spin2cpp icon indicating copy to clipboard operation
spin2cpp copied to clipboard

Enhancement request: spin2cpp flag '-f' list #included files as well?

Open avsa242 opened this issue 5 years ago • 3 comments
trafficstars

@totalspectrum I noticed this handy flag today: [ -f ] output list of file names

Would it be practical to add support for adding files to that list that are included by the preprocessor (or is there a way to switch that on, currently?). This flag is handy for writing a script to package up everything into an archive, but it misses #included files. Low-priority request as it isn't something I use very often.

Thanks!

avsa242 avatar Apr 20 '20 18:04 avsa242

While you're at it, could you add something along the lines of GCC's -M flag for auto-generating Makefile dependencies?

electrodude avatar Apr 25 '20 23:04 electrodude

This will be fairly complicated (the preprocessor is separate from the main compiler, and there are two different preprocessors used by different languages). So it's going to have to wait.

totalspectrum avatar Apr 26 '20 15:04 totalspectrum

+1 for GCC-style -MMD flag, it's hard to write a good makefile (or rakefile...) without this feature

Wuerfel21 avatar Aug 02 '20 23:08 Wuerfel21

-f does print included files now (except for standard system files included in C with a style syntax).

totalspectrum avatar Jan 02 '23 22:01 totalspectrum

And I've added -MMD to flexcc.

totalspectrum avatar Jan 03 '23 13:01 totalspectrum