While running make, I obtain the following error:
make: *** No rule to make target `amino_acid_par am.h', needed by
`pdb2txt_relax. o'. Stop.
I'm confused, since header files (*.h) shouldn't need rules because
they're not compiled. What can I do?
Below is the makefile. Note that this makefile calls another makefile, and
it seems the error comes from this fact.
# file makefile_pdb2tx t_relax
HOME = /users/seldon/jmborr
CODE = $(HOME)/Code
VPATH = $(CODE)/Heavy_atom_code :$(CODE)/PDBClasses
pdb2txt_relax.x : pdb2txt_relax.o amino_acid_para m.o \
atom_param.o miscellanea.o \
bibliography.o pdbClasses2.o
g++ -o pdb2txt_relax.x pdb2txt_relax.o \
amino_acid_para m.o atom_param.o \
miscellanea.o bibliography.o pdbClasses2.o
pdb2txt_relax.o : pdb2txt_relax.c pp amino_acid_para m.h \
atom_param.h miscellanea.h random.h
g++ -Wno-deprecated -c pdb2txt_relax.c pp
include $(CODE)/Heavy_atom_code/makefile_Heavy_ atom_code
PHONY : clean
clean :
rm -rf *.o core
#
Here below is the referred makefile
#file makefile_Heavy_ atom_code
HOME = /users/seldon/jmborr
CODE = $(HOME)/Code
VPATH = $(CODE)/PDBClasses
amino_acid_para m.o: amino_acid_para m.cpp amino_acid_para m.h miscellanea.h
g++ -Wno-deprecated -c amino_acid_para m.cpp
atom_param.o: atom_param.cpp atom_param.h miscellanea.h bibliography.h
g++ -Wno-deprecated -c atom_param.cpp
miscellanea.o: miscellanea.cpp miscellanea.h bibliography.h pdbClasses2.h
g++ -Wno-deprecated -c miscellanea.cpp
bibliography.o: bibliography.cp p bibliography.h
g++ -Wno-deprecated -c bibliography.cp p
include $(CODE)/makefile_PDBCla sses 6 2267
Note that this newsgroup is about the C++ programming language, and not
about any build tools, so you're clearly off-topic here.
jmborr wrote: While running make, I obtain the following error:
make: *** No rule to make target `amino_acid_par am.h', needed by `pdb2txt_relax. o'. Stop.
I'm confused, since header files (*.h) shouldn't need rules because they're not compiled. What can I do?
make doesn't know what a header file is. You just give it rules that
tell it which target files depend on which source files and how to
generate those targets from the sources. If a source file doesn't
exist, make in turn tries to find another rule that tells it how to
generate it from other sources.
You're specifying a file amino_acid_para m.h as source in some rules, but
that file doesn't seem to exist, so make tries to find a rule to build
that file, which you didn't provide.
"jmborr" <jm****@bu.ed u> wrote... While running make, I obtain the following error:
make: *** No rule to make target `amino_acid_par am.h', needed by `pdb2txt_relax. o'. Stop.
I'm confused, since header files (*.h) shouldn't need rules because they're not compiled. What can I do? [...]
Post to a newsgroup where this is on topic. comp.lang.c++ is about
C++ _language_, not about build tools. Those are usually platform-
specific. Try a UNIX newsgroup, a Linux newsgroup, or gnu.utils[.help]
V
Sorry ! I thought the posting was appropriate to the topic.
Thank you for the tips, anyway.
jose,
"jmborr" <jm****@bu.ed u> wrote: make: *** No rule to make target `amino_acid_par am.h', needed by `pdb2txt_relax. o'. Stop. ... pdb2txt_relax.o : pdb2txt_relax.c pp amino_acid_para m.h \ atom_param.h miscellanea.h random.h g++ -Wno-deprecated -c pdb2txt_relax.c pp
(This is slightly off-topic for this group, but I just
happen to know the cause and cure for your problem, so
here goes....)
Your make file says "compile amino_acid_para m.h as a
source file". Obviously not what you want.
What you need are separate lines to express header
dependencies, withOUT action lines immediately
below them:
pdb2txt_relax.o : amino_acid_para m.h atom_param.h
pdb2txt_relax.o : miscellanea.h random.h
pdb2txt_relax.o : pdb2txt_relax.c pp
(TAB) g++ -Wno-deprecated -c pdb2txt_relax.c pp
(TAB) echo pdb2txt_relax has been compiled.
Pay careful attention to the "(TAB)". "Action"
lines must always begin with an actual Tab character
(use your "Tab" key). Dependency lines must NOT
start with a Tab.
Note that you can have many dependency lines for one
target, but only one of these may have "action" lines
immediately under it. The dependency line with the
actions associated should list your source files,
and the dependency lines with NO actions associated
should list your headers. That way, you don't end up
trying to compile headers.
--
Cheers,
Robbie Hatley
Tustin, CA, USA lo**********@pa cbell.net http://home.pacbell.net/earnur/
Hi Robbie,
I split the dependencies into header ans source files as you
described, but with no success !
It seems the problem comes from the fact that I have the
header files in a different directories than the makefile.
I specified these directories in variable VPATH, but it seems this doesn't
work.
In the GNU-Make manual (pag 21), it says that "make" will search files
located in all directories specified in VPATH , but this is obviously not
working !
Anybody used VPATH before ?
jose,
###### makefile_pdb2tx t_relax #####
HOME = /users/seldon/jmborr
CODE = $(HOME)/Code
#VPATH = $(CODE)/Heavy_atom_code :$(CODE)/PDBClasses
VPATH = /users/seldon/jmborr/Code/Heavy_atom_code :$(CODE)/PDBClasses
pdb2txt_relax.x : pdb2txt_relax.o amino_acid_para m.o \
atom_param.o miscellanea.o \
bibliography.o pdbClasses2.o
g++ -o pdb2txt_relax.x pdb2txt_relax.o \
amino_acid_para m.o atom_param.o \
miscellanea.o bibliography.o pdbClasses2.o
pdb2txt_relax.o : amino_acid_para m.h atom_param.h pdb2txt_relax.o :
miscellanea.h random.h
pdb2txt_relax.o : pdb2txt_relax.c pp
g++ -Wno-deprecated -c pdb2txt_relax.c pp
echo pdb2txt_relax has been compiled
include $(CODE)/Heavy_atom_code/makefile_Heavy_ atom_code
PHONY : clean
clean :
rm -rf *.o core
######
Hi Robbie,
I split the dependencies into header ans source files as you
described, but with no success !
It seems the problem comes from the fact that I have the
header files in a different directories than the makefile.
I specified these directories in variable VPATH, but it seems this doesn't
work.
In the GNU-Make manual (pag 21), it says that "make" will search files
located in all directories specified in VPATH , but this is obviously not
working !
Anybody used VPATH before ?
jose,
###### makefile_pdb2tx t_relax #####
HOME = /users/seldon/jmborr
CODE = $(HOME)/Code
#VPATH = $(CODE)/Heavy_atom_code :$(CODE)/PDBClasses
VPATH = /users/seldon/jmborr/Code/Heavy_atom_code :$(CODE)/PDBClasses
pdb2txt_relax.x : pdb2txt_relax.o amino_acid_para m.o \
atom_param.o miscellanea.o \
bibliography.o pdbClasses2.o
g++ -o pdb2txt_relax.x pdb2txt_relax.o \
amino_acid_para m.o atom_param.o \
miscellanea.o bibliography.o pdbClasses2.o
pdb2txt_relax.o : amino_acid_para m.h atom_param.h pdb2txt_relax.o :
miscellanea.h random.h
pdb2txt_relax.o : pdb2txt_relax.c pp
g++ -Wno-deprecated -c pdb2txt_relax.c pp
echo pdb2txt_relax has been compiled
include $(CODE)/Heavy_atom_code/makefile_Heavy_ atom_code
PHONY : clean
clean :
rm -rf *.o core
###### This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Huey |
last post by:
Hi All,
I encountered a funny thing, and my code schetch as below:
#define READ 0
#define WRITE 1
int byteRead, status, pd;
char buff;
|
by: The Colonel |
last post by:
Man, just got a new drive and realized I have to now install THREE
versions of Visual Studio (6, 2003 & 2005). Why can I not use the
latest version to work with EVERYTHING? You know, "make as ..."? :)
OK maybe not for 6, but why can I not create 1.1 apps with 2005?
|
by: Steven Bethard |
last post by:
Ok, I finally have a PEP number. Here's the most updated version of the
"make" statement PEP. I'll be posting it shortly to python-dev.
Thanks again for the previous discussion and suggestions!
PEP: 359
Title: The "make" Statement
Version: $Revision: 45366 $
Last-Modified: $Date: 2006-04-13 07:36:24 -0600 (Thu, 13 Apr 2006) $
|
by: Steven Bethard |
last post by:
Felipe Almeida Lessa wrote:
> Em Sex, 2006-04-14 às 09:31 -0600, Steven Bethard escreveu:
>> Here's the code I used to test it.
>>
>> >>> def make(callable, name, args, block_string):
>> ... try:
>> ... make_dict = callable.__make_dict__
>> ... except AttributeError:
>> ... make_dict = dict
>> ... block_dict = make_dict()
|
by: Eric West |
last post by:
First, thanks for taking the time to read this message.
I am trying to build a LAMP stack for the first time, and have
encountered the following problem:
CentOS 4.3
mysql 4.1.20
apache 2.2.3
php 5.1.6
| |
by: inetquestion |
last post by:
php has been configured with the following two configure lines and
core's during "make install" on the PEAR section. Is there something
simple i'm missing? Any help would be appreciated.
Environment:
Solaris 9
php 5.2.1
GNU Make 3.81
gcc 4.1.1
|
by: somyav |
last post by:
Hi,
I need some guidance on how to turn in the java programs as a executable. My requirement is this: I have a package(with .java and .class files) that I am sending it to my clients. They want the file to be sent as JAR. They need a makefile in it so that they can invoke make command to compile the project. To run the project, they want to give a name project1. Also this project1 should be able to be invoked from any directory.
Can anybody...
|
by: jaime |
last post by:
Hi again all.
Given the line:
const int x=5;
Can I then use "x" as a constant expression? (By "constant expression", I
mean "constant expression" as defined in the C99 standard)
I've been searching google for 2 days now trying to answer this myself,
and I'm just getting more and more confused (some things I read make me
think "yes", while some things I read make me think "no").
|
by: jcor |
last post by:
Hi, I'm trying the "make distclean" comand. but I allways get this error:
if I use the "make clean" I get the same error.
Can someone teach me to use this commands, please?
Thanks a lot,
João
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |