[BACK]Return to arch.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Annotation of src/usr.bin/make/arch.h, Revision 1.6

1.1       espie       1: #ifndef ARCH_H
                      2: #define ARCH_H
1.6     ! espie       3: /*     $OpenBSD: arch.h,v 1.5 2010/07/19 19:30:37 espie Exp $ */
1.1       espie       4:
                      5: /*
                      6:  * Copyright (c) 2001 Marc Espie.
                      7:  *
                      8:  * Redistribution and use in source and binary forms, with or without
                      9:  * modification, are permitted provided that the following conditions
                     10:  * are met:
                     11:  * 1. Redistributions of source code must retain the above copyright
                     12:  *    notice, this list of conditions and the following disclaimer.
                     13:  * 2. Redistributions in binary form must reproduce the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer in the
                     15:  *    documentation and/or other materials provided with the distribution.
                     16:  *
                     17:  * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
                     18:  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
                     19:  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
                     20:  * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OPENBSD
                     21:  * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
                     22:  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
                     23:  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     24:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     25:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     26:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
                     27:  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     28:  */
                     29:
                     30: /*-
                     31:  * arch --
                     32:  *     Functions to manipulate libraries, archives and their members.
                     33:  */
                     34:
                     35: #ifndef TIMESTAMP_TYPE
                     36: #include "timestamp_t.h"
                     37: #endif
                     38:
                     39: /* Initialization and cleanup */
                     40: extern void Arch_Init(void);
                     41: #ifdef CLEANUP
                     42: extern void Arch_End(void);
                     43: #else
                     44: #define Arch_End()
                     45: #endif
                     46:
                     47: /* ok = Arch_ParseArchive(&begin, nodeLst, ctxt);
                     48:  *     Given an archive specification, add list of corresponding GNodes to
1.2       espie      49:  *     nodeLst, one for each member in the spec.
1.1       espie      50:  *     false is returned if the specification is invalid for some reason.
                     51:  *     Side-effect: begin is bumped to the end of the specification.  */
1.4       espie      52: extern bool Arch_ParseArchive(const char **, Lst, SymTable *);
1.1       espie      53: /* Arch_Touch(node);
1.2       espie      54:  *     Alter the modification time of the archive member described by node
1.1       espie      55:  *     to the current time.  */
                     56: extern void Arch_Touch(GNode *);
                     57: /* Arch_TouchLib(node);
1.2       espie      58:  *     Update the modification time of the library described by node.
1.1       espie      59:  *     This is distinct from Arch_Touch, as it also updates the mtime
                     60:  *     of the library's table of contents.  */
                     61: extern void Arch_TouchLib(GNode *);
1.3       espie      62: /* stamp = Arch_MTime(node);
1.1       espie      63:  *     Find the modification time of a member of an archive *in the
                     64:  *     archive*, and returns it.
                     65:  *     The time is also stored in the member's GNode.  */
                     66: extern TIMESTAMP Arch_MTime(GNode *);
1.3       espie      67: /* stamp = Arch_MemMTime(node);
1.2       espie      68:  *     Find the modification time of a member of an archive and returns it.
1.1       espie      69:  *     To use when the member only exists within the archive.  */
                     70: extern TIMESTAMP Arch_MemMTime(GNode *);
                     71: /* Arch_FindLib(node, path);
                     72:  *     Search for a library node along a path, and fills the gnode's path
                     73:  *     field to the actual complete path. If we don't find it, we set the
                     74:  *     library name to libname.a, assuming some other mechanism will take
                     75:  *     care of finding it.  The library name should be in -l<name> format.  */
                     76: extern void Arch_FindLib(GNode *, Lst);
                     77: /* bool = Arch_LibOODate(node);
                     78:  *     Decide whether a library node is out-of-date. */
                     79: extern bool Arch_LibOODate(GNode *);
                     80:
                     81: /* bool = Arch_IsLib(node);
                     82:  *     Decide whether a node is a library.  */
                     83: extern bool Arch_IsLib(GNode *);
                     84:
                     85: #endif