-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support other make syntax than GNU (nmake, bsd) #95
Comments
upvote this one, hope it will work with nmake |
I'm also waiting for nmake support |
@rustedwizard and @michoy, any GitHub repositories based on nmake that you recommend for testing when we get to implement this support? I can think of a partial hacky way you can use Makefile Tools for nmake even now. I don't have an nmake project handy to verify, but if the build logs are not too crazy different, the extension may be able to work with having "makefile.buildLog" pointing to the output you save from a full clean build of your project. If cd/push/pop/entering/leaving directories is written plainly, there are no active logging silencing directives and compiler commands are outputted, you may even have full functionality working already (except the "live" configure from a fresh up to date "dry-run". the build.log is frozen and needs to be refreshed every time you make a relevant change for IntelliSense: add/remove file, add/remove/change compilation swtiches...). We don't plan to implement this support soon but if you share with me a full clean build log of your project or a repository to clone from GitHub, I can quickly try and see how much it works already and help you with workarounds if at all possible. |
Hi @andreeis, thanks for taking the time to look into this. The project I'm working on is proprietary, so unfortunately I cannot give you a repository to test on. But I can show you my build log from
|
@michoy, yes because since we didn't have time to support nmake, we are not sending the right switches, we are not parsing for the right strings in the output, etc... We need to re-evaluate the arguments we send to "nmake", supposing there is even an equivalent for all the arguments that we ended up needing for "make". To unblock you, you create manually, in the terminal, a full clean build log of your project with the "nmake" command that you use daily. Make sure there is no logging suppressing going on. And share that log output with us. |
I'm not allowed to share the complete log. Sorry that I can't be more helpful, hope you figure it out anyways! |
@michoy, We will, for sure. It's not planned to happen yet. |
@andreeis I have a vested interest in working on bmake (BSD make) work. What's the easiest to start with, the syntax highlighting? |
@ashemedai, that is wonderful! :) Not sure what you think of "syntax highlighting", this extension doesn't currently support that for regular make either. Language service support for makefile syntax is even further on our backlog. What we support now is some level of parsing and understanding of a "make" log to extract from that information that is useful in constructing IntelliSense for C/C++. And so far, it works only with regular "make", no NMAKE, no BSD. So, if you can help extend the support for BSD, let's find where bmake differs from make in its output and usage. For "make", the following switches are very important and we need equivalents when supporting bmake: --dry-run, --keep-going, --always-make, --print-directory, --print-data-base, --no-builtin-variables, --no-builtin-rules, --question. Once you identify the equivalent bmake args, let's see how the output differs so we adapt our parsers. Can you share an example of a build log when using these switches? One log with --dry-run, --keep-going, --always-make, --print-directory (we extract compilation/linking commands from this output, we parse defines, includes, c/c++ standard, other compiler arguments relevant for IntelliSense and we also resolve paths based on how make tracks all the directories it goes into). and one log with --print-data-base, --no-builtin-variables, --no-builtin-rules, --question (we extract makefile targets from this output) |
@andreeis Have some initial data. Just need to generate some make logs.
It could also be
For
Still looking if there's equivalent functionality to |
@ashemedai, excellent initial data. Looking forward to the following findings. |
@andreeis With regard to the logs, are small projects (to get started) just as valuable as big ones (which probably highlight some additional things)? Can give you that today then. |
Apologies for the long delay. Find attached an output with Since one of the use cases listed at the top is for the FreeBSD source tree, I tried to use it with the no built-in rules, but that actually breaks the use of make since it errors out in multiple places due to If you need to extract the target list, I wonder if a Contrast to the rough equivalent of |
@ashemedai, cp-nop.log looks promising :). If you set "makefile.dryrunSwitches": ["-N","-k","-w"] then the IntelliSense part should work as with normal "make" syntax (when --always-make is missing). Try that and if anything unexpected happens for larger projects let us know. The problem with not having a functionality for --always-make is that if the project is not cleaned before being loaded in VSCode, IntelliSense will not know anything about the up-to-date source files. That's so inconvenient but it's by design. Alternatively you can produce yourself a full clean build log of the entire code base and feed that into the extension via "makefile.buildLog" (and make sure to refresh it any time you add/remove a source file or add/remove/edit a compilation switch). For the targets part, unfortunately we don't have a setting that would allow other switches to be passed (-N -dm instead of --nobuiltint... print-database....etc) and also the way we parse for the target names is currently different (we can think whether as we add support for more syntaxes we make the parsing more configurable). But indeed, when we get to supporting BSD syntax, we can use a log like cp-targets.log. "MakeAddChild", "Make_ExpandUse" are makefile targets? |
@andreeis First off, there was a bug in bmake's With regard to the My biggest challenge right now is how to get properly testing this. Unfortunately remote-ssh seems blocked for BSD hosts due to microsoft/vscode-remote-release#727 |
On the topic of nmake, from Visual Studio 2022:
For the evaluation of targets and such you probably would want something like |
Needed for repositories like:
https://github.com/freebsd/freebsd.git
https://www.openbsd.org/
https://www.netbsd.org/
The text was updated successfully, but these errors were encountered: