help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on make....


From: Paul D. Smith
Subject: Re: Question on make....
Date: Thu, 15 Nov 2001 12:56:37 -0500

%% Jay Walther <address@hidden> writes:

  >> that I am having is that the dependencies are not being see when I
  >> recompile, and changed source files are not being recompiled,
  >> unless I delete the .o file.

When sending attachments please try to pick an appropriate attachment
type; just using "untyped/binary" isn't very helpful.  Also, reducing
the size of the makefile to something simple that still reproduces your
problem makes it easier for people to help you.

I'm assuming this version of make is actually GNU make; if not you're
asking in the wrong place.  The syntax looks like GNU make, except for
this:

   .SOURCE.o :- $(OBJDIR)               # where to find object files.

isn't almost certainly not doing what you think it is.

Anyway, I suspect that your problem is that you're
misusing/misunderstanding VPATH.  For example, this combination:

  vpath %.o obj ..\68hc11.lib\obj
    ...
  CCFLAGS = -co $(OBJDIR) -cl $(LSTDIR) -v -l   +debug -i$(SYSINCDIR)
    ...
  %.o : %.s
          @$(ECHO) ---------------------------------------------- ASM $*
          @$(AS) -o $(OBJDIR)\$*.o $(ASFLAGS) $*.s
          @$(CP) *.ls $(LSTDIR)
          @$(RM) *.ls

Will absolutely not work.  You cannot create a target file someplace
other than make expects it to go.  Make will always expect you to create
the target file "$@", never $(OBJDIR)/$@ or whatever.

VPATH does not allow you to tell make where to find or put _TARGETS_.
It _only_ allows you to tell make where to find _PREREQUISITES_.

See my web page below for some more docs that may help explain this.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

[Prev in Thread] Current Thread [Next in Thread]