Preparing scripts for the "clean" target
This commit is contained in:
parent
5c500dfdc5
commit
03734e854a
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2012 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2012-2013 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -27,6 +27,8 @@
|
||||||
#variables
|
#variables
|
||||||
PREFIX="/usr/local"
|
PREFIX="/usr/local"
|
||||||
. "../config.sh"
|
. "../config.sh"
|
||||||
|
MODULE="$PACKAGE"
|
||||||
|
#executables
|
||||||
DEBUG="_debug"
|
DEBUG="_debug"
|
||||||
GTKDOC_FIXXREF="gtkdoc-fixxref"
|
GTKDOC_FIXXREF="gtkdoc-fixxref"
|
||||||
GTKDOC_MKDB="gtkdoc-mkdb"
|
GTKDOC_MKDB="gtkdoc-mkdb"
|
||||||
|
@ -35,7 +37,6 @@ GTKDOC_MKTMPL="gtkdoc-mktmpl"
|
||||||
GTKDOC_SCAN="gtkdoc-scan"
|
GTKDOC_SCAN="gtkdoc-scan"
|
||||||
INSTALL="install -m 0644"
|
INSTALL="install -m 0644"
|
||||||
MKDIR="mkdir -m 0755 -p"
|
MKDIR="mkdir -m 0755 -p"
|
||||||
MODULE="$PACKAGE"
|
|
||||||
RM="rm -f"
|
RM="rm -f"
|
||||||
TOUCH="touch"
|
TOUCH="touch"
|
||||||
|
|
||||||
|
@ -52,16 +53,20 @@ _debug()
|
||||||
#usage
|
#usage
|
||||||
_usage()
|
_usage()
|
||||||
{
|
{
|
||||||
echo "Usage: gtkdoc.sh [-i|-u][-P prefix] target" 1>&2
|
echo "Usage: gtkdoc.sh [-c|-i|-u][-P prefix] target..." 1>&2
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#main
|
#main
|
||||||
|
clean=0
|
||||||
install=0
|
install=0
|
||||||
uninstall=0
|
uninstall=0
|
||||||
while getopts "iuP:" "name"; do
|
while getopts "ciuP:" name; do
|
||||||
case "$name" in
|
case "$name" in
|
||||||
|
c)
|
||||||
|
clean=1
|
||||||
|
;;
|
||||||
i)
|
i)
|
||||||
uninstall=0
|
uninstall=0
|
||||||
install=1
|
install=1
|
||||||
|
@ -92,6 +97,9 @@ while [ $# -gt 0 ]; do
|
||||||
target="$1"
|
target="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
#clean
|
||||||
|
[ "$clean" -ne 0 ] && continue
|
||||||
|
|
||||||
#uninstall
|
#uninstall
|
||||||
if [ "$uninstall" -eq 1 ]; then
|
if [ "$uninstall" -eq 1 ]; then
|
||||||
for i in gtkdoc/html/*.*; do
|
for i in gtkdoc/html/*.*; do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user