Most shells strip the single-quote chars from arguments, but on win32-x86 this is not happening so we need to do it ourselves. The single quotes are important to prevent un-escaping of things that shouldn't be unescaped.
28 lines
878 B
Perl
28 lines
878 B
Perl
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
|
if $running_under_some_shell;
|
|
#*************************************************************************
|
|
# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
|
|
# National Laboratory.
|
|
# EPICS BASE is distributed subject to a Software License Agreement found
|
|
# in file LICENSE that is included with this distribution.
|
|
#*************************************************************************
|
|
|
|
use strict;
|
|
|
|
die "Path to INSTALL_LOCATION missing\n" unless @ARGV == 1;
|
|
|
|
my $path = shift;
|
|
|
|
$path =~ s/\\/\\\\/gx;
|
|
$path =~ s/^'//;
|
|
$path =~ s/'$//;
|
|
|
|
print "/* THIS IS A GENERATED FILE. DO NOT EDIT! */\n",
|
|
"\n",
|
|
"#ifndef INC_epicsInstallDir_H\n",
|
|
"#define INC_epicsInstallDir_H\n",
|
|
"\n",
|
|
"#define EPICS_BASE \"$path\"\n",
|
|
"\n",
|
|
"#endif /* INC_epicsInstallDir_H */\n";
|