[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

OBJS    = file1.o \
          file2.o \


                $(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

reply via email to

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