make question

Will Nelson will at genbank.bio.net
Mon Oct 8 07:30:00 AEST 1990


I have a Makefile for a library of source that I must maintain for two
different architectures, sun3 and sun4.  The Makefile does pretty much
what I want it to do, but it insists on re-running "ar" on subsequent
invocations, ie, I have made no source changes between builds. Anybody
have any idea what changes I need to make to keep make from re-running
"ar" unnecessarily?

ARCH          = `arch`
VARIANT       =

ROOT          = ../..
BIN           = ${ROOT}/${ARCH}bin
LIB           = ${ROOT}/${ARCH}lib
INSTALLBIN    = /usr/local/bin

SYBINC        = /usr/local/sybase/include
SYBLIB        = /usr/local/sybase/lib

IFLAGS        = -I../../include -I${SYBINC}
DFLAGS        =
CFLAGS        = -Bstatic -g ${IFLAGS} ${DFLAGS}
LDFLAGS       = -Bstatic -g
ARFLAGS       = cr

CC            = cc
CPP           = /lib/cpp
MAKE          = make
INCLUDES      = ${BIN}/includes
LD            = cc
AR            = ar

MAKEFILE      = Makefile

HDRDIR = ${INCDIR}/local

PRIVATES = libgb.a

TAGFILE = ${LIBDIR}/tags

PUBS =  ${LIB}/libgb.a \
        ${TAGFILE}

#
# sources and objects -- add a line to each section when adding a module
#

SRCS =    argnxt.c \
          authrf.c \
          basrf.c \
          blnk.c \
          cbufa.c \
          cktail.c \
          csho.c \
          ctolow.c \
          ctoup.c \
          divck.c \
          drive.c \
          errj.c \
          feacpy.c \
          feaform.c \
          feapars.c \
          fearf.c \
          filext.c \
          flstxt.c \
          fndaa_at.c \
          fset.c \
          gbky.c \
          getline.c \
          getlock.c \
          getnumb.c \
          gettlin.c \
          indxl.c \
          indxlci.c \
          indxr.c \
          issyma.c \
          issymn.c \
          joinsym.c \
          jourrf.c \
          keyrf.c \
          last.c \
          locex.c \
          locrf.c \
          lstlk.c \
          mpmfnam.c \
          mtchu.c \
          nxtsym.c \
          orgfind.c \
          pack0.c \
          pack1.c \
          packt.c \
          pad.c \
          parsym.c \
          seq.c \
          seqrf.c \
          seqw.c \
          sign.c \
          skyck.c \
          sqcpy.c \
          sqmtch.c \
          strcap.c \
          strcic.c \
          strfil.c \
          strncic.c \
          strsho.c \
          strsub.c \
          translate.c \
          updrf.c

OBJS =    argnxt.o \
          authrf.o \
          basrf.o \
          blnk.o \
          cbufa.o \
          cktail.o \
          csho.o \
          ctolow.o \
          ctoup.o \
          divck.o \
          drive.o \
          errj.o \
          feacpy.o \
          feaform.o \
          feapars.o \
          fearf.o \
          filext.o \
          flstxt.o \
          fndaa_at.o \
          fset.o \
          gbky.o \
          getline.o \
          getlock.o \
          getnumb.o \
          gettlin.o \
          indxl.o \
          indxlci.o \
          indxr.o \
          issyma.o \
          issymn.o \
          joinsym.o \
          jourrf.o \
          keyrf.o \
          last.o \
          locex.o \
          locrf.o \
          lstlk.o \
          mpmfnam.o \
          mtchu.o \
          nxtsym.o \
          orgfind.o \
          pack0.o \
          pack1.o \
          packt.o \
          pad.o \
          parsym.o \
          seq.o \
          seqrf.o \
          seqw.o \
          sign.o \
          skyck.o \
          sqcpy.o \
          sqmtch.o \
          strcap.o \
          strcic.o \
          strfil.o \
          strncic.o \
          strsho.o \
          strsub.o \
          translate.o \
          updrf.o

#
#  added suffix rules for RCS
#  (DO NOT CHANGE THIS SECTION)
#

.SUFFIXES: .c,v

.c,v.c:
	co $*.c

#
#  the library itself
#  (DO NOT CHANGE THIS SECTION)
#

all:	${ARCH} ${LIB}/libgb.a

${ARCH}:	FORCE
	@test -d ${BIN} || mkdir ${BIN}
	@test -d ${LIB} || mkdir ${LIB}
	@test -d $@ || mkdir $@

${LIB}/libgb.a: ${OBJS}
	cd ${ARCH}; ${AR} ${ARFLAGS} libgb.a ${OBJS}
	cd ${ARCH}; if test -f /usr/bin/ranlib ; then ranlib libgb.a ; fi
	mv ${ARCH}/libgb.a ${LIB}

$${VARIANT}%.o:	%.c
	${COMPILE.c} $< -o $@
	cp $*.o ${ARCH}

${TAGFILE}: Makefile
	cd ${LIBDIR}; ${MAKE} tags

FORCE:

-- 
Will Nelson			Internet: will at presto.ig.com
Intelligenetics, Inc.		Uucp:     ames!ig.com!presto!will
700 East El Camino Real		(415) 962-7363
Mountain View, CA  94040



More information about the Comp.sys.sun mailing list