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