diff --git a/packages/debug/install b/packages/debug/install new file mode 100644 index 0000000000..8f2a590db9 --- /dev/null +++ b/packages/debug/install @@ -0,0 +1,6 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/install test +$SCRIPTS/install test-rpmatch \ No newline at end of file diff --git a/packages/debug/test-rpmatch/build b/packages/debug/test-rpmatch/build new file mode 100644 index 0000000000..a06dddbba7 --- /dev/null +++ b/packages/debug/test-rpmatch/build @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/build toolchain + +make -C $BUILD/$1 diff --git a/packages/debug/test-rpmatch/install b/packages/debug/test-rpmatch/install new file mode 100644 index 0000000000..ec574d26bb --- /dev/null +++ b/packages/debug/test-rpmatch/install @@ -0,0 +1,8 @@ +#!/bin/sh + +. config/options + +PKG_DIR=`find $PACKAGES -type d -name $1` + +mkdir -p $INSTALL/usr/bin +cp -f $BUILD/$1/test $INSTALL/usr/bin/test-rpmatch diff --git a/packages/debug/test-rpmatch/sources/Makefile b/packages/debug/test-rpmatch/sources/Makefile new file mode 100644 index 0000000000..ea4dfb40b3 --- /dev/null +++ b/packages/debug/test-rpmatch/sources/Makefile @@ -0,0 +1,14 @@ +CC ?= gcc +# CFLAGS = -static -Wall -g3 -ggdb3 -Os +LDFLAGS = + +SRCS = test.c +PROG = test + +all: $(PROG) + +$(PROG): $(SRCS) + $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ + +clean: + rm -f $(PROG) diff --git a/packages/debug/test-rpmatch/sources/test.c b/packages/debug/test-rpmatch/sources/test.c new file mode 100644 index 0000000000..70e486e4c9 --- /dev/null +++ b/packages/debug/test-rpmatch/sources/test.c @@ -0,0 +1,19 @@ +#define _SVID_SOURCE +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + if (argc != 2 || strcmp(argv[1], "--help") == 0) { + fprintf(stderr, "%s response", argv[0]); + exit(EXIT_FAILURE); + } + + setlocale(LC_ALL, ""); + printf("rpmatch() returns: %d", rpmatch(argv[1])); + exit(EXIT_SUCCESS); +} +