File: wrapper.c

package info (click to toggle)
apt-build 0.12.27
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 348 kB
  • ctags: 73
  • sloc: perl: 671; ansic: 159; sh: 145; makefile: 88
file content (42 lines) | stat: -rw-r--r-- 864 bytes parent folder | download
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
42
/*
 * $Id: wrapper.c 2 2006-02-15 21:26:29Z acid $
 * wrapper.c - Wrapper for gcc and make used for apt-build
 * (c) 2004 - 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"

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

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);
}