AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<larry.scheer@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E056C969D@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 10 Jun 2008 13:22:24 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Larry Scheer" <larry.scheer@onstor.com>
Subject: Re: review of 29513
Message-ID: <20080610132224.5452e469@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E056C969D@onstor-exch02.onstor.net>
References: <20080609201417.56f7599e@ripper.onstor.net>
	<BB375AF679D4A34E9CA8DFA650E2B04E056C969D@onstor-exch02.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Thanks.

On Tue, 10 Jun 2008 12:28:23 -0700 "Larry Scheer"
<larry.scheer@onstor.com> wrote:

> Ok to check in.
> 
> -----Original Message-----
> From: Andy Sharp 
> Sent: Monday, June 09, 2008 8:14 PM
> To: Larry Scheer
> Subject: Re: review of 29513
> 
> Allright, it looks like just the one install rule was needed, so I
> added that and it seems to work.
> 
> 
> On Mon, 9 Jun 2008 19:57:00 -0700 "Larry Scheer"
> <larry.scheer@onstor.com> wrote:
> 
> > I was in the middle of several things and I didn't look at this
> > closely.
> > 
> > I wanted to use the APP macro because using it give you a bunch of
> > targets for free, including the install target.
> > 
> > The problem is the APP rule is a gcc link operation. This eliminates
> > using the APP macro with a script. Changing APP to SCRIPT we lost
> > the a bunch of target rules.
> > 
> > Here is a Makefile that works. (I tested it ;-) It is only a bit
> > different from what you currently have. It will work with recursive
> > make commands from the top of the tree as well as locally.
> > 
> > Also with a few minor changes  it will work with your C program when
> > it is ready.
> > 
> > Larry
> > 
> > P.S.
> > You can
> > copy:
> /home/larrys/perforce/trees/dev/nfx-tree/code/ssc-cfmond/Makefile
> > on ripper to your workspace.
> > 
> > Here is the file in-line (note tabs will be missing...)
> > 
> > 
> > # Copyright (c) 2000 - 2008 ONStor Inc..
> > # ALL RIGHTS RESERVED
> > 
> > PATH_TO_ROOT    := ../..
> > 
> > include $(PATH_TO_ROOT)/Tools/init-ssc.mk
> > 
> > include $(PATH_TO_ROOT)/Tools/defs.mk
> > 
> > SCRIPT  := cfmond.sh
> > 
> > TARGETS := $(BINDIR)/$(SCRIPT)
> > 
> > default install all: $(BINDIR) $(TARGETS)
> > 
> > $(TARGETS): $(SCRIPT)
> >         install -o $(BINOWN) -g $(BINGRP) -m 555  $< $@
> > 
> > #get the clean targets
> > 
> > include $(PATH_TO_TOOLS)/suffix.mk
> > 
> > 
> > ========
> > $ make install
> > make: *** No rule to make target `install'.  Stop.
> > $ make        
> > make: Nothing to be done for `DO_THIS_FIRST'.
> > 
> > 
> > On Mon, 9 Jun 2008 15:19:26 -0700 "Larry Scheer"
> > <larry.scheer@onstor.com> wrote:
> > 
> > > APP might be overloaded because it is meant to be c program with a
> > > main. I was hoping to use it in the Makefile and then when you
> > > have cfmond.c done then we could just plug in the source list and
> > > you are done.
> > > 
> > > Ok two more changes... 
> > > 
> > > 1. Remove TARGET_EXT line 
> > > 
> > > 2. Globally change APP to SCRIPT and that should do it. 
> > > 
> > > Just make sure cfmond.sh gets added to perforce with the execute
> > > bit set and copied into the bin directory with the execute bit
> > > set. If it doesn't then we need to tweak the Makefile one more
> > > time.
> > > 
> > > 
> > > -----Original Message-----
> > > From: Andy Sharp 
> > > Sent: Monday, June 09, 2008 3:01 PM
> > > To: Larry Scheer
> > > Subject: Re: review of 29513
> > > 
> > > CRAP.  I stared right at that for 5 minutes and didn't see it.
> > > 
> > > I had to change the APP = cfmond stuff because it was trying to
> > > compile the .sh file as a C file; now it does this:
> > > 
> > > $ make install
> > > /usr/bin/sudo chown root:7 ../../Build/cg/opt/bin/cfmond.sh
> > > chown: cannot access `../../Build/cg/opt/bin/cfmond.sh': No such
> > > file or directory
> > > make: *** [install] Error 1
> > > 
> > > 
> > > 
> > > On Mon, 9 Jun 2008 14:51:43 -0700 "Larry Scheer"
> > > <larry.scheer@onstor.com> wrote:
> > > 
> > > > There was a typo on line 15 probably a bad cut and paste
> > > > 
> > > > Change from:
> > > > 
> > > > $(TARGETS) := $(BINDIR)/$(APP)$(TARGET_EXT)
> > > > 
> > > > Change to:
> > > > 
> > > > TARGETS := $(BINDIR)/$(APP)$(TARGET_EXT)
> > > > 
> > > > -----Original Message-----
> > > > From: Andy Sharp 
> > > > Sent: Monday, June 09, 2008 2:36 PM
> > > > To: Larry Scheer
> > > > Subject: Re: review of 29513
> > > > 
> > > > On Mon, 9 Jun 2008 12:19:43 -0700 "Larry Scheer"
> > > > <larry.scheer@onstor.com> wrote:
> > > > 
> > > > > Sorry some typos in what I last sent to you. Also a line got
> > > > > dropped out.
> > > > > 
> > > > > TARGETS	:= $(BINDIR)/$(APP)$(TARGET_EXT)
> > > > > 
> > > > > $(TARGETS): $(APP)$(TARGET_EXT)
> > > > 
> > > > $ make install
> > > > Makefile:15: *** empty variable name.  Stop.
> > > > 
> > > > I attached the makefile
> > > > 
> > > > > -----Original Message-----
> > > > > From: Andy Sharp 
> > > > > Sent: Monday, June 09, 2008 12:13 PM
> > > > > To: Larry Scheer
> > > > > Subject: Re: review of 29513
> > > > > 
> > > > > On Mon, 9 Jun 2008 12:05:07 -0700 "Larry Scheer"
> > > > > <larry.scheer@onstor.com> wrote:
> > > > > 
> > > > > > nfx-tree/code/ssc-cfmond/Makefile
> > > > > > 
> > > > > >      >>add nfx-tree/code/ssc-cfmond/Makefile
> > > > > > 
> > > > > > Add theese:
> > > > > >      INSTALL_TARGETS := $(TARGETS)
> > > > > > 
> > > > > >      $(TARGETS): $APP$(TARGET_EXT)
> > > > > > 
> > > > > > change to this:
> > > > > >      default all: $(BINDIR) $(INSTALL_TARGETS)
> > > > > > 
> > > > > 
> > > > > ssc-cfmond$ make install
> > > > > make: *** No rule to make target
> > > > > `../../Build/cg/opt/bin/cfmond', needed by `install'.  Stop.
> > 
