Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Class for Parsing (GNU) Makefiles...

Posted on 1998-03-15
6
236 Views
Last Modified: 2010-04-10
  Hey all...

   I am trying to find a parsing class (or even straight C code) for (GNU/DJGPP) Makefiles.  It is for a personal project that uses DJGPP (MS-DOS version of the GNU C/C++ compiler), and I need to read in a Makefile, and be able to find out compiler and linker flags, defines, what targets are available, what the dependencies are for each target, etc, etc.

   Even a class that does partial parsing would be helpful, I might be ableo to finish the rest.  I just to not know that much about Makefiles.

   Thanx!

-=- James.
0
Comment
Question by:jtwine100697
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:sprinkmeier
ID: 1183497
Why not go to the horses mouth?
Download the source code for GNU MAKE?
0
 
LVL 4

Author Comment

by:jtwine100697
ID: 1183498
  I know about the source for GNU Make, but I would like to know if someone has already done this before, so that I do not need to reinvent the very same wheel!

   Referencing the actual source for a parser is a last resort for me.

    I am reopening this for possible answers.

-=- James.

0
 
LVL 1

Expert Comment

by:vsinha
ID: 1183499
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 4

Author Comment

by:jtwine100697
ID: 1183500
  "vsinha", please submit an answer...  I have decided to not parse the makefiles, but to generate my own ones, in a specific format, and then use that format.

   But thanx for the pointer!

-=- James.
0
 
LVL 1

Accepted Solution

by:
vsinha earned 70 total points
ID: 1183501
Do you mean this by, "please submit an answer"
0
 
LVL 4

Author Comment

by:jtwine100697
ID: 1183502
 Yes! :P

-=- James.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question