<commit_before>#!/usr/local/bin/perl

# ************** <auto-copyright.pl BEGIN do not edit this line> **************
#
# VR Juggler is (C) Copyright 1998-2003 by Iowa State University
#
# Original Authors:
#   <NAME>, <NAME>,
#   <NAME>, <NAME>,
#   <NAME>, <NAME>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# -----------------------------------------------------------------
# File:          $RCSfile$
# Date modified: $Date$
# Version:       $Revision$
# -----------------------------------------------------------------
#
# *************** <auto-copyright.pl END do not edit this line> ***************

# -----------------------------------------------------------------------------
# Generate Makefiles in the subdirectories of the installation directory
# (prefix) from Makefile.in's found in the source directory (startdir).  All
# command-line options shown here are required.
#
# Usage:
#     makefiles-gen.pl
#         --vars=<Path to a Perl file containing @..@ substitution values>
#         --srcdir=<Location of source code>
#         --prefix=<Base directory where Makefile will go>
#         --startdir=<Directory where search begins>
#         --uname=<Owner's user name>
#         --gname=<Group name>
#         --mode=<Mode bits>
#
# NOTE:
#    In almost every situation, the --srcdir option should be passed the
#    value "." so that the source in the installation directory will be used.
# -----------------------------------------------------------------------------

require 5.004;

use Cwd;
use File::Basename;
use File::Copy;
use Getopt::Long;

sub generateFile($$);

# Do this to include the path to the script in @INC.
BEGIN {
    $path = (fileparse("$0"))[1];
}

use lib("$path");
use InstallOps;

$InstallOps::pass_rec_func_cur_file_dir = 1;

$Win32 = 1 if $ENV{'OS'} =~ /Windows/;

# Turn off case insensitivity when parsing command-line options.
$Getopt::Long::ignorecase = 0;

if ( $#ARGV < 5 ) {
    die <<USAGE_EOF;
Usage:
    $0
        --vars=<Path to a Perl file containing @..@ substitution values>
        --srcdir=<Location of source code>
        --prefix=<Base directory where Makefile will go>
        --startdir=<Directory where search begins>
      [ --uname=<Owner's user name> --gname=<Group name> --mode=<Mode bits> ]
USAGE_EOF
}

# Initialize variables passed (by reference) to GetOptions();
%VARS = ();
@files = ();
($var_file, $startdir, $prefix) = ('', '', '');
($uname, $gname, $mode) = ('', '', '');

# Parse the command-line options and store the given values in %VARS which
# is indexed by the tag name to be replaced (e.g., 'CXX').
GetOptions("vars=s", \$var_file, "srcdir=s" => \$VARS{'srcdir'},
	   "prefix=s" => \$prefix, "startdir=s" => \$startdir,
	   'files=s' => \@files,
	   "uname=s" => \$uname, "gname=s" => \$gname, "mode=s" => \$mode);

die "ERROR: Cannot specify file and directory recursion together!\n"
   if $#files != -1 && $startdir;

# Import the extra settings for %VARS found in $var_file if it was given
# on the command line.
require "$var_file" if $var_file;<commit_msg>Made the checking for required arguments less braindead.<commit_after>#!/usr/local/bin/perl

# ************** <auto-copyright.pl BEGIN do not edit this line> **************
#
# VR Juggler is (C) Copyright 1998-2003 by Iowa State University
#
# Original Authors:
#   <NAME>, <NAME>,
#   <NAME>, <NAME>,
#   <NAME>, <NAME>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# -----------------------------------------------------------------
# File:          $RCSfile$
# Date modified: $Date$
# Version:       $Revision$
# -----------------------------------------------------------------
#
# *************** <auto-copyright.pl END do not edit this line> ***************

# -----------------------------------------------------------------------------
# Generate Makefiles in the subdirectories of the installation directory
# (prefix) from Makefile.in's found in the source directory (startdir).  All
# command-line options shown here are required.
#
# Usage:
#     makefiles-gen.pl
#         --vars=<Path to a Perl file containing @..@ substitution values>
#         --srcdir=<Location of source code>
#         --prefix=<Base directory where Makefile will go>
#         --startdir=<Directory where search begins>
#         --uname=<Owner's user name>
#         --gname=<Group name>
#         --mode=<Mode bits>
#
# NOTE:
#    In almost every situation, the --srcdir option should be passed the
#    value "." so that the source in the installation directory will be used.
# -----------------------------------------------------------------------------

require 5.004;

use Cwd;
use File::Basename;
use File::Copy;
use Getopt::Long;

sub generateFile($$);

# Do this to include the path to the script in @INC.
BEGIN {
    $path = (fileparse("$0"))[1];
}

use lib("$path");
use InstallOps;

$InstallOps::pass_rec_func_cur_file_dir = 1;

$Win32 = 1 if $ENV{'OS'} =~ /Windows/;

# Turn off case insensitivity when parsing command-line options.
$Getopt::Long::ignorecase = 0;

# Initialize variables passed (by reference) to GetOptions();
%VARS = ();
@files = ();
($var_file, $startdir, $prefix) = ('', '', '');
($uname, $gname, $mode) = ('', '', '');

# Parse the command-line options and store the given values in %VARS which
# is indexed by the tag name to be replaced (e.g., 'CXX').
GetOptions("vars=s", \$var_file, "srcdir=s" => \$VARS{'srcdir'},
	   "prefix=s" => \$prefix, "startdir=s" => \$startdir,
	   'files=s' => \@files,
	   "uname=s" => \$uname, "gname=s" => \$gname, "mode=s" => \$mode);

if ( ! ($var_file && exists($VARS{'srcdir'}) && $prefix) )
{
   die <<USAGE_EOF;
Usage:
    $0
        --vars=<Path to a Perl file containing @..@ substitution values>
        --srcdir=<Location of source code>
        --prefix=<Base directory where Makefile will go>
      [ --startdir=<Directory where search begins>
        --uname=<Owner's user name> --gname=<Group name> --mode=<Mode bits> ]
USAGE_EOF
}

die "ERROR: Cannot specify file and directory recursion together!\n"
   if $#files != -1 && $startdir;

# Import the extra settings for %VARS found in $var_file if it was given
# on the command line.
require "$var_file" if $var_file;
{'fraction_non_alphanumeric': 0.21393626867645113, 'fraction_numerical': 0.009652254396403544, 'mean_word_length': 2.6036207717960935, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1534787', 'n_tokens_mistral': 2269, 'n_tokens_neox': 2171, 'n_words': 825}