Browse code

modernized extensions

Nat! authored on 24-05-2018 21:12:13
Showing 48 changed files
1 1
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-1
... ...
@@ -1,11 +1,11 @@
1 1
 # By default assume a project has source and a sourcetree
2
-export MULLE_SDE_UPDATE_CALLBACKS="source,sourcetree"
2
+export MULLE_SDE_UPDATE_CALLBACKS="source:sourcetree"
3 3
 
4 4
 
5 5
 #
6 6
 #
7 7
 #
8
-export MULLE_SDE_INSTALLED_VERSION="0.15.5"
8
+export MULLE_SDE_INSTALLED_VERSION="0.15.6"
9 9
 
10 10
 
11 11
 #
... ...
@@ -35,6 +35,26 @@ export PROJECT_DIALECT="c"
35 35
 #
36 36
 #
37 37
 #
38
-export DIALECT_EXTENSION="c"
38
+# export DIALECT_EXTENSION="c"
39
+
40
+
41
+# These are used by `mulle-match find` to speed up the search.
42
+export MULLE_MATCH_FIND_NAMES="config:CMakeLists.txt:*.cmake:*.h:*.inc:*.c"
43
+
44
+
45
+# These are used by `mulle-match find` to locate files
46
+export MULLE_MATCH_FIND_LOCATIONS=".mulle-sourcetree/etc/config:CMakeLists.txt:cmake:src"
47
+
48
+
49
+#
50
+#
51
+#
52
+# export DIALECT_EXTENSIONS="c"
53
+
54
+
55
+#
56
+#
57
+#
58
+export PROJECT_EXTENSIONS="c"
39 59
 
40 60
 
41 61
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+#
2
+#
3
+#
4
+export PROJECT_NAME="mulle-concurrent"
5
+
6
+
7
+#
8
+#
9
+#
10
+export PROJECT_TYPE="library"
11
+
12
+
13
+#
14
+#
15
+#
16
+export PROJECT_SOURCE_DIR="src"
17
+
18
+
19
+#
20
+#
21
+#
22
+export PROJECT_LANGUAGE="c"
23
+
24
+
25
+#
26
+#
27
+#
28
+export PROJECT_DIALECT="c"
29
+
30
+
31
+#
32
+#
33
+#
34
+export PROJECT_EXTENSIONS="c"
35
+
36
+
0 37
new file mode 100644
... ...
@@ -0,0 +1,59 @@
1
+#
2
+# Git mirror and Zip/TGZ cache to conserve bandwidth
3
+# Memo: override in os-specific env file
4
+#
5
+export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/.cache/mulle-fetch/git-mirror"
6
+
7
+#
8
+# Git mirror and Zip/TGZ cache to conserve bandwidth
9
+#
10
+export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/.cache/mulle-fetch/archive"
11
+
12
+#
13
+# PATH to search for git repositories locally
14
+#
15
+export MULLE_FETCH_SEARCH_PATH="${MULLE_VIRTUAL_ROOT}/.."
16
+
17
+#
18
+# Prefer symlinking to local git repositories found via MULLE_FETCH_SEARCH_PATH
19
+#
20
+export MULLE_SYMLINK="YES"
21
+
22
+#
23
+# Use common folder for sharable projects
24
+#
25
+export MULLE_SOURCETREE_SHARE_DIR="${MULLE_VIRTUAL_ROOT}/stash"
26
+
27
+#
28
+# Share dependency directory (absolute for ease of use)
29
+#
30
+export DEPENDENCY_DIR="${MULLE_VIRTUAL_ROOT}/dependency"
31
+
32
+#
33
+# Share addiction directory (absolute for ease of use)
34
+#
35
+export ADDICTION_DIR="${MULLE_VIRTUAL_ROOT}/addiction"
36
+
37
+#
38
+# Use common build directory
39
+#
40
+export BUILD_DIR="${MULLE_VIRTUAL_ROOT}/build"
41
+# Used by `mulle-match find` to speed up the search.
42
+export MULLE_MATCH_FIND_NAMES="config:*.h:*.inc:*.c:CMakeLists.txt:*.cmake"
43
+
44
+
45
+# Used by `mulle-match find` to locate files
46
+export MULLE_MATCH_FIND_LOCATIONS="${PROJECT_SOURCE_DIR}:CMakeLists.txt:cmake"
47
+
48
+
49
+# By default assume a project has source and a sourcetree
50
+# The order should be sourcetree then source
51
+export MULLE_SDE_UPDATE_CALLBACKS="sourcetree:source"
52
+
53
+
54
+#
55
+#
56
+#
57
+export MULLE_SDE_INSTALLED_VERSION="0.16.3"
58
+
59
+
... ...
@@ -22,73 +22,81 @@ then
22 22
 your convenience" >&2
23 23
 fi
24 24
 
25
-alias mulle-env-reload='. "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/environment-include.sh"'
25
+alias mulle-env-reload='. "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/include-environment.sh"'
26 26
 
27
+case "${MULLE_SHELL_MODE}" in
28
+   *INTERACTIVE*)
29
+      #
30
+      # Set PS1 so that we can see, that we are in a mulle-env
31
+      #
32
+      envname="`PATH=/bin:/usr/bin basename -- "${MULLE_VIRTUAL_ROOT}"`"
27 33
 
28
-if [ "${MULLE_SHELL_MODE}" = "INTERACTIVE" ]
29
-then
30
-   #
31
-   # Set PS1 so that we can see, that we are in a mulle-env
32
-   #
33
-   envname="`PATH=/bin:/usr/bin basename -- "${MULLE_VIRTUAL_ROOT}"`"
34
+      case "${PS1}" in
35
+         *\\h\[*)
36
+         ;;
34 37
 
35
-   case "${PS1}" in
36
-      *\\h\[*)
37
-      ;;
38
+         *\\h*)
39
+            PS1="$(sed 's/\\h/\\h\['${envname}'\]/' <<< '${PS1}' )"
40
+         ;;
38 41
 
39
-      *\\h*)
40
-         PS1="$(sed 's/\\h/\\h\['${envname}'\]/' <<< '${PS1}' )"
41
-      ;;
42
+         *)
43
+            PS1='\u@\h['${envname}'] \W$ '
44
+         ;;
45
+      esac
46
+      export PS1
42 47
 
43
-      *)
44
-         PS1='\u@\h['${envname}'] \W$ '
45
-      ;;
46
-   esac
47
-   export PS1
48
+      unset envname
48 49
 
49
-   unset envname
50
+      # install cd catcher
51
+      . "${MULLE_ENV_LIBEXEC_DIR}/mulle-env-cd.sh"
52
+      unset MULLE_ENV_LIBEXEC_DIR
50 53
 
51
-   # install cd catcher
52
-   . "${MULLE_ENV_LIBEXEC_DIR}/mulle-env-cd.sh"
53
-   unset MULLE_ENV_LIBEXEC_DIR
54
+      mulle-env-reload
55
+   ;;
54 56
 
55
-   mulle-env-reload
56
-else
57
-   set -a ; mulle-env-reload     # export all definitions for command
58
-   ${COMMAND}
59
-   exit $?
60
-fi
57
+   *)
58
+      set -a ; mulle-env-reload     # export all definitions for command
59
+      ${COMMAND}
60
+      exit $?
61
+   ;;
62
+esac
61 63
 
62 64
 
63 65
 #
64 66
 # Source in bash completion if available
65 67
 # Assumed is, that they are not user modifiable
66 68
 #
67
-if [ "${MULLE_SHELL_MODE}" = "INTERACTIVE" ]
68
-then
69
-   DEFAULT_IFS="${IFS}"
70
-   shopt -s nullglob; IFS="
69
+case "${MULLE_SHELL_MODE}" in
70
+   *INTERACTIVE*)
71
+      DEFAULT_IFS="${IFS}"
72
+      shopt -s nullglob; IFS="
71 73
 "
72
-   for FILENAME in "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/libexec"/*-bash-completion.sh
73
-   do
74
-      . "${FILENAME}"
75
-   done
76
-   shopt -u nullglob; IFS="${DEFAULT_IFS}"
74
+      for FILENAME in "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/libexec"/*-bash-completion.sh
75
+      do
76
+         . "${FILENAME}"
77
+      done
78
+      shopt -u nullglob; IFS="${DEFAULT_IFS}"
77 79
 
78
-   unset FILENAME
79
-   unset DEFAULT_IFS
80
-fi
80
+      unset FILENAME
81
+      unset DEFAULT_IFS
82
+   ;;
83
+esac
81 84
 
82 85
 #
83 86
 #
84 87
 # show motd, if any
85 88
 #
86
-if [ -f "${MULLE_VIRTUAL_ROOT}/.mulle-env/etc/motd" ]
89
+if [ -z ""]
87 90
 then
88
-   cat "${MULLE_VIRTUAL_ROOT}/.mulle-env/etc/motd"
89
-else
90
-   if [ -f "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/motd" ]
91
+   if [ -f "${MULLE_VIRTUAL_ROOT}/.mulle-env/etc/motd" ]
91 92
    then
92
-      cat "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/motd"
93
+      cat "${MULLE_VIRTUAL_ROOT}/.mulle-env/etc/motd"
94
+   else
95
+      if [ -f "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/motd" ]
96
+      then
97
+         cat "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/motd"
98
+      fi
93 99
    fi
100
+else
101
+   unset NO_MOTD
94 102
 fi
95 103
new file mode 100644
... ...
@@ -0,0 +1,94 @@
1
+[ "${TRACE}" = "YES" ] && set -x  && : "$0" "$@"
2
+
3
+[ -z "${MULLE_VIRTUAL_ROOT}" -o -z "${MULLE_UNAME}"  ] && \
4
+   echo "Your script needs to setup MULLE_VIRTUAL_ROOT \
5
+and MULLE_UNAME properly" >&2  && exit 1
6
+
7
+MULLE_HOSTNAME="`PATH=/bin:/usr/bin hostname -s`" # don't export it
8
+
9
+MULLE_ENV_SHARE_DIR="${MULLE_VIRTUAL_ROOT}/.mulle-env/share"
10
+MULLE_ENV_ETC_DIR="${MULLE_VIRTUAL_ROOT}/.mulle-env/etc"
11
+
12
+
13
+# Top/down order of inclusion.
14
+# Left overrides right if present.
15
+#
16
+# .mulle-env/etc                        | .mulle-env/share
17
+# --------------------------------------|--------------------
18
+#                                       | environment-project.sh
19
+#                                       | environment-share.sh
20
+# environment-global.sh                 |
21
+# environment-os-${MULLE_UNAME}.sh      | environment-os-${MULLE_UNAME}.sh
22
+# environment-host-${MULLE_HOSTNAME}.sh |
23
+# environment-user-${USER}.sh           |
24
+# custom-environment.sh                 |
25
+#
26
+
27
+#
28
+# The project file, if present is to be set by mulle-sde init itself
29
+# w/o extensions
30
+#
31
+if [ -f "${MULLE_ENV_SHARE_DIR}/environment-project.sh" ]
32
+then
33
+   . "${MULLE_ENV_SHARE_DIR}/environment-project.sh"
34
+fi
35
+
36
+#
37
+# The share file, if present is to be set by mulle-sde extensions.
38
+#
39
+# A trick here is that mulle-env doesn't clobber this file
40
+# when doing an init -f, which can be useful.
41
+#
42
+if [ -f "${MULLE_ENV_SHARE_DIR}/environment-share.sh" ]
43
+then
44
+   . "${MULLE_ENV_SHARE_DIR}/environment-share.sh"
45
+fi
46
+
47
+
48
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-global.sh" ]
49
+then
50
+   . "${MULLE_ENV_ETC_DIR}/environment-global.sh"
51
+fi
52
+
53
+#
54
+# "os-" can be written by extensions also
55
+#
56
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-os-${MULLE_UNAME}.sh" ]
57
+then
58
+   . "${MULLE_ENV_ETC_DIR}/environment-os-${MULLE_UNAME}.sh"
59
+else
60
+   if [ -f "${MULLE_ENV_SHARE_DIR}/environment-os-${MULLE_UNAME}.sh" ]
61
+   then
62
+      . "${MULLE_ENV_SHARE_DIR}/environment-os-${MULLE_UNAME}.sh"
63
+   fi
64
+fi
65
+
66
+#
67
+# Load in some modifications depending on  hostname, username. These
68
+# won't be provided by extensions or plugins.
69
+#
70
+# These settings could be "cased" in a single file, but it seems convenient.
71
+# And more managable for mulle-env environment
72
+#
73
+
74
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-host-${MULLE_HOSTNAME}.sh" ]
75
+then
76
+   . "${MULLE_ENV_ETC_DIR}/environment-host-${MULLE_HOSTNAME}.sh"
77
+fi
78
+
79
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-user-${USER}.sh" ]
80
+then
81
+   . "${MULLE_ENV_ETC_DIR}/environment-user-${USER}.sh"
82
+fi
83
+
84
+#
85
+# For more complex edits, that don't work with the cmdline tool
86
+#
87
+if [ -f "${MULLE_ENV_ETC_DIR}/custom-environment.sh" ]
88
+then
89
+   . "${MULLE_ENV_ETC_DIR}/custom-environment.sh"
90
+fi
91
+
92
+unset MULLE_ENV_ETC_DIR
93
+unset MULLE_ENV_SHARE_DIR
94
+unset MULLE_HOSTNAME
... ...
@@ -32,6 +32,32 @@
32 32
 [ "${TRACE}" = "YES" ] && set -x && : "$0" "$@"
33 33
 
34 34
 
35
+_mulle_env_style_complete()
36
+{
37
+   local cur=${COMP_WORDS[COMP_CWORD]}
38
+
39
+   local toolstyles
40
+   local envstyles
41
+
42
+   toolstyles="${1:-`mulle-env toolstyles`}"
43
+   envstyles="`mulle-env envstyles`"
44
+
45
+   local ts
46
+   local es
47
+   local allstyles
48
+
49
+   for ts in ${toolstyles}
50
+   do
51
+      for es in ${envstyles}
52
+      do
53
+         allstyles="${allstyles} ${ts}/${es}"
54
+      done
55
+   done
56
+
57
+   COMPREPLY=( $( compgen -W "${allstyles}" -- "$cur" ) )
58
+}
59
+
60
+
35 61
 _mulle_env_complete()
36 62
 {
37 63
    local cur=${COMP_WORDS[COMP_CWORD]}
... ...
@@ -44,7 +70,7 @@ _mulle_env_complete()
44 70
    for i in "${COMP_WORDS[@]}"
45 71
    do
46 72
       case "$i" in
47
-         tool|environment|init)
73
+         environment|init|style|subenv|tool)
48 74
             context="$i"
49 75
          ;;
50 76
       esac
... ...
@@ -80,23 +106,37 @@ _mulle_env_complete()
80 106
             list)
81 107
             ;;
82 108
 
109
+            --scope)
110
+               list="`mulle-env -s environment scopes`"
111
+               COMPREPLY=( $( compgen -W "${list}" -- "$cur" ) )
112
+            ;;
113
+
83 114
             *)
84
-               COMPREPLY=( $( compgen -W "get list set" -- "$cur" ) )
115
+               case "${cur}" in
116
+                  -*)
117
+                     COMPREPLY=( $( compgen -W "--global --hostname --os --scope --user" -- "$cur" ) )
118
+                  ;;
119
+
120
+                  *)
121
+                     COMPREPLY=( $( compgen -W "get list set scopes" -- "$cur" ) )
122
+                  ;;
123
+               esac
85 124
             ;;
86 125
          esac
87 126
       ;;
88 127
 
89
-      init)
128
+      subenv)
129
+         COMPREPLY=( $( compgen -d -- "$cur" ) )
130
+      ;;
131
+
132
+      style)
133
+         _mulle_env_style_complete
90 134
       ;;
91 135
 
92 136
       *)
93 137
          case "$prev" in
94 138
             -s|--style)
95
-               COMPREPLY=( $( compgen -W "\
96
-none/wild none/inherit none/restrict none/relax none/tight \
97
-minimal/wild minimal/inherit minimal/restrict minimal/relax minimal/tight \
98
-developer/wild developer/inherit developer/restrict developer/relax developer/tight \
99
-mulle/wild mulle/inherit mulle/restrict mulle/relax mulle/tight" -- "$cur" ) )
139
+               _mulle_env_style_complete
100 140
             ;;
101 141
 
102 142
             -d|--directory)
... ...
@@ -110,7 +150,12 @@ mulle/wild mulle/inherit mulle/restrict mulle/relax mulle/tight" -- "$cur" ) )
110 150
                   ;;
111 151
 
112 152
                   *)
113
-                     COMPREPLY=( $( compgen -W "environment init tool" -- $cur ) )
153
+                     if [ "${context}" = "init" ]
154
+                     then
155
+                        COMPREPLY=( $( compgen -d -- "$cur" ) )
156
+                     else
157
+                        COMPREPLY=( $( compgen -W "environment init subenv style tool" -- $cur ) )
158
+                     fi
114 159
                   ;;
115 160
                esac
116 161
             ;;
... ...
@@ -1 +1,7 @@
1 1
 
2
+inotifywait
3
+ssh
4
+cc
5
+gcc
6
+ld
7
+ninja
... ...
@@ -59,7 +59,12 @@ stat
59 59
 tail
60 60
 test
61 61
 tr
62
-uuidgen
63 62
 vi
64 63
 wc
65 64
 which
65
+curl
66
+column
67
+git
68
+uuidgen
69
+cmake
70
+make
... ...
@@ -1 +1 @@
1
-0.11.9
1
+0.12.1
... ...
@@ -39,7 +39,7 @@ usage()
39 39
 Usage:
40 40
    c-sourcetree-update <action> <filename> <category>
41 41
 
42
-   This produces _dependencies.h
42
+   This produces the _dependencies.h or some similiarly named file.
43 43
 
44 44
 EOF
45 45
    exit 1
... ...
@@ -119,9 +119,10 @@ _emit_c_include()
119 119
 {
120 120
    log_entry "_emit_c_include" "$@"
121 121
 
122
-   local header="$1"
123
-   local marks="$2"
124
-   local aliases="$3"
122
+   local address="$1"
123
+   local header="$2"
124
+   local marks="$3"
125
+   local aliases="$4"
125 126
 
126 127
    local indent
127 128
    local ifstatement
... ...
@@ -160,7 +161,7 @@ _emit_c_include()
160 161
       indent=" "
161 162
    fi
162 163
 
163
-   echo "# ${indent}include <${header}>"
164
+   echo "# ${indent}include <${header}>   // ${address}"
164 165
    if [ ! -z "${ifstatement}" ]
165 166
    then
166 167
       echo "# endif"
... ...
@@ -174,7 +175,7 @@ emit_c_include_library()
174 175
 {
175 176
    log_entry "emit_c_include_library" "$@"
176 177
 
177
-   local name="$1"
178
+   local address="$1"
178 179
    local marks="$2"
179 180
    local aliases="$3"
180 181
    local header="$4"
... ...
@@ -184,18 +185,22 @@ emit_c_include_library()
184 185
    #
185 186
    if [ -z "${header}" ]
186 187
    then
188
+      local name
189
+
190
+      name="`fast_basename "${address}"`"
187 191
       header="${name}.h"
188 192
    fi
189 193
 
190
-   _emit_c_include "${header}" "${marks}" "${aliases}"
194
+   _emit_c_include "${address}" "${header}" "${marks}" "${aliases}"
191 195
 
192 196
 }
193 197
 
198
+
194 199
 emit_c_include_dependency()
195 200
 {
196 201
    log_entry "emit_c_include_dependency" "$@"
197 202
 
198
-   local name="$1"
203
+   local address="$1"
199 204
    local marks="$2"
200 205
    local aliases="$3"
201 206
    local header="$4"
... ...
@@ -205,19 +210,30 @@ emit_c_include_dependency()
205 210
    #
206 211
    if [ -z "${header}" ]
207 212
    then
213
+      local name
214
+
215
+      name="`fast_basename "${address}"`"
208 216
       header="${name}/${name}.h"
209 217
    fi
210 218
 
211
-   _emit_c_include "${header}" "${marks}" "${aliases}"
219
+   _emit_c_include "${address}" "${header}" "${marks}" "${aliases}"
212 220
 }
213 221
 
214 222
 
215
-_emit_headers()
223
+emit_c_header()
216 224
 {
217
-   log_entry "_emit_headers" "$@"
225
+   log_entry "emit_c_header" "$@"
218 226
 
219
-   local headers="$1"; shift
220
-   local emitter="$1"; shift
227
+   # since the order of the headers is important and needs to be in treeorder
228
+   # we use mulle-sourcetree directly
229
+   local headers
230
+
231
+   headers="`exekutor mulle-sourcetree list \
232
+                                       --format "%a;%m;%i={aliases,,-------};\
233
+%i={include,,-------}\\n" \
234
+                                       --marks header \
235
+                                       --output-raw \
236
+                                       --no-output-header`" || return 1
221 237
 
222 238
    local dependency
223 239
 
... ...
@@ -233,38 +249,33 @@ _emit_headers()
233 249
 
234 250
       IFS=";" read address marks aliases include <<< "${header}"
235 251
 
236
-      if [ ! -z "${address}" ]
252
+      if [ -z "${address}" ]
237 253
       then
238
-         log_verbose "Emit statements for ${C_MAGENTA}${C_BOLD}${address}"
239
-         ${emitter} "${address}" "${marks}" "${aliases}" "${include}" "$@"
254
+         continue
240 255
       fi
241
-   done
242
-   IFS="${DEFAULT_IFS}"; set +o noglob
243
-}
244
-
245 256
 
257
+      log_verbose "Emit statements for ${C_MAGENTA}${C_BOLD}${address}"
246 258
 
247
-emit_c_header()
248
-{
249
-   log_entry "emit_c_header" "$@"
250
-
251
-   local headers
252
-
253
-   headers="`exekutor mulle-sde dependency list \
254
-                                   --marks header \
255
-                                   --\
256
-                                   --output-raw \
257
-                                   --no-output-header`" || return 1
258
-
259
-   _emit_headers "${headers}" emit_c_include_dependency
259
+      case ",${marks}," in
260
+         *,no-dependency,*)
261
+            emit_c_include_library "${address}" \
262
+                                   "${marks}" \
263
+                                   "${aliases}" \
264
+                                   "${include}" \
265
+                                   "$@"
266
+         ;;
260 267
 
261
-   headers="`exekutor mulle-sde library list \
262
-                                   --marks header \
263
-                                   --\
264
-                                   --output-raw \
265
-                                   --no-output-header`" || return 1
266
-   _emit_headers "${headers}" emit_c_include_library
268
+         *)
269
+            emit_c_include_dependency "${address}" \
270
+                                      "${marks}" \
271
+                                      "${aliases}" \
272
+                                      "${include}" \
273
+                                      "$@"
274
+         ;;
275
+      esac
276
+   done
267 277
 
278
+   IFS="${DEFAULT_IFS}"; set +o noglob
268 279
 }
269 280
 
270 281
 
... ...
@@ -327,8 +338,7 @@ main()
327 338
 
328 339
    local projectname
329 340
 
330
-   projectname="${MULLE_SDE_PROJECT_NAME}"
331
-   projectname="${projectname:-${PROJECT_NAME}}"
341
+   projectname="${PROJECT_NAME}"
332 342
    if [ -z "${projectname}" ]
333 343
    then
334 344
       projectname="`fast_basename "${PWD}"`" # could be nicer
... ...
@@ -341,7 +351,7 @@ main()
341 351
 
342 352
    if [ -z "${MULLE_SDE_DEPENDENCIES_HEADER_FILE}" ]
343 353
    then
344
-      MULLE_SDE_DEPENDENCIES_HEADER_FILE="src/_${projectname}-dependencies.h"
354
+      MULLE_SDE_DEPENDENCIES_HEADER_FILE="${PROJECT_SOURCE_DIR:-src}/_${projectname}-dependencies.h"
345 355
    fi
346 356
 
347 357
    local text_h
... ...
@@ -182,6 +182,7 @@ create_sources_file()
182 182
    log_entry "create_sources_file" "$@"
183 183
 
184 184
    local categorized_files="$1"
185
+
185 186
    local text_src
186 187
 
187 188
    if [ "${MULLE_SDE_CMAKE_SOURCES_FILE}" = "NONE" ]
... ...
@@ -142,8 +142,11 @@ _emit_cmake_find_library()
142 142
    local libraries
143 143
    local i
144 144
 
145
+   IFS=","; shopt -s nullglob
145 146
    for i in ${aliases}
146 147
    do
148
+      IFS="${DEFAULT_IFS}"; shopt -u nullglob
149
+
147 150
       case "${preference}" in
148 151
          "static")
149 152
             libraries="`concat "${libraries}" "\\\${CMAKE_STATIC_LIBRARY_PREFIX}${i}\\\${CMAKE_STATIC_LIBRARY_SUFFIX}"`"
... ...
@@ -157,6 +160,7 @@ _emit_cmake_find_library()
157 160
       # fallback to whatever linkage
158 161
       libraries="`concat "${libraries}" "${i}"`"
159 162
    done
163
+   IFS="${DEFAULT_IFS}"; shopt -u nullglob
160 164
 
161 165
    local failstring
162 166
    local failstatus
... ...
@@ -247,11 +251,13 @@ _emit_cmake_header_only()
247 251
    local headers
248 252
    local i
249 253
 
254
+   IFS=","; shopt -s nullglob
250 255
    for i in ${aliases}
251 256
    do
252 257
       headers="`concat "${headers}" "${i}.h"`"
253 258
       headers="`concat "${headers}" "${i}/${i}.h"`"
254 259
    done
260
+   IFS="${DEFAULT_IFS}"; shopt -u nullglob
255 261
 
256 262
    case ",${marks}," in
257 263
       *,no-require-link,*)
... ...
@@ -318,6 +324,14 @@ emit_cmake_dependency()
318 324
    local indent
319 325
    local ifstatement
320 326
    local endifstatement
327
+   local name
328
+
329
+   #
330
+   # ALL_LOAD_ is the default for Objective-C static libraries and is the
331
+   # default. "C" libraries are marked with no-all-load and remove the
332
+   # prefix
333
+   #
334
+   name="ALL_LOAD_${containername}"
321 335
 
322 336
    if [ ! -z "${marks}" ]
323 337
    then
... ...
@@ -326,6 +340,12 @@ emit_cmake_dependency()
326 340
       then
327 341
          indent="   "
328 342
       fi
343
+
344
+      case ",${marks}," in
345
+         *,no-all-load,*)
346
+            name="${containername}"
347
+         ;;
348
+      esac
329 349
    fi
330 350
 
331 351
    if [ ! -z "${ifstatement}" ]
... ...
@@ -334,13 +354,20 @@ emit_cmake_dependency()
334 354
    fi
335 355
 
336 356
    local identifier
357
+   local filename
337 358
 
338
-   identifier="` tr 'a-z-' 'A-Z_' <<< "${address}" `"
339
-   aliases="` concat "${address}" "${aliases}" `"
359
+   if [ -z "${aliases}" ]
360
+   then
361
+      aliases="${address}"
362
+   fi
363
+
364
+   # first alias determines the identifier
365
+   filename="`fast_basename "${aliases%%,*}"`"
366
+   identifier="` tr 'a-z-' 'A-Z_' <<< "${filename}" `"
340 367
 
341 368
    "${emitter}" "${aliases}" \
342 369
                 "${identifier}" \
343
-                "${containername}" \
370
+                "${name}" \
344 371
                 "${marks}" \
345 372
                 "${indent}"
346 373
 
... ...
@@ -416,21 +443,21 @@ write_libraries_file()
416 443
       local header
417 444
       local text_header
418 445
 
419
-      header="`exekutor mulle-sde ${MULLE_SDE_FLAGS} library list \
446
+      header="`exekutor "${MULLE_SDE}" ${MULLE_SDE_FLAGS} library list \
420 447
                                                          --marks header,no-link \
421 448
                                                          -- \
422 449
                                                          --output-raw \
423
-                                                         --no-output-header`" || return 1
450
+                                                         --output-no-header`" || return 1
424 451
       log_debug "header: ${header}"
425 452
       text_header="`emit_cmake_dependencies "${header}" \
426 453
                                             "_emit_cmake_header_only" \
427 454
                                             "HEADER_ONLY_LIBRARIES"`"
428 455
 
429
-      library="`exekutor mulle-sde ${MULLE_SDE_FLAGS} library list \
456
+      library="`exekutor "${MULLE_SDE}" ${MULLE_SDE_FLAGS} library list \
430 457
                                                          --marks link \
431 458
                                                          -- \
432 459
                                                          --output-raw \
433
-                                                         --no-output-header`" || return 1
460
+                                                         --output-no-header`" || return 1
434 461
       log_debug "library: ${library}"
435 462
       text_lib="`emit_cmake_dependencies "${library}" \
436 463
                                          "_emit_cmake_library" \
... ...
@@ -476,7 +503,7 @@ write_dependencies_file()
476 503
       local header
477 504
       local text_header
478 505
 
479
-      header="`exekutor mulle-sde ${MULLE_SDE_FLAGS} dependency list \
506
+      header="`exekutor "${MULLE_SDE}" ${MULLE_SDE_FLAGS} dependency list \
480 507
                                                         --marks header,no-link \
481 508
                                                         -- \
482 509
                                                         --output-raw \
... ...
@@ -487,7 +514,7 @@ write_dependencies_file()
487 514
                                             "_emit_cmake_header_only" \
488 515
                                             "HEADER_ONLY_LIBRARIES"`"
489 516
 
490
-      dependency="`exekutor mulle-sde ${MULLE_SDE_FLAGS} dependency list \
517
+      dependency="`exekutor "${MULLE_SDE}" ${MULLE_SDE_FLAGS} dependency list \
491 518
                                                         --marks link \
492 519
                                                         -- \
493 520
                                                         --output-raw \
... ...
@@ -524,6 +551,34 @@ ${text_dep}"
524 551
 }
525 552
 
526 553
 
554
+# should get results from mulle-sde subprojects here
555
+run_update_on_subproject()
556
+{
557
+   log_entry "write_dependencies_file" "$@"
558
+
559
+   local text_dep
560
+
561
+   if [ -z  "${MULLE_SDE_SUBPROJECTS}" -o "${MULLE_SDE_SUBPROJECTS}" = "NONE" ]
562
+   then
563
+      return
564
+   fi
565
+
566
+   set -f; IFS=":"
567
+   for i in ${MULLE_SDE_SUBPROJECTS}
568
+   do
569
+      set +f; IFS="${DEFAULT_IFS}"
570
+
571
+      [ ! -d "${i}" ] && log_error "Subproject \"${i}\" does not exist"
572
+
573
+      (
574
+         MULLE_SDE="${MULLE_SDE}" \
575
+            "${MULLE_SDE}" --subproject "${i}" ${MULLE_SDE_FLAGS} update
576
+      )
577
+   done
578
+   set +f; IFS="${DEFAULT_IFS}"
579
+}
580
+
581
+
527 582
 main()
528 583
 {
529 584
    log_entry "main" "$@"
... ...
@@ -582,6 +637,9 @@ main()
582 637
       shift
583 638
    done
584 639
 
640
+   MULLE_SDE="${MULLE_SDE:-`command -v mulle-sde`}"
641
+   [ -z "${MULLE_SDE}" ] && fail "mulle-sde not in PATH"
642
+
585 643
    options_setup_trace "${MULLE_TRACE}"
586 644
 
587 645
    write_dependencies_file "${categorized_files}" &
... ...
@@ -38,7 +38,7 @@ main()
38 38
    local filename="$2"
39 39
    local category="$3"
40 40
 
41
-   echo "craft"
41
+   echo "none"
42 42
 }
43 43
 
44 44
 main "$@"
... ...
@@ -41,19 +41,7 @@ main()
41 41
    local filename="$2"
42 42
    local category="$3"
43 43
 
44
-   case "${action}" in
45
-      "")
46
-         echo "cmake-source-update"
47
-      ;;
48
-
49
-      "update")
50
-         echo "craft" # nothing to change in CMakeLists.txt
51
-      ;;
52
-
53
-      *)
54
-         echo "cmake-source-update-and-craft"
55
-      ;;
56
-   esac
44
+   echo "cmake-source-update"
57 45
 }
58 46
 
59 47
 main "$@"
... ...
@@ -41,12 +41,7 @@ main()
41 41
    local filename="$2"
42 42
    local category="$3"
43 43
 
44
-   if [ -z "${action}" ]
45
-   then
46
-      echo "cmake-sourcetree-update"
47
-   else
48
-      echo "cmake-sourcetree-update-and-craft"
49
-   fi
44
+   echo "cmake-sourcetree-update"
50 45
 }
51 46
 
52 47
 main "$@"
... ...
@@ -1,7 +1,8 @@
1 1
 mulle-c/c-developer;meta
2
+mulle-c/c;runtime
3
+mulle-sde/c;runtime
4
+mulle-sde/sde;extra
2 5
 mulle-c/cmake;buildtool
3 6
 mulle-sde/c-cmake;buildtool
4 7
 mulle-sde/cmake;buildtool
5
-mulle-sde/sde;buildtool
6
-mulle-c/c;runtime
7
-mulle-sde/c;runtime
8
+mulle-c/travis;extra
8 9
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-# Everything is boring
2
-*/
3
-
4
-# Except for src and test
5
-!src/
6
-!test/
7
-
8
-# Except for mulle-sourcetree where we like the etc directory...
9
-#
10
-# If we specifically exclude !.mulle-sourcetree/etc only, that's no good for
11
-# mulle-find, which collects top-level directories only. So we specifically
12
-# ignore some known-to-be-boring subfolders only
13
-#
14
-!.mulle-sourcetree/
15
-.mulle-sourcetree/var/
16
-.mulle-sourcetree/share/
17 0
deleted file mode 100644
... ...
@@ -1,38 +0,0 @@
1
-#! /usr/bin/env bash
2
-#
3
-#   Copyright (c) 2018 Nat! - Mulle kybernetiK
4
-#   All rights reserved.
5
-#
6
-#   Redistribution and use in source and binary forms, with or without
7
-#   modification, are permitted provided that the following conditions are met:
8
-#
9
-#   Redistributions of source code must retain the above copyright notice, this
10
-#   list of conditions and the following disclaimer.
11
-#
12
-#   Redistributions in binary form must reproduce the above copyright notice,
13
-#   this list of conditions and the following disclaimer in the documentation
14
-#   and/or other materials provided with the distribution.
15
-#
16
-#   Neither the name of Mulle kybernetiK nor the names of its contributors
17
-#   may be used to endorse or promote products derived from this software
18
-#   without specific prior written permission.
19
-#
20
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
-#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
-#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
-#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
-#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
-#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
-#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
-#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
-#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
-#   POSSIBILITY OF SUCH DAMAGE.
31
-#
32
-cmake_source_update_and_craft_task_run()
33
-{
34
-   log_entry "cmake_source_update_and_craft_task_run" "$@"
35
-
36
-   run_task_main "cmake-source-update"  &&
37
-   run_task_main "craft"
38
-}
39 0
deleted file mode 100644
... ...
@@ -1,38 +0,0 @@
1
-#! /usr/bin/env bash
2
-#
3
-#   Copyright (c) 2018 Nat! - Mulle kybernetiK
4
-#   All rights reserved.
5
-#
6
-#   Redistribution and use in source and binary forms, with or without
7
-#   modification, are permitted provided that the following conditions are met:
8
-#
9
-#   Redistributions of source code must retain the above copyright notice, this
10
-#   list of conditions and the following disclaimer.
11
-#
12
-#   Redistributions in binary form must reproduce the above copyright notice,
13
-#   this list of conditions and the following disclaimer in the documentation
14
-#   and/or other materials provided with the distribution.
15
-#
16
-#   Neither the name of Mulle kybernetiK nor the names of its contributors
17
-#   may be used to endorse or promote products derived from this software
18
-#   without specific prior written permission.
19
-#
20
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
-#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
-#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
-#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
-#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
-#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
-#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
-#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
-#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
-#   POSSIBILITY OF SUCH DAMAGE.
31
-#
32
-cmake_sourcetree_update_and_craft_task_run()
33
-{
34
-   log_entry "cmake_sourcetree_update_and_craft_task_run" "$@"
35
-
36
-   run_task_main "cmake-sourcetree-update" &&
37
-   run_task_main "craft"
38
-}
... ...
@@ -49,7 +49,9 @@ craft_task_run()
49 49
       remove_task_job "test"
50 50
    fi
51 51
 
52
-   if ! eval_exekutor mulle-craft ${MULLE_CRAFT_FLAGS} ${MULLE_CRAFT_ARGS}
52
+   if ! eval_exekutor mulle-sde "${MULLE_SDE_CRAFT_TASK_FLAGS}" \
53
+                      craft "$@" \
54
+                      "${MULLE_SDE_CRAFT_TASK_ARGS}"
53 55
    then
54 56
       return 1
55 57
    fi
56 58
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-test/**/*.h
2
-test/**/*.inc
3
-test/**/*.c
4 0
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-src/**/*[_-]private.h
2
-src/**/*[_-]private.inc
3
-
4 0
deleted file mode 100644
... ...
@@ -1,2 +0,0 @@
1
-
2
-src/**/*[-_]standalone.c
3 0
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+*[_-]private.h
2
+*[_-]private.inc
3
+
0 4
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+*[-_]standalone.c
0 2
similarity index 73%
1 3
rename from .mulle-sde/share/match.d/55-source--public-headers
2 4
rename to .mulle-sde/share/match.d/85-source--public-headers
... ...
@@ -1,4 +1,4 @@
1 1
 # this is the fallback if patterns file with smaller numbers fail
2 2
 
3
-src/**/*.h
4
-src/**/*.inc
3
+*.h
4
+*.inc
... ...
@@ -1,3 +1,3 @@
1 1
 # this is the fallback if patterns file with smaller numbers fail
2 2
 
3
-src/**/*.c
3
+*.c
4 4
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+0.4.1
0 2
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+0.0.0
... ...
@@ -1 +1 @@
1
-0.3.6
1
+0.6.3
... ...
@@ -1 +1 @@
1
-0.2.7
1
+0.6.3
... ...
@@ -1 +1 @@
1
-0.4.6
1
+0.6.3
... ...
@@ -1 +1 @@
1
-0.15.2
1
+0.6.3
... ...
@@ -1 +1 @@
1
-mulle-aba;tar;;a9eca791-975e-4209-b86a-d21578aa5569;${MULLE_ABA_URL:-https://github.com/mulle-c/mulle-aba/archive/${MULLE_ABA_BRANCH:-latest}.tar.gz};;;;
1
+mulle-aba;tar;no-all-load;a9eca791-975e-4209-b86a-d21578aa5569;${MULLE_ABA_URL:-https://github.com/mulle-c/mulle-aba/archive/${MULLE_ABA_BRANCH:-latest}.tar.gz};;;;
... ...
@@ -13,8 +13,8 @@ before_install:
13 13
    - curl -sS "https://www.mulle-kybernetik.com/dists/admin-pub.asc" | sudo apt-key add -
14 14
    - echo "deb [arch=all] http://www.mulle-kybernetik.com `lsb_release -c -s` main" | sudo tee "/etc/apt/sources.list.d/mulle-kybernetik.com-main.list" > /dev/null
15 15
    - sudo apt-get update
16
-   - sudo apt-get -y --allow-unauthenticated install mulle-build
16
+   - sudo apt-get -y --allow-unauthenticated install mulle-sde mulle-test
17 17
 
18 18
 script:
19
-   - mulle-build -vv -V --bootstrap
20
-   - mulle-test -vv -V
19
+   - mulle-sde craft -vvv project
20
+   - [ -d test ] && mulle-test -vvv
... ...
@@ -39,14 +39,19 @@ include( PostFiles OPTIONAL)
39 39
 include( PreLibrary OPTIONAL)
40 40
 
41 41
 add_library( "mulle-concurrent"
42
+# definitions from cmake/HeadersAndSources.cmake
42 43
 ${SOURCES}
43 44
 ${PUBLIC_HEADERS}
44 45
 ${PRIVATE_HEADERS}
46
+# definitions from cmake/share/Environment.cmake
45 47
 ${CMAKE_EDITABLE_FILES}
46 48
 )
47 49
 
50
+
51
+
48 52
 if( BUILD_SHARED_LIBS)
49 53
    target_link_libraries( mulle-concurrent
54
+# definitions from cmake/share/DependenciesAndLibraries.cmake
50 55
 ${DEPENDENCY_LIBRARIES}
51 56
 ${OS_SPECIFIC_LIBRARIES}
52 57
 )
... ...
@@ -54,34 +59,47 @@ endif()
54 59
 
55 60
 include( PostLibrary OPTIONAL)
56 61
 
62
+option( STANDALONE "Create standalone library for debugging" OFF)
57 63
 
58
-set( STANDALONE_BASE_NAME "mulle-concurrent")
59
-set( STANDALONE_NAME "mulle-concurrent-standalone")
60
-set( STANDALONE_DEFINITIONS ${MULLE_CONCURRENT_DEFINITIONS})
61
-set( STANDALONE_DEPENDENCIES
62
-mulle-concurrent
63
-)
64
-
65
-set( STANDALONE_ALL_LOAD_LIBRARIES
66
-$<TARGET_FILE:mulle-concurrent>
67
-${DEPENDENCY_LIBRARIES}
68
-${OPTIONAL_DEPENDENCY_LIBRARIES}
69
-)
70
-
71
-set( STANDALONE_NORMAL_LOAD_LIBRARIES
72
-${OS_SPECIFIC_LIBRARIES}
64
+set( INSTALL_LIBRARY_TARGETS
65
+"mulle-concurrent"
73 66
 )
74 67
 
75
-include( Standalone)
68
+if( STANDALONE)
69
+   set( STANDALONE_BASE_NAME "mulle-concurrent")
70
+   set( STANDALONE_NAME "mulle-concurrent-standalone")
71
+   set( STANDALONE_DEFINITIONS ${MULLE_CONCURRENT_DEFINITIONS})
72
+   set( STANDALONE_DEPENDENCIES
73
+   mulle-concurrent
74
+   )
75
+
76
+   set( STANDALONE_ALL_LOAD_LIBRARIES
77
+   $<TARGET_FILE:mulle-concurrent>
78
+   ${DEPENDENCY_LIBRARIES}
79
+   ${OPTIONAL_DEPENDENCY_LIBRARIES}
80
+   ${OS_SPECIFIC_LIBRARIES}
81
+   )
82
+
83
+   include( Standalone)
84
+
85
+   set( INSTALL_LIBRARY_TARGETS
86
+   ${INSTALL_LIBRARY_TARGETS}
87
+   "mulle-concurrent-standalone"
88
+   )
89
+endif()
76 90
 
77 91
 ### Install
78 92
 
79 93
 include( PreInstall OPTIONAL)
80 94
 
81
-install( TARGETS "mulle-concurrent" "mulle-concurrent-standalone" DESTINATION "lib")
95
+install( TARGETS ${INSTALL_LIBRARY_TARGETS} DESTINATION "lib")
82 96
 install( FILES ${PUBLIC_HEADERS}  DESTINATION "include/mulle-concurrent")
83 97
 install( FILES ${PRIVATE_HEADERS} DESTINATION "include/mulle-concurrent/private")
84 98
 
99
+# definitions from cmake/share/Environment.cmake
85 100
 install( FILES ${CMAKE_INCLUDES}  DESTINATION "include/mulle-concurrent/cmake")
86 101
 
102
+# definitions from cmake/share/LinkManifest.cmake
103
+install( FILES ${LINK_MANIFEST_FILES}  DESTINATION "include/mulle-concurrent/link")
104
+
87 105
 include( PostInstall OPTIONAL)
... ...
@@ -15,6 +15,8 @@ Fork      |  Build Status | Release Version
15 15
 
16 16
 ## Install
17 17
 
18
+### Manually
19
+
18 20
 Install the prerequisites first:
19 21
 
20 22
 | Prerequisites                               |
... ...
@@ -32,6 +34,9 @@ mkdir build 2> /dev/null
32 34
 )
33 35
 ```
34 36
 
37
+
38
+### Conveniently
39
+
35 40
 Or let [mulle-sde](//github.com/mulle-sde) do it all for you.
36 41
 
37 42
 
... ...
@@ -1,3 +1,9 @@
1
+# 2.0.0
2
+
3
+* migrated to mulle-sde
4
+* made headernames hyphenated
5
+* no longer distributed as a homebrew package
6
+
1 7
 ### 1.4.11
2 8
 
3 9
 * Various small improvements
... ...
@@ -1,34 +1,20 @@
1
-if( NOT __MULLE_CONCURRENT_DEPENDENCIES_AND_LIBRARIES_CMAKE__)
2
-   set( __MULLE_CONCURRENT_DEPENDENCIES_AND_LIBRARIES_CMAKE__ ON)
1
+#
2
+# The following includes include definitions generated
3
+# during `mulle-sde update`. Don't edit those files. They are
4
+# overwritten frequently.
5
+#
6
+# === MULLE-SDE START ===
3 7
 
4
-   if( MULLE_TRACE_INCLUDE)
5
-      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"")
6
-   endif()
8
+include( _Dependencies)
9
+include( _Libraries)
7 10
 
8
-   #
9
-   # Put your find_library() statements here to import other libraries
10
-   #
11
-   # Add OS specific dependencies to OS_SPECIFIC_LIBRARIES
12
-   # Add all other dependencies (rest) to DEPENDENCY_LIBRARIES
11
+# === MULLE-SDE END ===
12
+#
13 13
 
14
-
15
-   #
16
-   # The following includes include definitions generated
17
-   # during `mulle-sde update`. Don't edit those files. They are
18
-   # overwritten frequently.
19
-   #
20
-   # === MULLE-SDE START ===
21
-
22
-   include( _Dependencies)
23
-   include( _Libraries)
24
-
25
-   # === MULLE-SDE END ===
26
-   #
27
-
28
-   #
29
-   # For benefit of Windows
30
-   #
31
-   #if( MSVC)
32
-   #   set( MULLE_CONCURRENT_DEFINITIONS $<|PARENT_IDENTIFIER|>_DEFINITIONS})
33
-   #endif()
34
-endif()
14
+#
15
+# If you need more find_library() statements, that you dont want to manage
16
+# with the sourcetree, add them here.
17
+#
18
+# Add OS specific dependencies to OS_SPECIFIC_LIBRARIES
19
+# Add all other dependencies (rest) to DEPENDENCY_LIBRARIES
20
+#
35 21
similarity index 88%
36 22
rename from cmake/share/LinkAllSymbols.cmake
37 23
rename to cmake/share/AllLoad.cmake
... ...
@@ -1,5 +1,5 @@
1
-if( NOT __LINK_ALL_SYMBOLS__CMAKE__)
2
-   set( __LINK_ALL_SYMBOLS__CMAKE__ ON)
1
+if( NOT __ALL_LOAD__CMAKE__)
2
+   set( __ALL_LOAD__CMAKE__ ON)
3 3
 
4 4
    if( MULLE_TRACE_INCLUDE)
5 5
       message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6 6
new file mode 100644
... ...
@@ -0,0 +1,64 @@
1
+#
2
+# Since tests do not know how to link stuff, and we don't really want to
3
+# write a CMakeLists.txt for each test
4
+# Let's emit some specific information for tests
5
+#
6
+# We could also just grep CMakeCache.txt here, but how stable is its format ?
7
+#
8
+
9
+if( NOT __LINK_MANIFEST__CMAKE__)
10
+   set( __LINK_MANIFEST__CMAKE__ ON)
11
+
12
+  option( LINK_MANIFEST "Enable link info output" ON)
13
+
14
+
15
+  if( LINK_MANIFEST)
16
+
17
+     set( LINK_MANIFEST_FILES
18
+            ${PROJECT_BINARY_DIR}/os-specific-libraries.txt
19
+            ${PROJECT_BINARY_DIR}/dependency-libraries.txt
20
+            ${PROJECT_BINARY_DIR}/optional-dependency-libraries.txt
21
+            ${PROJECT_BINARY_DIR}/all-load-dependency-libraries.txt
22
+     )
23
+
24
+     add_custom_target( __link-manifest__ ALL
25
+                     DEPENDS ${LINK_MANIFEST_FILES}
26
+     )
27
+
28
+  # add_dependencies( MulleObjC os_specific_libs)
29
+
30
+     add_custom_command( OUTPUT ${PROJECT_BINARY_DIR}/os-specific-libraries.txt
31
+
32
+                         COMMAND echo "${OS_SPECIFIC_LIBRARIES}" | tr ";" "\\012" > ${PROJECT_BINARY_DIR}/os-specific-libraries.txt
33
+
34
+                         WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
35
+                         COMMENT "Creating os-specific-libraries.txt"
36
+                         VERBATIM)
37
+
38
+
39
+     add_custom_command( OUTPUT ${PROJECT_BINARY_DIR}/dependency-libraries.txt
40
+
41
+                         COMMAND echo "${DEPENDENCY_LIBRARIES}" | tr ";" "\\012" > ${PROJECT_BINARY_DIR}/dependency-libraries.txt
42
+
43
+                         WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
44
+                         COMMENT "Creating dependency-libraries.txt"
45
+                         VERBATIM)
46
+
47
+     add_custom_command( OUTPUT ${PROJECT_BINARY_DIR}/optional-dependency-libraries.txt
48
+
49
+                         COMMAND echo "${OPTIONAL_DEPENDENCY_LIBRARIES}" | tr ";" "\\012" > ${PROJECT_BINARY_DIR}/optional-dependency-libraries.txt
50
+
51
+                         WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
52
+                         COMMENT "Creating optional-dependency-libraries.txt"
53
+                         VERBATIM)
54
+
55
+
56
+     add_custom_command( OUTPUT ${PROJECT_BINARY_DIR}/all-load-dependency-libraries.txt
57
+
58
+                         COMMAND echo "${ALL_LOAD_DEPENDENCY_LIBRARIES}" | tr ";" "\\012" > ${PROJECT_BINARY_DIR}/all-load-dependency-libraries.txt
59
+
60
+                         WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
61
+                         COMMENT "Creating all-load-dependency-libraries.txt"
62
+                         VERBATIM)
63
+  endif()
64
+endif()
... ...
@@ -5,6 +5,7 @@ if( NOT __POST_LIBRARY__CMAKE__)
5 5
       message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6 6
    endif()
7 7
 
8
+   include( LinkManifest)
8 9
    include( FinalOutput)
9 10
 
10 11
    include( PostLibraryCAux OPTIONAL)
... ...
@@ -1,3 +1,26 @@
1
+#
2
+# A standalone library is a combination of multiple static libraries into
3
+# one shared library. Due to deficiencies in cmake on windows it is necessary
4
+# to have at lease one extra .c or .m file in the standalone library
5
+# defined in STANDALONE_SOURCES.
6
+#
7
+
8
+#
9
+# Input:
10
+#
11
+# STANDALONE_BASE_NAME
12
+# STANDALONE_ALL_LOAD_LIBRARIES
13
+# STANDALONE_SOURCES
14
+#
15
+# Optional:
16
+#
17
+# STANDALONE_NAME
18
+# STANDALONE_DEFINITIONS
19
+# STANDALONE_SYMBOL_PREFIXES
20
+# STANDALONE_NORMAL_LOAD_LIBRARIES
21
+# MULLE_LANGUAGE
22
+#
23
+
1 24
 if( NOT __STANDALONE__CMAKE__)
2 25
    set( __STANDALONE__CMAKE__ ON)
3 26
 
... ...
@@ -6,146 +29,129 @@ if( NOT __STANDALONE__CMAKE__)
6 29
    endif()
7 30
 
8 31
    #
9
-   # A standalone library is a combination of multiple static libraries into
10
-   # one shared library. Due to deficiencies in cmake on windows it is necessary
11
-   # to have at lease one extra .c or .m file in the standalone library
12
-   # defined in STANDALONE_SOURCES.
13
-   #
14
-
15
-   #
16
-   # Input:
17
-   #
18
-   # STANDALONE_BASE_NAME
19
-   # STANDALONE_ALL_LOAD_LIBRARIES
20
-   # STANDALONE_SOURCES
21
-   #
22
-   # Optional:
23
-   #
24
-   # STANDALONE_NAME
25
-   # STANDALONE_DEFINITIONS
26
-   # STANDALONE_SYMBOL_PREFIXES
27
-   # STANDALONE_NORMAL_LOAD_LIBRARIES
28
-   # MULLE_LANGUAGE
29
-   #
30
-   set( STANDALONE_VERSION 3)
32
+   # option must be set in CMakeLists.txt
33
+   # option( STANDALONE "Create standalone library for debugging" OFF)
31 34
 
35
+   if( STANDALONE)
36
+      set( STANDALONE_VERSION 3)
32