mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
d36d0634db
We now guarantee TMPDIR will be defined on a per build rule basis. It'll be an absolute path. It'll be secure and unique. It'll be rm -rf'd after the last shell script line in your build rule is executed. If $TMPDIR is already defined, then it'll be created as a subdirectory of your $TMPDIR and then replace the variable with the new definition. The Landlock Make repository will be updated with examples shortly after this change which shall be known as Landlock Make 1.1.1. See #530
42 lines
1.6 KiB
C
42 lines
1.6 KiB
C
/* clang-format off */
|
|
/* Debugging macros and interface.
|
|
Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
|
This file is part of GNU Make.
|
|
|
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
|
terms of the GNU General Public License as published by the Free Software
|
|
Foundation; either version 3 of the License, or (at your option) any later
|
|
version.
|
|
|
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#include "libc/intrin/likely.h"
|
|
|
|
#define DB_NONE (0x000)
|
|
#define DB_BASIC (0x001)
|
|
#define DB_VERBOSE (0x002)
|
|
#define DB_JOBS (0x004)
|
|
#define DB_IMPLICIT (0x008)
|
|
#define DB_MAKEFILES (0x100)
|
|
|
|
#define DB_ALL (0xfff)
|
|
|
|
extern int db_level;
|
|
|
|
#define ISDB(_l) UNLIKELY((_l)&db_level)
|
|
|
|
/* When adding macros to this list be sure to update the value of
|
|
XGETTEXT_OPTIONS in the po/Makevars file. */
|
|
#define DBS(_l,_x) do{ if(ISDB(_l)) {print_spaces (depth); \
|
|
printf _x; fflush (stdout);} }while(0)
|
|
|
|
#define DBF(_l,_x) do{ if(ISDB(_l)) {print_spaces (depth); \
|
|
printf (_x, file->name); \
|
|
fflush (stdout);} }while(0)
|
|
|
|
#define DB(_l,_x) do{ if(ISDB(_l)) {printf _x; fflush (stdout);} }while(0)
|