[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Value of $? not set in archive rules
From: |
Robert E. Menteer II |
Subject: |
Value of $? not set in archive rules |
Date: |
Wed, 19 Sep 2001 12:10:04 -0400 |
The following is part of a make file to update a library. The source files
for the library reside in multiple directories with each directory
responsible to make it's modules and place them in the library. The problem
I'm having is with the $? variable, it is supposed to contain a list of all
prerequisites that are newer the target. When the library does not exist
everything works as expected. If the library does exist but the specific
module does not the module gets compiled but is not included in $? and so is
not placed in the library.
LIBROOT = mylib.a
LIBRARY = ../$(PLATFORM)/$(LIBROOT)
OBJS = file1.o \
file2.o \
file3.o
LIBOBJS = $(OBJS:%=$(LIBRARY)(%))
$(LIBRARY): $(LIBOBJS)
$(AR) r $@ $?
$(RM) $?
(%.o): %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $*.o
____________________________________________
Robert E. Menteer II
Senior Programmer/Analyst
wmsVision, Inc. (http://www.wmsvision.com)
1016 Copeland Oak Drive, Morrisville, NC 27560, USA.
Tel: (919) 863-3388 ext. 225
Fax: (919) 863-3389
E-mail: mailto:address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Value of $? not set in archive rules,
Robert E. Menteer II <=