New way of running configuration scripts
This commit is contained in:
parent
9518267e4c
commit
ecc4da49a6
|
@ -18,7 +18,7 @@ INSTALL = install
|
|||
all: $(TARGETS)
|
||||
|
||||
../data/Init.h: ../data/Init.interface
|
||||
./appbroker.sh "../data/Init.h"
|
||||
./appbroker.sh -P "$(PREFIX)" -- "../data/Init.h"
|
||||
|
||||
Init_OBJS = init.o main.o service.o session.o
|
||||
Init_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
|
||||
#usage
|
||||
usage()
|
||||
_usage()
|
||||
{
|
||||
echo "Usage: ./appbroker.sh target" 1>&2
|
||||
return 1
|
||||
|
@ -12,8 +12,28 @@ usage()
|
|||
|
||||
|
||||
#main
|
||||
args=`getopt P: $*`
|
||||
if [ $? -ne 0 ]; then
|
||||
_usage
|
||||
exit $?
|
||||
fi
|
||||
set -- $args
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-P)
|
||||
#we can ignore it
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
_usage
|
||||
exit $?
|
||||
fi
|
||||
APPINTERFACE="${1%%.h}.interface"
|
||||
|
|
Loading…
Reference in New Issue
Block a user