Which source file contains the lexer (scanner) for make file?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How so? As stated, good old Vim does exactly that, in multiple ways.
Place the cursor onto any of {([])} (or preprocessor conditional in C/C++ code). Type %.
What happens? (In your own words, please, no screenshots)
Double-click on any of {([])}.
What happens? (ditto)
There are other ways in Vim, see if you can find them.
Even. Not surprised.
Yes, it is working both in WSL ubuntu (on Windows), and Cygwin. The reason it worked now that only now pressed '%' in conjunction with the Shift key.
Sorry, but in haste forgot which is the correct key to press, along with the '%' key.
Very sorry, but still the question asked in post #6 (by me), for implementing the idea of @gstavi remains. Though I know (by reading books on 'make') that it is based on advanced syntax used in the makefiles.
Yes, it is working both in WSL ubuntu (on Windows), and Cygwin. The reason it worked now that only now pressed '%' in conjunction with the Shift key.
Sorry, but in haste forgot which is the correct key to press, along with the '%' key.
So finally it started to work. Good news.
Quote:
Originally Posted by ajiten
Very sorry, but still the question asked in post #6 (by me), for implementing the idea of @gstavi remains. Though I know (by reading books on 'make') that it is based on advanced syntax used in the makefiles.
I don't understand what is it all about. Do you want to implement something?
@OP Again, what is the actual goal, what do you wish to achieve with this? Say, you succeed to get two line-numbere, what will you do with them?
At least it is an exercise, that makes me interesting to work in area that uses the advanced syntax of the makefile, though introduced by you, in modification of a stackexchange site's question's code.
I have seen the syntax and the capabilities of the makefile, in book(s); and feel they are using CFG, in order to implement the concise syntax.
That is interesting, but for the start point, the solution proposed by @gstavi, was nice.
2.3 How make Processes a Makefile
By default, make starts with the first target (not targets whose names start with ‘.’ unless they also contain one or more ‘/’).
which is not made clear at all; though at the end of section 2.5, it states
Code:
.PHONY : clean
Am not clear at all of the meaning of '/'.
Also, I assume that the usual '\' in the given makefiles, implies a newline character, as it occurs at the end of any given line. If it is an explicit '\', then please confirm, along with the reason for such a syntax.
Left are only the doubts for formatting using tab, but would ask later, as lesser important. The issue there is minimal, and need to see the code too in the line #570 till line #1359, as stated earlier in post #4, by @astrogeek.
-------------
P.S. : Please tell if in the code given here (as provided by @pan64, in post #2), have the implementation for the syntax implementation of the makefile, as given in the section 2.6; i.e.
/ is simply the directory separator. In makefiles the targets are usually files, if the target contains a / it means it is located somewhere else, not in the current directory. Otherwise you can safely ignore it for now. Do not mix / and \ , these are two different things.
Backslash at end of line is the continuation symbol.
Code:
.PHONY: cheers
cheers:
echo "Hi\
there"
Result:
Code:
$ make cheers
echo "Hi\
there"
Hithere
$ make --silent cheers
Hithere
Two answer your next questions:
* .PHONY means: this target doesn't actually create a file
* --silent means: don't print the commands before executing them
@OP It is commendable that you manage to create such incomprehensible sentences, but let's assume that your asking about rules that don't have recipe part. Of course these are just dependencies, the recipe comes from somewhere else. This might be an implicit rule. Sample:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.