Re: Translate lines in Makefile
- From: John <jvasquez@xxxxxxx>
- Date: Mon, 18 Aug 2008 12:47:40 -0700
On Mon, 18 Aug 2008 11:06:21 -0400, "Richard B. Gilbert"
<rgilbert88@xxxxxxxxxxx> wrote:
John wrote:
On Thu, 14 Aug 2008 17:26:15 -0400, "Richard B. Gilbert"
<rgilbert88@xxxxxxxxxxx> wrote:
John wrote:
running Solaris 10There was an excellent book available from O'Reilly & Associates, Inc.
I have been task to modify a makefile using another makefile as an
example. I would like to understand what the heck I'm doing instead of
just copying line over from one make file to another.
The example makefile will compile a 32-bit and/or 64-bit driver. I
familiar with makefile but not an expert.
I would like to know what these line do?
ARCH:sh= uname -m #Assign the value sun4u to the variable ARCH
INST:sh= uname -p #Assign the value sparc to the variable INST
does sh= means to perform uname in a shell enviroment and set ARCH to
the output of uname -m? uname -m = sun4u - uname -p = sparc
What does the below translate to?
what dos MOD_CONF equate to? atds.conf?
does ARCH_OBJS equte to, "sparc/obj32" or "OBJS:sparc/obj32"? if
latter, then ARCH_MOD = 'atds:sparc/obj32/atds' Right?
MOD=atds # Assign the string value "atds" to MOD
MOD_CONF= $(MOD:%=%.conf)
OBJS= a.o bi.o c.o # Defines the names of three object files.
OBJ32=obj32 # String assignment
OBJ64=obj64
ARCH_OBJS= $(OBJS:%=$(INST)/$(OBJ32)/%) # String substitutions
ARCH_OBJS64= $(OBJS:%=$(INST)/$(OBJ64)/%)
ARCH_MOD = $(MOD:%=$(INST)/$(OBJ32)/$(MOD))
ARCH_MOD64= $(MOD:%=$(INST)/$(OBJ64)/$(MOD))
It's "Managing Projects With make" by Andrew Oram and Steve Talbot. My
copy is dated 1993. It appears to be out of print now but see:
http://oreilly.com/catalog/9780596006105/index.html
which appears to be a somewhat updated and retitled version.
Make is a very handy tool if you are building software from multiple
source files. It checks if the source is newer than any exist object
file and if an object file is newer than the executable. It compiles
exactly what needs to be compiled, and links it if necessary.
The larger the project, the more you will appreciate the capabilities of
make!
While you are waiting for your copy to arrive, man make might be of some
use.
I have ordered the book. However, can you translate the make
statements above?
John
It has been many long years since I needed make for anything. I've
added some comments above to indicate what I THINK is going on. I would
not recommend relying on my interpretation for anything important! If
it's important, I'd suggest hiring someone who KNOWS. So you pay a
consultant's outrageous fee for a few hours of his time. But you get
something you can rely on.
OTOH, my interpretation and advice may be worth somewhat less than it costs!
I think that this make file is intended to build software in both 32 bit
and 64 bit flavors. It looks as if it's intended to build for both the
SUN4U SPARC platform and the x86 platform. I don't have Solaris running
on the X86 platform so I can't predict the outcome of this being
executed on the X86 platform. I actually executed "uname -m" and "uname
-p" to see what results I got on the SPARC platform.
If you already have what this is supposed to build, executing the
makefile will rebuild it! This might be of some benefit. It might also
have negative value, e.g. it could break something.
BTW, comp.unix.solaris is probably NOT the best newsgroup in which to
look for help. You really want to talk to people who write software and
actually USE this tool. I don't know what group(s) to direct you to; my
interests these days are mostly system administration related.
Thanks for your response.
I'll check on other groups to see if I can find someone with current
knowledge of 'make'. I'll probably get the book before I find someone.
In the meantime, I'm also studying 'man make'
.
- References:
- Translate lines in Makefile
- From: John
- Re: Translate lines in Makefile
- From: Richard B. Gilbert
- Re: Translate lines in Makefile
- From: John
- Re: Translate lines in Makefile
- From: Richard B. Gilbert
- Translate lines in Makefile
- Prev by Date: OpenSolaris boot problem in VirtualBox
- Next by Date: Re: Configuring Raid
- Previous by thread: Re: Translate lines in Makefile
- Next by thread: Re: Problem with cfgadm and fc tape library
- Index(es):
Relevant Pages
|