File: create-lists.bat

package info (click to toggle)
gjs 1.58.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,140 kB
  • sloc: cpp: 24,189; sh: 4,931; ansic: 573; makefile: 206; xml: 75
file content (42 lines) | stat: -rw-r--r-- 805 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
rem Simple .bat script for creating the NMake Makefile snippets.

if not "%1" == "header" if not "%1" == "file" if not "%1" == "footer" goto :error_cmd
if "%2" == "" goto error_no_destfile

if "%1" == "header" goto :header
if "%1" == "file" goto :addfile
if "%1" == "footer" goto :footer

:header
if "%3" == "" goto error_var
echo %3 =	\>>%2
goto done

:addfile
if "%3" == "" goto error_file
echo.	%3	\>>%2
goto done

:footer
echo.	$(NULL)>>%2
echo.>>%2
goto done

:error_cmd
echo Specified command '%1' was invalid.  Valid commands are: header file footer.
goto done

:error_no_destfile
echo Destination NMake snippet file must be specified
goto done

:error_var
echo A name must be specified for using '%1'.
goto done

:error_file
echo A file must be specified for using '%1'.
goto done

:done