/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1984-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* make archive access routines
*/
#include "make.h"
#include <ardir.h>
/*
* return the update command for the named archive
*/
char*
{
char* update;
update = "$(RANLIB) $(<)";
{
return 0;
update = 0;
ardirclose(ar);
}
return update;
}
/*
* walk through an archive
* d==0 updates the modify time of preselected members (see artouch())
* else each member is recorded using addfile()
*/
static int
{
register Rule_t* r;
if (d)
{
}
{
if (d)
{
addfile(d, ent->name, ((r = staterule(RULE, NiL, ent->name, -1)) && ent->mtime == tmxsec(r->time)) ? r->time : tmxsns(ent->mtime, 0));
}
{
ntouched--;
}
}
return 0;
}
/*
* check for any untouched r->status==TOUCH members
*/
static int
chktouch(const char* s, char* v, void* h)
{
NoP(s);
NoP(h);
{
}
return 0;
}
/*
* touch the modify time of an archive member (and the archive itself!)
*/
void
{
register Rule_t* r;
if (member)
{
else
{
ntouched++;
}
}
{
if (ardirclose(ar))
if (ntouched > 0)
{
}
ntouched = 0;
}
}
/*
* scan archive r and record all its entries
*/
void
{
Dir_t* d;
return;
else if (!(d = unique(r)))
{
d->archive = 1;
}
{
d->archive = 1;
else
if (ardirclose(ar))
}
else
}