2012-10-26 21:15:37 +08:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Copyright (c) 2003 SuSE Linux AG
|
|
|
|
*
|
|
|
|
* This program 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 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program 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 (see the file COPYING); if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
|
|
|
* MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum {
|
|
|
|
T_READY, T_RUNNING, T_FINISHED
|
|
|
|
};
|
|
|
|
|
|
|
|
/* target nodes */
|
|
|
|
struct makenode {
|
|
|
|
char *name;
|
|
|
|
char *arg0;
|
|
|
|
int num_deps;
|
|
|
|
struct makelist *depend;
|
|
|
|
int num_sels;
|
|
|
|
struct makelist *select;
|
|
|
|
int status;
|
|
|
|
struct makenode *next;
|
|
|
|
int interactive;
|
|
|
|
int importance;
|
2018-11-17 09:08:56 +08:00
|
|
|
int cycle_check_value;
|
2012-10-26 21:15:37 +08:00
|
|
|
int filter_prefix;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* dependency and selection list nodes */
|
|
|
|
struct makelist {
|
|
|
|
struct makenode *node;
|
|
|
|
struct makelist *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int tree_entries;
|
|
|
|
extern struct makenode *tree_list;
|
2014-04-10 16:15:05 +08:00
|
|
|
extern const char *initddir;
|
|
|
|
extern const char *etcdir;
|
2012-10-26 21:15:37 +08:00
|
|
|
|
2019-03-05 08:57:40 +08:00
|
|
|
extern int parse_makefile(const char *path);
|
2012-10-26 21:15:37 +08:00
|
|
|
extern void check_run_files(const char *action, const char *prev, const char *run);
|
|
|
|
extern struct makenode *pickup_task(void);
|
|
|
|
extern void finish_task(struct makenode *n);
|
|
|
|
extern void *xcalloc(size_t nmemb, size_t size);
|
|
|
|
extern void print_run_result(int *resvec, struct makenode **nodevec, const char *action);
|
|
|
|
|
|
|
|
#define alignof(type) ((sizeof(type)+(sizeof(void*)-1)) & ~(sizeof(void*)-1))
|
|
|
|
#define strsize(string) ((strlen(string)+1)*sizeof(char))
|