forked from gambit/gambit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gambuild-ruby.unix.in
66 lines (50 loc) · 1.94 KB
/
gambuild-ruby.unix.in
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
#! /bin/sh
case "$1" in
"obj")
if test "${GAMBUILD_VERBOSE}" != ""; then
echo "cat ${BUILD_OBJ_INPUT_FILENAMES_PARAM} > \"${BUILD_OBJ_OUTPUT_FILENAME_PARAM}\""
fi
cat ${BUILD_OBJ_INPUT_FILENAMES_PARAM} > "${BUILD_OBJ_OUTPUT_FILENAME_PARAM}"
;;
"dyn")
if test "${GAMBUILD_VERBOSE}" != ""; then
echo "cat ${BUILD_DYN_INPUT_FILENAMES_PARAM} > \"${BUILD_DYN_OUTPUT_FILENAME_PARAM}\""
fi
cat ${BUILD_DYN_INPUT_FILENAMES_PARAM} > "${BUILD_DYN_OUTPUT_FILENAME_PARAM}"
;;
"lib")
if test "${GAMBUILD_VERBOSE}" != ""; then
echo "echo BUILD_LIB not yet implemented"
fi
echo BUILD_LIB not yet implemented
;;
"exe")
if test "${BUILD_EXE_BASE_LIBRARY_PARAM}" = ""; then
BUILD_EXE_BASE_LIB="${GAMBITDIR_LIB}/_gambit.rb"
else
BUILD_EXE_BASE_LIB="${BUILD_EXE_BASE_LIBRARY_PARAM}.rb"
fi
if test "${GAMBUILD_VERBOSE}" != ""; then
case "${BUILD_EXE_OUTPUT_FILENAME_PARAM}" in
*.rb) echo cat ${BUILD_EXE_INPUT_FILENAMES_PARAM} "\"${BUILD_EXE_BASE_LIB}\" > \"${BUILD_EXE_OUTPUT_FILENAME_PARAM}\""
;;
*) echo "echo \"#! /usr/bin/env ruby\" > \"${BUILD_EXE_OUTPUT_FILENAME_PARAM}\""
echo cat ${BUILD_EXE_INPUT_FILENAMES_PARAM} "\"${BUILD_EXE_BASE_LIB}\" >> \"${BUILD_EXE_OUTPUT_FILENAME_PARAM}\""
echo "chmod +x \"${BUILD_EXE_OUTPUT_FILENAME_PARAM}\""
;;
esac
fi
case "${BUILD_EXE_OUTPUT_FILENAME_PARAM}" in
*.rb) cat ${BUILD_EXE_INPUT_FILENAMES_PARAM} "${BUILD_EXE_BASE_LIB}" > "${BUILD_EXE_OUTPUT_FILENAME_PARAM}"
;;
*) echo "#! /usr/bin/env ruby" > "${BUILD_EXE_OUTPUT_FILENAME_PARAM}"
cat ${BUILD_EXE_INPUT_FILENAMES_PARAM} "${BUILD_EXE_BASE_LIB}" >> "${BUILD_EXE_OUTPUT_FILENAME_PARAM}"
chmod +x "${BUILD_EXE_OUTPUT_FILENAME_PARAM}"
;;
esac
;;
*)
echo "gambuild-ruby unknown operation \"$1\""
exit 1
;;
esac