Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
ex-y += ex.o
ex-y += a.o
ex-y += b.o
ex-y += b.o
ex-y += empty/
ex-y += empty2/
ex-y += inc.o
libex-y += c.o
libex-y += d.o
libex-y += arch/
+27
View File
@@ -0,0 +1,27 @@
# SPDX-License-Identifier: GPL-2.0
export srctree := $(abspath ../../../..)
export CC := gcc
export LD := ld
export AR := ar
ex:
include $(srctree)/tools/build/Makefile.include
ex: ex-in.o libex-in.o
$(CC) -o $@ $^
ex.%: fixdep FORCE
make -f $(srctree)/tools/build/Makefile.build dir=. $@
ex-in.o: fixdep FORCE
make $(build)=ex
libex-in.o: fixdep FORCE
make $(build)=libex
clean:
find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
rm -f ex ex.i ex.s
.PHONY: FORCE
+6
View File
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
int a(void)
{
return 0;
}
@@ -0,0 +1,2 @@
libex-y += e.o
libex-y += f.o
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
int e(void)
{
return 0;
}
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
int f(void)
{
return 0;
}
+6
View File
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
int b(void)
{
return 0;
}
+6
View File
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
int c(void)
{
return 0;
}
+6
View File
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
int d(void)
{
return 0;
}
@@ -0,0 +1,2 @@
This directory is left intentionally without Build file
to test proper nesting into Build-less directories.
+22
View File
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: GPL-2.0
int a(void);
int b(void);
int c(void);
int d(void);
int e(void);
int f(void);
int inc(void);
int main(void)
{
a();
b();
c();
d();
e();
f();
inc();
return 0;
}
+9
View File
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
#ifdef INCLUDE
#include "krava.h"
#endif
int inc(void)
{
return 0;
}
+70
View File
@@ -0,0 +1,70 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
function test_ex {
make -C ex V=1 clean > ex.out 2>&1
make -C ex V=1 >> ex.out 2>&1
if [ ! -x ./ex/ex ]; then
echo FAILED
exit -1
fi
make -C ex V=1 clean > /dev/null 2>&1
rm -f ex.out
}
function test_ex_suffix {
make -C ex V=1 clean > ex.out 2>&1
# use -rR to disable make's builtin rules
make -rR -C ex V=1 ex.o >> ex.out 2>&1
make -rR -C ex V=1 ex.i >> ex.out 2>&1
make -rR -C ex V=1 ex.s >> ex.out 2>&1
if [ -x ./ex/ex ]; then
echo FAILED
exit -1
fi
if [ ! -f ./ex/ex.o -o ! -f ./ex/ex.i -o ! -f ./ex/ex.s ]; then
echo FAILED
exit -1
fi
make -C ex V=1 clean > /dev/null 2>&1
rm -f ex.out
}
function test_ex_include {
make -C ex V=1 clean > ex.out 2>&1
# build with krava.h include
touch ex/krava.h
make -C ex V=1 CFLAGS=-DINCLUDE >> ex.out 2>&1
if [ ! -x ./ex/ex ]; then
echo FAILED
exit -1
fi
# build without the include
rm -f ex/krava.h ex/ex
make -C ex V=1 >> ex.out 2>&1
if [ ! -x ./ex/ex ]; then
echo FAILED
exit -1
fi
make -C ex V=1 clean > /dev/null 2>&1
rm -f ex.out
}
echo -n Testing..
test_ex
test_ex_suffix
test_ex_include
echo OK