File: asis_install.bat

package info (click to toggle)
asis 2007-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,832 kB
  • ctags: 34
  • sloc: ada: 93,665; makefile: 225
file content (137 lines) | stat: -rw-r--r-- 2,467 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
@echo off

if .%1. == .clean. goto clean

if .%1. == .. goto help

:install

set INSTALL_DIR=%1

rem -- we have to start from the top directory of the ASIS distribution

rem --  go into obj subdirectory and compile everything
cd obj
gnatmake -c -I../gnat -I../asis -g -O2 install_asis.adb

rem --  we do not need object and ali file created for a dummy
rem --  Install_ASIS procedure

del install_asis.o install_asis.ali

rem --  creating a library file
ar rc libasis.a *.o
ranlib libasis.a

rem --  and moving all the installation stuff into INSTALL_DIR

rem --  first, cleaning up the location for the ASIS library installation:

mkdir %INSTALL_DIR%

move *.ali         %INSTALL_DIR%
move libasis.a     %INSTALL_DIR%
del  *.o

copy ..\asis\*.ads %INSTALL_DIR%
copy ..\asis\*.adb %INSTALL_DIR%
copy ..\gnat\*.ads %INSTALL_DIR%
copy ..\gnat\*.adb %INSTALL_DIR%

rem --  locking the ALI files of the ASIS library
attrib +r          %INSTALL_DIR%\*.ali

set ADA_INCLUDE_PATH=%INSTALL_DIR%;%ADA_INCLUDE_PATH%
set ADA_OBJECTS_PATH=%INSTALL_DIR%;%ADA_OBJECTS_PATH%

rem --  ASIStant is considered as a part of a standard ASIS installation

cd ..\tools\asistant
gnatmake -g -O2 -o asistant asistant-driver.adb -largs -lasis
cd ..\..

if .%2. == .all. goto create_examples
goto done

: create_examples
rem --  creating ASIS tools and examples

cd tools

cd gnatstub
gnatmake -g -O2 -o gnatstub gnatstub-driver.adb -largs -lasis

cd ..\gnatelim
gnatmake -g -O2 -o gnatelim gnatelim-driver.adb -largs -lasis

cd ..\gnatpp
gnatmake -g -O2 -o gnatpp gnatpp-driver.adb -largs -lasis

cd ..\..\examples\ds
gnatmake -g -O2 -o ds display_source.adb -largs -lasis
cd ..

cd ..

goto done

:clean

cd tools\asistant
del *.o
del *.ali
del *.exe
del b_*.c
del b~*.ad*
cd ..

cd gnatelim
del *.o
del *.ali
del *.exe
del b_*.c
del b~*.ad*
cd ..

cd gnatstub
del *.o
del *.ali
del *.exe
del b_*.c
del b~*.ad*
cd ..

cd gnatpp
del *.o
del *.ali
del *.exe
del b_*.c
del b~*.ad*
cd ..

cd ..\examples

cd ds
del *.o
del *.ali
del *.exe
del b_*.c
del b~*.ad*
cd ..

cd ..

goto done

:help
echo Usage:
echo     asis_install [path]  - build ASIS and install it at location path or
echo                            at c:\local\asis if path is omitted
echo     asis_install clean   - clean up ASIS source directories

goto fin

:done
set INSTALL_DIR   =

:fin