new package:

- add test-rpmatch package for debugging
This commit is contained in:
Stephan Raue 2009-09-28 14:05:20 +02:00
parent 01d242a4f0
commit 31cc68e8f8
5 changed files with 54 additions and 0 deletions

6
packages/debug/install Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
. config/options
$SCRIPTS/install test
$SCRIPTS/install test-rpmatch

View File

@ -0,0 +1,7 @@
#!/bin/sh
. config/options
$SCRIPTS/build toolchain
make -C $BUILD/$1

View File

@ -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

View File

@ -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)

View File

@ -0,0 +1,19 @@
#define _SVID_SOURCE
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
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);
}