Debian Codegraph @

configure

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 #
3 # Platform Configurator (pconf) calling script
4 #
5 # Edit only if you are the vendor, end users should not modify this file!
6 #
7
8 # ##############################################################################
9 #
10 # Vendor Editable Section
11 #
12
13 # Source files prefix directory:
14 #
15 SRC_DIR=sar
16
17 # Platforms configuration file, this file lists all defined platforms this
18 # program is ported to:
19 #
20 PCONF_PLATFORMS_INI=$SRC_DIR/platforms.ini
21
22 # This platform information file:
23 #
24 PCONF_THIS_PLATFORM_INI=$SRC_DIR/this_platform.ini
25
26 # Output Makefile (should be same as the one specified in
27 # PCONF_PLATFORMS_INI):
28 #
29 PCONF_MAKEFILE_OUTPUT=$SRC_DIR/Makefile
30
31
32 # Referances to Platform Configurator's files:
33 #
34
35 # Prefix directory:
36 PCONF_PREFIX=pconf
37
38 # Generated pconf binary:
39 PCONF=$PCONF_PREFIX/pconf
40
41 # Tempory variables (don't touch):
42 PCONF_NEED_COMPILE=1
43 PCONF_GENERATE_SUCCESS=0
44
45
46 # ##############################################################################
47 #
48 # No need to edit below this line
49 #
50
51 # Special `reset' case
52 if [scip-shell system . . `[`. "$1" = "--reset" ]; then
53 echoscip-shell system . . echo. "Resetting Platform Configurator for a clean distribution..."
54
55 # Remove generated pconf binary
56 if [scip-shell system . . `[`. -f $PCONF ]; then
57 rmscip-shell system . . rm. -v $PCONF
58 fi
59
60 # Remove this platform information file
61 if [scip-shell system . . `[`. -f $PCONF_THIS_PLATFORM_INI ]; then
62 rmscip-shell system . . rm. -v $PCONF_THIS_PLATFORM_INI
63 fi
64
65 # Remove generated pconf output Makefile
66 if [scip-shell system . . `[`. -f $PCONF_MAKEFILE_OUTPUT ]; then
67 rmscip-shell system . . rm. -v $PCONF_MAKEFILE_OUTPUT
68 fi
69
70 echoscip-shell system . . echo. "Done"
71 exit 0
72 fi
73
74
75 # Has pconf been compiled for this system?
76 if [scip-shell system . . `[`. -f $PCONF ]; then
77 PCONF_NEED_COMPILE=0
78 fi
79
80 # Need to generate (compile) pconf?
81 if [scip-shell system . . `[`. $PCONF_NEED_COMPILE = "1" ]; then
82 echoscip-shell system . . echo. "Collecting information about this platform..."
83 if [scip-shell system . . `[`. -f $PCONF_THIS_PLATFORM_INI ]; then
84 rmscip-shell system . . rm. $PCONF_THIS_PLATFORM_INI
85 fi
86 unamescip-shell system . . uname. -s >> $PCONF_THIS_PLATFORM_INI
87 unamescip-shell system . . uname. -r >> $PCONF_THIS_PLATFORM_INI
88 unamescip-shell system . . uname. -m >> $PCONF_THIS_PLATFORM_INI
89
90 echoscip-shell system . . echo. "Generating Platform Configurator and testing system's compiler..."
91 cd $PCONF_PREFIX
92 makescip-shell system . . make. clean
93 makescip-shell system . . make.
94 cd ..
95
96 # Check if generation successful
97 if [scip-shell system . . `[`. -f $PCONF ]; then
98 PCONF_GENERATE_SUCCESS=1
99 fi
100 if [scip-shell system . . `[`. $PCONF_GENERATE_SUCCESS = "0" ]; then
101 echoscip-shell system . . echo. "Could not generate Platform Configurator and/or compiler not functioning,"
102 echoscip-shell system . . echo. "you may not be able to compile/build any programs on this system. Please "
103 echoscip-shell system . . echo. "review any errors encountered above and consult with vendors."
104 echoscip-shell system . . echo. " "
105 exit 1
106 fi
107 if [scip-shell system . . `[`. $PCONF_GENERATE_SUCCESS = "1" ]; then
108 echoscip-shell system . . echo. " "
109 echoscip-shell system . . echo. "Compiler passed all compatibility tests!"
110 echoscip-shell system . . echo. " "
111 fi
112 fi
113
114 # Run pconf
115 if [scip-shell system . . `[`. -f $PCONF ]; then
116 $PCONF $PCONF_PLATFORMS_INI "$@"
117 exit $?
118 fi