| Author |
Error with make
|
Amit Basnak
Ranch Hand
Joined: Mar 15, 2004
Posts: 67
|
|
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
Joined: Jul 08, 2003
Posts: 24081
|
|
|
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.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Amit Basnak
Ranch Hand
Joined: Mar 15, 2004
Posts: 67
|
|
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
Joined: Jul 08, 2003
Posts: 24081
|
|
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
Joined: Mar 15, 2004
Posts: 67
|
|
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
Joined: Jul 08, 2003
Posts: 24081
|
|
|
If you comment that line, then the makefile won't do anything at all, since cpp/all is the default target!
|
 |
 |
|
|
subject: Error with make
|
|
|