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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make file - Confused

Status
Not open for further replies.

NiceButDim

Programmer
Feb 12, 2002
154
GB
Hi, I haven't used make files for quite a while, and I'm having a problem that I hope someone may be able to help me with;

I have a simple make file;
mcom_Sales.c: mcom_Sales.pc
$(ORACLE_HOME)/bin/proc config=/tmp/jh/proc_config_include code=ansi char_map=string def_sqlcode=yes sqlcheck=full
iname=mcom_Sales.pc oname=mcom_Sales.c
cc -c -I/manta/include mcom_Sales.c

all: mcom_Sales.o
clean:
rm -f mcom_Sales.o mcom_Sales.c

When run with 'all', the proc line works fine, but the cc doesn't;
cc -c -I/manta/include mcom_Sales.c
cc -c mcom_Sales.c
UX:acomp: ERROR: "mcom_Sales.c", line 217: cannot find include file: "mcom_Const.h"

The error is being the -I parameter is being ignored. My question is, why is my cc line being translated by make. If I run my cc command from the command line, all is well.

Any help appreciated.
Thanks.

john.
 
You haven't got a rule for mcom_Sales.o so it is using the default rule. Change the rule to
Code:
mcom_Sales.o:   mcom_Sales.pc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top