Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use nmake to determine what is going to be build by a .c or .java file

Status
Not open for further replies.

blues77

Programmer
Jun 11, 2002
230
CA
Hi,

I'm not sure if this is the right place for this post but I figured I would give it a shot. I need a way to have nmake "build" a .c or .java file but not actually build it. I just need to determine what files (.dll or .exe) are being build by a particular file. Is there anyway I can do this? Any help is greatly appreciated.

Thanks
Mike
 
syntax is like this:

target:
<space or tab>any kind command line

for example

xx:
@echo build target xx

by default make is executed on file with name &quot;makefile&quot; and for target xx you will do like this in cmd line:
make xx

If you don't specify target, will be built by default target with name &quot;all&quot;

So you can do for java for example this:

buildjava:
javac *.java
rmic xxx.class
jar ....

Ion Filipski
1c.bmp
 
Hi,

I'm still a little confused. If I am given a .c file and I want to know what is going to be produced by that .c file. I other words find out what the target will be. Is there a way using nmake to determine what the target or .dll or .exe produced by a .c file will be? That is the information that I'm looking to get My information is very limited all I have is a .c file and the make file that uses that .c file to either produce a component which will continue on and eventaully produce either a .exe or .dll. This is using nmake which I believe uses a different syntax etc..for it's make files than say gnumake. Right now I manually go through the makefiles and figure out what will be produced which is a very tedious and time consuming task. Anymore help is greatly appreciated.

Thanks
Mike
 
sorry, you're telling me about utility nmake. This utility knows nothing about c/cpp/java/bas... files. What you give to it is targets and rules in makefiles. To makefiles you may give any names and any extensions. nmake will always interpret them as makefiles. What to do you will specify inside command lines for targets.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top