File: wrapper.c

package info (click to toggle)
apt-build 0.12.49
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 436 kB
  • sloc: perl: 715; sh: 263; ansic: 168; makefile: 44
file content (41 lines) | stat: -rw-r--r-- 836 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * wrapper.c - Wrapper for gcc and make used for apt-build
 * (c) 2004-2008 - Julien Danjou <acid@debian.org>
 * (c) 2005 - Raphael Bossek <bossekr@debian.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2, as
 * published by the Free Software Foundation.
 *
 */


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include "apt-build.h"
#include "config.h"

static int
gcc_real (char **argv)
{
  filterout_libdir_path();
  return execvp (basename (argv[0]), argv);
}

static int
gcc_apt_build (int argc, char **argv)
{
  return gcc_real (parse_conf (argc, argv));
}

int
main (int argc, char **argv)
{
  if (getenv (APT_BUILD_STRING_ENV))
    return gcc_apt_build (argc, argv);

  return gcc_real (argv);
}