Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

req: help w/ makefile
Greetings,
I'm having a problem with my makefile.  It seems to not do a variable
substition for a prerequisite where I need it to happen.
See makefile below.  The problem occurs when I try to do this:
make buildall
I think it should try to build all dlls listed in the variable
dllfiles.  It does nothing instead.
I ran this with the -p option and the output shows no prerequisites for
buildall:

If I do "make component=shmem"
it works wonderfully.

What gives?
TIA,
Dave

This is a extreme simplification of my actual makefile, but still
displays the behavior described.

############### top of makefile ##############
.IGNORE:
.SUFFIXES: .mak .lib .dll

MAKEFILE = makefile
platform = linux
PLATFORM_CODE = LX

 ########################################
##
#
#   The assumption for this file is that
#   <component>$(PLATFORM_CODE)
#   is the name of the make file.
#
 ########################################
###
$(component) : $(component)$(PLATFORM_CODE).dll

buildall     : $(dllfiles)
@echo "Building all lib and shared lib targets"


dllfiles  = shmem$(PLATFORM_CODE).dll	\
sembb$(PLATFORM_CODE).dll

 ########################################
#######             #
#   Inference rules
#
 ########################################
#######
.mak.dll:
@echo "*********************************"
@echo "*********************************"
@echo Building $*.mak file
@$(COPY) BBVersionInfo.h productverinfo.h
@$(MAKE) -f $*.mak platform=$(platform) LIBTYPE=dll  all
############## end of makefile #################


Report this thread to moderator Post Follow-up to this message
Old Post
kaatzd@hotmail.com
09-18-04 02:00 AM


Re: req: help w/ makefile

"kaatzd@hotmail.com" wrote:
>
> Greetings,
> I'm having a problem with my makefile.  It seems to not do a variable
> substition for a prerequisite where I need it to happen.
> See makefile below.  The problem occurs when I try to do this:
> make buildall
> I think it should try to build all dlls listed in the variable
> dllfiles.  It does nothing instead.
> I ran this with the -p option and the output shows no prerequisites for
> buildall:
>
> If I do "make component=shmem"
> it works wonderfully.
>
> What gives?
> TIA,
> Dave
>
> This is a extreme simplification of my actual makefile, but still
> displays the behavior described.
>
> ############### top of makefile ##############
> .IGNORE:
> .SUFFIXES: .mak .lib .dll
>
> MAKEFILE = makefile
> platform = linux
> PLATFORM_CODE = LX
>
>  ########################################
##
> #
> #   The assumption for this file is that
> #   <component>$(PLATFORM_CODE)
> #   is the name of the make file.
> #
>  ########################################
###
> $(component) : $(component)$(PLATFORM_CODE).dll
>
> buildall     : $(dllfiles)
> @echo "Building all lib and shared lib targets"

At this point, "dllfiles" is not defined, so $(dllfiles) expands to
nothing. Move the definition of dllfiles so it appears above the
buildall line. Also, note that you must have a tab in front of the @echo
command or make will complain about "no separator".


>
> dllfiles  = shmem$(PLATFORM_CODE).dll   \
> sembb$(PLATFORM_CODE).dll
>
>  ########################################
#######             #
> #   Inference rules
> #
>  ########################################
#######
> .mak.dll:
> @echo "*********************************"
> @echo "*********************************"
> @echo Building $*.mak file
> @$(COPY) BBVersionInfo.h productverinfo.h
> @$(MAKE) -f $*.mak platform=$(platform) LIBTYPE=dll  all
> ############## end of makefile #################

--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94  (206)544-5225

Report this thread to moderator Post Follow-up to this message
Old Post
Fred L. Kleinschmidt
09-18-04 02:00 AM


Re: req: help w/ makefile
I thought I already replied to this - sorry if it shows up twice.
Thanks Fred,
Indeed you are correct, and I feel foolish for asking.  I thought I had
tried moving the variable assignment of dllfiles above, or the buildall
rule below, but apparently didn't do that.
Thanks again,
Dave


Report this thread to moderator Post Follow-up to this message
Old Post
kaatzd@hotmail.com
09-18-04 08:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:10 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.