]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: move getopt to misc-utils/
authorKarel Zak <kzak@redhat.com>
Tue, 26 Jun 2012 16:17:22 +0000 (18:17 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 26 Jun 2012 18:48:23 +0000 (20:48 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
Makefile.am
configure.ac
getopt/.gitignore [deleted file]
getopt/COPYING [deleted file]
getopt/Makefile.am [deleted file]
misc-utils/Makemodule.am
misc-utils/getopt-parse.bash [moved from getopt/getopt-parse.bash with 98% similarity, mode: 0644]
misc-utils/getopt-parse.tcsh [moved from getopt/getopt-parse.tcsh with 97% similarity, mode: 0644]
misc-utils/getopt.1 [moved from getopt/getopt.1 with 100% similarity]
misc-utils/getopt.c [moved from getopt/getopt.c with 99% similarity]

index 3933d1e807dde696f9010eb58364f40cf952c3d0..825df74a22885beec9834676eb2fcca18f5f997c 100644 (file)
@@ -29,7 +29,6 @@ SUBDIRS = \
        $(MAN_DIRS) \
        disk-utils \
        fdisk \
-       getopt \
        po \
        tests
 
index 49f4d2e5e6001366a013f75f20d3ea97775ab2cc..a2133618bc3f27191e2cab845e043e6dcb298ee0 100644 (file)
@@ -1287,7 +1287,6 @@ AC_CONFIG_FILES([
 Makefile
 disk-utils/Makefile
 fdisk/Makefile
-getopt/Makefile
 libblkid/blkid.pc
 libblkid/docs/Makefile
 libblkid/docs/version.xml
diff --git a/getopt/.gitignore b/getopt/.gitignore
deleted file mode 100644 (file)
index d3e0b2d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-getopt
diff --git a/getopt/COPYING b/getopt/COPYING
deleted file mode 100644 (file)
index be70cde..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-The getopt is explicitly licensed under GNU General Public License,
-version 2 terms.
-
-The complete text of the license is available at the
-Documentation/licenses/COPYING.GPLv2 file.
diff --git a/getopt/Makefile.am b/getopt/Makefile.am
deleted file mode 100644 (file)
index f0602b4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(top_srcdir)/config/include-Makefile.am
-
-usrbin_exec_PROGRAMS = getopt
-dist_man_MANS = getopt.1
-
-exampledir = $(datadir)/getopt/
-dist_example_SCRIPTS = getopt-parse.bash getopt-parse.tcsh
index d0c9b4ce81f5b49ef0bc4c08e3639cb977a7dcc6..222ac0303101094303a32236f6cd0664ad7446c9 100644 (file)
@@ -189,3 +189,11 @@ usrbin_exec_PROGRAMS += rename
 dist_man_MANS += misc-utils/rename.1
 rename_SOURCES = misc-utils/rename.c
 endif
+
+usrbin_exec_PROGRAMS += getopt
+dist_man_MANS += misc-utils/getopt.1
+getopt_SOURCES = misc-utils/getopt.c
+getoptexampledir = $(datadir)/getopt/
+dist_getoptexample_SCRIPTS = \
+       misc-utils/getopt-parse.bash \
+       misc-utils/getopt-parse.tcsh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from getopt/getopt-parse.bash
rename to misc-utils/getopt-parse.bash
index 864fc0a..29e7f6f
@@ -16,7 +16,7 @@
 # --> `another arg'
 # --> `wow!*\?'
 
-# Note that we use `"$@"' to let each command-line parameter expand to a 
+# Note that we use `"$@"' to let each command-line parameter expand to a
 # separate word. The quotes around `$@' are essential!
 # We need TEMP as the `eval set --' would nuke the return value of getopt.
 TEMP=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
@@ -31,7 +31,7 @@ while true ; do
        case "$1" in
                -a|--a-long) echo "Option a" ; shift ;;
                -b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;;
-               -c|--c-long) 
+               -c|--c-long)
                        # c has an optional argument. As we are in quoted mode,
                        # an empty parameter will be generated if its optional
                        # argument is not found.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from getopt/getopt-parse.tcsh
rename to misc-utils/getopt-parse.tcsh
index 2266d0e..408c470
@@ -27,7 +27,7 @@
 # each element of argv becomes a separate argument for getopt. The braces
 # are needed because the result is also a list.
 set temp=(`getopt -s tcsh -o ab:c:: --long a-long,b-long:,c-long:: -- $argv:q`)
-if ($? != 0) then 
+if ($? != 0) then
   echo "Terminating..." >/dev/stderr
   exit 1
 endif
@@ -41,7 +41,7 @@ while (1)
        switch($1:q)
        case -a:
        case --a-long:
-               echo "Option a" ; shift 
+               echo "Option a" ; shift
                breaksw;
        case -b:
        case --b-long:
similarity index 100%
rename from getopt/getopt.1
rename to misc-utils/getopt.1
similarity index 99%
rename from getopt/getopt.c
rename to misc-utils/getopt.c
index 4ba3401934b8a4221d8aad8408187561fd96cc64..0efe5d862a68a14574fd736bea70059d48c06628 100644 (file)
@@ -17,9 +17,9 @@
  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-/* 
+/*
  * Version 1.0-b4: Tue Sep 23 1997. First public release.
- * Version 1.0: Wed Nov 19 1997. 
+ * Version 1.0: Wed Nov 19 1997.
  *   Bumped up the version number to 1.0
  *   Fixed minor typo (CSH instead of TCSH)
  * Version 1.0.1: Tue Jun 3 1998
@@ -33,7 +33,7 @@
  * Version 1.0.6: Tue Jun 27 2000
  *   No important changes
  * Version 1.1.0: Tue Jun 30 2000
- *   Added NLS support (partly written by Arkadiusz Mi<B6>kiewicz 
+ *   Added NLS support (partly written by Arkadiusz Mi<B6>kiewicz
  *     <misiek@pld.org.pl>)
  * Version 1.1.4: Mon Nov 7 2005
  *   Fixed a few type's in the manpage
@@ -62,7 +62,7 @@
 #include "nls.h"
 #include "xalloc.h"
 
-/* NON_OPT is the code that is returned when a non-option is found in '+' 
+/* NON_OPT is the code that is returned when a non-option is found in '+'
  * mode */
 #define NON_OPT 1
 /* LONG_OPT is the code that is returned when a long option is found. */
@@ -158,7 +158,7 @@ static const char *normalize(const char *arg)
        return BUFFER;
 }
 
-/* 
+/*
  * Generate the output. argv[0] is the program name (used for reporting errors).
  * argv[1..] contains the options to be parsed. argc must be the number of
  * elements in argv (ie. 1 if there are no options, only the program name),
@@ -264,7 +264,7 @@ static void add_longopt(const char *name, int has_arg)
 }
 
 
-/* 
+/*
  * Register several long options. options is a string of long options,
  * separated by commas or whitespace. This nukes options!
  */
@@ -438,7 +438,7 @@ int main(int argc, char *argv[])
                default:
                        parse_error(_("internal error, contact the author."));
                }
-       
+
        if (!optstr) {
                if (optind >= argc)
                        parse_error(_("missing optstring argument"));