• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error with make

 
Amit Basnak
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends

While compiling C files under HP-UX with make , im getting the the error as follows
$HOME/xmlrpc/make-3.81/make
/orainst/rcsinbg1/xmlrpc/make-3.81/make -C cpp/ all
make: *** cpp/: No such file or directory. Stop.
make: *** [cpp/all] Error 2

The Makefile has been modified to include all the required C files. Still I dont understand why it still looks for cpp files which results in Make failure
Can anyone throuw some light on this ?
Thanks
Amit
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you're typing "$HOME/xmlrpc/make-3.81/make", the next line looks like Make echoing the command being executed. That command would come from some rule in the Makefile. The command "make -C cpp/ all" is telling make to change into the directory "cpp/" and execute the Makefile in that directory; apparently there's no such directory. Without seeing your Makefile, I can't tell you why Make is trying to do this; but that's what it's doing.
 
Amit Basnak
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ernest

Here is my Makefile code which contains cpp/all

all: $(PROGS)
65
66 ifeq ($(ENABLE_CPLUSPLUS),yes)
67 all: cpp/all
68 endif
69
70 .PHONY: cpp/all
71 cpp/all:
72 $(MAKE) -C $(dir $@) $(notdir $@)
73
74 $(CLIENTPROGS):%:%.o
75 $(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_CLIENT)
76
77 $(SERVERPROGS_CGI):%.cgi:%_cgi.o
78 $(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_SERVER_CGI)
79
80 $(SERVERPROGS_ABYSS):%:%.o
81 $(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_SERVER_ABYSS)
82
83 gen_sample_add_xml:%:%.o
84 $(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_BASE)
85
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, well, this is the rule that expands into the command that throws the error:



and it's obvious how it expands into the command line you see in your error message. So this is pretty straightforward stuff: you're asking for make to cd into the "cpp" directory before doing anything. Is there such a directory? If not, then, well, that's the problem -- why is there such a rule (the default rule, in fact) if there's no such directory that needs building?
 
Amit Basnak
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernest thanks again for your comments.
Well This makefile changes done by someone else and hes no loger in te company so Im looking into this.
I dont think it will affect if I comment this line
Thanks again
Amit
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you comment that line, then the makefile won't do anything at all, since cpp/all is the default target!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic