Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: shivrajang@yahoo.com (Shiva Gowda)
Subject: make command problem with dependencies..!
Date: 18 Oct 2001 05:02:10 -0700	[thread overview]
Message-ID: <c8246df4.0110180402.764c9a26@posting.google.com> (raw)

Hello Gurus...

Not sure this is the right place for make command problem! If not please
redirect me to the right list!!!

I have a problem with one of my Makefile. here is the makefile

$ sizer -v
Digital UNIX V4.0G (Rev. 1530); Thu Dec  7 13:46:52 MET 2000
$ ls  
Makefile      _defaultRule  header.h      hello.c
$ cat _defaultRule
.SUFFIXES : .c

local : $(DELIVER)

.c : $$@.c $(INCLUDE_FILES)
        cc -o $@ $@.c

$ cat Makefile
INCLUDE_FILES=\
        header.h

DSOURCE=\
        hello.c

DELIVER=$(DSOURCE:.c=)

include _defaultRule

clean :: 
        rm -f hello

$ cat header.h
#include <stdio.h>

#define MESSAGE "Hello, World!\n"

$ cat hello.c
#include "header.h"

main() {

        printf("%s", MESSAGE);

}
--------------------------------------------------------

the steps below shows the problem.

$ type make
make is a tracked alias for /bin/make
$ make local
cc -o hello hello.c
$ echo "#define DAY MONTAG" >> header.h
$ make local
$ make clean
rm -f hello
$ /usr/bin/posix/make local
cc -o hello hello.c
$ echo "#define DAY1 MONTAG" >> header.h
$ /usr/bin/posix/make local
cc -o hello hello.c
$

I'm using echo just to update one of the dependency, here it is header.h.
my question is: why hello.c file not gets compiled when there is a change 
in the dependency with base make? 

Not sure the problem is with my Makefile or with the base make. It works 
the way I wanted with posix make. I don't want to use posix make as the build
environmet uses base make. So.....any workaround otherthan posix make???

thx a lot..

-shiva


             reply	other threads:[~2001-10-18 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18 12:02 Shiva Gowda [this message]
2001-10-19  8:55 ` make command problem with dependencies..! Shiva Gowda
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox