Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.org
[bpt/emacs.git] / nt / envadd.bat
1 rem Hack to change/add environment variables in the makefiles for the
2 rem Windows platform.
3
4 rem Copyright (C) 2003-2014 Free Software Foundation, Inc.
5
6 rem This file is part of GNU Emacs.
7
8 rem GNU Emacs is free software: you can redistribute it and/or modify
9 rem it under the terms of the GNU General Public License as published by
10 rem the Free Software Foundation, either version 3 of the License, or
11 rem (at your option) any later version.
12
13 rem GNU Emacs is distributed in the hope that it will be useful,
14 rem but WITHOUT ANY WARRANTY; without even the implied warranty of
15 rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 rem GNU General Public License for more details.
17
18 rem You should have received a copy of the GNU General Public License
19 rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/.
20
21
22 rem Usage:
23 rem envadd "ENV1=VAL1" "ENV2=VAL2" ... /C <command line>
24 rem
25 rem The "/C" switch marks the end of environment variables, and the
26 rem beginning of the command line.
27 rem
28 rem By Peter 'Luna' Runestig <peter@runestig.com> 2003
29
30 :Loop
31 if .%1% == ./C goto EndLoop
32 rem just to avoid an endless loop:
33 if .%1% == . goto EndLoop
34 set %1
35 shift
36 goto Loop
37 :EndLoop
38
39 rem Eat the "/C"
40 shift
41 rem Now, run the command line
42 %1 %2 %3 %4 %5 %6 %7 %8 %9
43