]> begriffs open source - cmsis-freertos/blob - gen_pack.sh
Update FreeRTOS kernel to v11.2.0
[cmsis-freertos] / gen_pack.sh
1 #!/usr/bin/env bash
2 # Version: 3.0
3 # Date: 2023-11-06
4 # This bash script generates a CMSIS Software Pack: CMSIS-FreeRTOS
5 #
6
7 set -o pipefail
8
9 # Set version of gen pack library
10 # For available versions see https://github.com/Open-CMSIS-Pack/gen-pack/tags.
11 # Use the tag name without the prefix "v", e.g., 0.7.0
12 REQUIRED_GEN_PACK_LIB="0.11.0"
13
14 # Set default command line arguments
15 DEFAULT_ARGS=(-c "v")
16
17 # Pack warehouse directory - destination
18 # Default: ./output
19 #
20 PACK_OUTPUT=./output
21
22 # Temporary pack build directory,
23 # Default: ./build
24 #
25 PACK_BUILD=./build
26
27 # Specify directory names to be added to pack base directory
28 # An empty list defaults to all folders next to this script.
29 # Default: empty (all folders)
30 #
31 PACK_DIRS="
32   CMSIS
33   Documentation
34   Source
35 "
36
37 # Specify file names to be added to pack base directory
38 # Default: empty
39 #
40 PACK_BASE_FILES="
41   LICENSE
42 "
43
44 # Specify file names to be deleted from pack build directory
45 # Default: empty
46 #
47 PACK_DELETE_FILES="
48   Documentation/Doxygen
49 "
50
51 # Specify patches to be applied
52 # Default: empty
53 #
54 # PACK_PATCH_FILES=""
55
56 # Specify addition argument to packchk
57 # Default: empty
58 #
59 # PACKCHK_ARGS=()
60
61 # Specify additional dependencies for packchk
62 # Default: empty
63 #
64 PACKCHK_DEPS="
65   ARM.CMSIS.pdsc
66   ARM.Cortex_DFP.pdsc
67 "
68
69 # Optional: restrict fallback modes for changelog generation
70 # Default: full
71 # Values:
72 # - full      Tag annotations, release descriptions, or commit messages (in order)
73 # - release   Tag annotations, or release descriptions (in order)
74 # - tag       Tag annotations only
75 #
76 PACK_CHANGELOG_MODE="full"
77
78 #
79 # custom pre-processing steps
80 #
81 # usage: preprocess <build>
82 #   <build>  The build folder
83 #
84 function preprocess() {
85   # add custom steps here to be executed
86   # before populating the pack build folder
87   pushd ./Documentation/Doxygen/ > /dev/null
88   echo "Changing working directory to $(pwd)"
89
90   echo "Executing ./gen_doc.sh"
91   ./gen_doc.sh
92
93   popd > /dev/null
94   echo "Changing working directory to $(pwd)"
95   return 0
96 }
97
98 #
99 # custom post-processing steps
100 #
101 # usage: postprocess <build>
102 #   <build>  The build folder
103 #
104 function postprocess() {
105   # add custom steps here to be executed
106   # after populating the pack build folder
107   # but before archiving the pack into output folder
108   return 0
109 }
110
111 ############ DO NOT EDIT BELOW ###########
112
113 # Set GEN_PACK_LIB_PATH to use a specific gen-pack library root
114 # ... instead of bootstrap based on REQUIRED_GEN_PACK_LIB
115 if [[ -f "${GEN_PACK_LIB_PATH}/gen-pack" ]]; then
116   . "${GEN_PACK_LIB_PATH}/gen-pack"
117 else
118   . <(curl -sL "https://raw.githubusercontent.com/Open-CMSIS-Pack/gen-pack/main/bootstrap")
119 fi
120
121 gen_pack "${DEFAULT_ARGS[@]}" "$@"
122
123 exit 0