fix: noconfirm auto-selects first AUR match
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
extern "C" int foo(void);
|
||||
|
||||
int main(void) {
|
||||
return foo() != 42;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
int foo(void) {
|
||||
return 42;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
my_wonderful_function
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
|
||||
ifile = sys.argv[1]
|
||||
ofile = sys.argv[2]
|
||||
|
||||
templ = '''#pragma once
|
||||
|
||||
int %s(void) {
|
||||
return 42;
|
||||
}
|
||||
'''
|
||||
|
||||
funname = open(ifile).readline().strip()
|
||||
|
||||
open(ofile, 'w').write(templ % funname)
|
||||
@@ -0,0 +1,5 @@
|
||||
#include"funheader.h"
|
||||
|
||||
int main(void) {
|
||||
return my_wonderful_function() != 42;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
fp = find_program('genheader.py')
|
||||
|
||||
genh = custom_target('genh',
|
||||
input : 'funname',
|
||||
output : 'funheader.h',
|
||||
command : [fp, '@INPUT@', '@OUTPUT@'])
|
||||
|
||||
dep = declare_dependency(sources : [genh])
|
||||
|
||||
e = executable('genuser', 'main.c',
|
||||
dependencies : dep)
|
||||
test('genuser', e)
|
||||
@@ -0,0 +1,8 @@
|
||||
project('foo', 'c', 'cpp')
|
||||
|
||||
dep = declare_dependency(sources : 'foo.c')
|
||||
|
||||
executable('bar', 'bar.cpp',
|
||||
dependencies : dep)
|
||||
|
||||
subdir('generated')
|
||||
Reference in New Issue
Block a user