Ejemplo n.º 1
0
void print_deps_expr(struct expr *e)
{
  struct expr *left, *right;
  struct symbol *sym;

  left = e->left.expr;
  right = e->right.expr;
  sym = e->left.sym;

	switch (e->type) {
	case E_SYMBOL:
	case E_EQUAL:
	case E_UNEQUAL:
    print_deps(sym);
    return;

	case E_NOT:
    print_deps_expr(left);
    return;

	case E_OR:
	case E_AND:
    print_deps_expr(left);
    print_deps_expr(right);
    return;

  default:
    fprintf(stderr, "error: invalid expression type\n");
    exit(1);
	}
}
Ejemplo n.º 2
0
int main(int argc, char **argv)
{
	if (argc != 4)
		usage();

	depfile = argv[1];
	target  = argv[2];
	cmdline = argv[3];

	print_cmdline();
	print_deps();

	return 0;
}
Ejemplo n.º 3
0
int main(int argc, char *argv[])
{
	traps();

	if (argc == 5 && !strcmp(argv[1], "-e")) {
		insert_extra_deps = 1;
		argv++;
	} else if (argc != 4)
		usage();

	depfile = argv[1];
	target = argv[2];
	cmdline = argv[3];

	print_cmdline();
	print_deps();

	return 0;
}
Ejemplo n.º 4
0
int main(int argc, char *argv[])
{
	traps();

	if (argc != 4)
		usage();

	depfile = argv[1];
	target = argv[2];
	cmdline = argv[3];

	/* hack for U-Boot */
	if (!strncmp(target, "spl/", 4) || !strncmp(target, "tpl/", 4))
		is_spl_build = 1;

	print_cmdline();
	print_deps();

	return 0;
}
Ejemplo n.º 5
0
int
qdpll_main (int argc, char **argv)
{
  QDPLLResult result = QDPLL_RESULT_UNKNOWN;
  QDPLLApp app;
  memset (&app, 0, sizeof (QDPLLApp));
  set_default_options (&app);

  qdpll = qdpll_create ();

  parse_cmd_line_options (&app, qdpll, argc, argv);
  check_options (&app);
  set_signal_handlers (&app);

  if (app.options.print_usage)
    {
      print_usage ();
      cleanup (qdpll, &app);
      return result;
    }
  if (app.options.print_version)
    {
      print_version ();
      cleanup (qdpll, &app);
      return result;
    }

  if (app.options.max_time)
    alarm (app.options.max_time);

  parse (&app, qdpll, app.options.in, app.options.trace);

  if (app.options.pretty_print)
    {
      /* Call 'qdpll_gc' to clean up the formula by removing variables
         which have no occurrences and removing empty quantifier
         blocks. */
      qdpll_gc (qdpll);
      qdpll_print (qdpll, stdout);
    }
  else if (app.options.deps_only)
    {
      qdpll_init_deps (qdpll);
      if (app.options.print_deps)
        print_deps (&app, qdpll);
      if (app.options.dump_dep_graph)
        qdpll_dump_dep_graph (qdpll);
    }
  else
    {
        result = qdpll_sat (qdpll);
#if (COMPUTE_STATS || COMPUTE_TIMES)
        qdpll_print_stats (qdpll);
#endif
    }

  if (app.options.trace == TRACE_QRP)
    fprintf (stdout, "r ");
  else if (app.options.trace == TRACE_BQRP)
    fprintf (stdout, "%cr ", 0);

  print_result_message (&app, qdpll, result, stdout);

  cleanup (qdpll, &app);

  return result;
}