Browse code

* migrated to mulle-sde

Nat! authored on 14-03-2018 22:05:05 • Nat! committed on 24-05-2018 20:42:01
Showing 118 changed files
... ...
@@ -1,8 +1,6 @@
1 1
 .DS_Store
2 2
 *[Bb]uild/
3 3
 .idea/
4
-.repos/
5
-project.xcworkspace/
6 4
 *.old
7 5
 *.bak
8 6
 *.exe
... ...
@@ -11,42 +9,58 @@ project.xcworkspace/
11 9
 xcuserdata/
12 10
 tmp/
13 11
 
14
-/.bootstrap.auto/
15
-/.bootstrap.local/
12
+/research/
13
+test/include/
14
+test/lib/
16 15
 
17
-/addictions/
18
-/dependencies/
16
+test/vararg/char/double_char
17
+test/vararg/char/int_char
18
+test/vararg/char/longlong_char
19
+test/vararg/char/pointer_char
20
+test/vararg/count/count
21
+test/vararg/double/double_double
22
+test/vararg/double/int_double
23
+test/vararg/double/longlong_double
24
+test/vararg/double/pointer_double
25
+test/vararg/int/char_int
26
+test/vararg/int/double_int
27
+test/vararg/int/int_int
28
+test/vararg/int/longlong_int
29
+test/vararg/int/pointer_int
30
+test/vararg/longlong/double_longlong
31
+test/vararg/longlong/int_longlong
32
+test/vararg/longlong/longlong_longlong
33
+test/vararg/longlong/pointer_longlong
34
+test/vararg/pointer/double_pointer
35
+test/vararg/pointer/int_pointer
36
+test/vararg/pointer/longlong_pointer
19 37
 
20
-/mulle-configuration
21
-/tests/mulle-tests
22
-/bin/mulle-homebrew
38
+# ### > generated by mulle-sde (extensions/mulle-sde/sde/init)
23 39
 
24
-/research/
25
-tests/include/
26
-tests/lib/
27
-
28
-tests/vararg/char/double_char
29
-tests/vararg/char/int_char
30
-tests/vararg/char/longlong_char
31
-tests/vararg/char/pointer_char
32
-tests/vararg/count/count
33
-tests/vararg/double/double_double
34
-tests/vararg/double/int_double
35
-tests/vararg/double/longlong_double
36
-tests/vararg/double/pointer_double
37
-tests/vararg/int/char_int
38
-tests/vararg/int/double_int
39
-tests/vararg/int/int_int
40
-tests/vararg/int/longlong_int
41
-tests/vararg/int/pointer_int
42
-tests/vararg/longlong/double_longlong
43
-tests/vararg/longlong/int_longlong
44
-tests/vararg/longlong/longlong_longlong
45
-tests/vararg/longlong/pointer_longlong
46
-tests/vararg/pointer/double_pointer
47
-tests/vararg/pointer/int_pointer
48
-tests/vararg/pointer/longlong_pointer
49
-/tests/mulle-tests/
50
-/.bootstrap.repos
51
-/stashes
52
-bin/tap-info.sh
40
+# generally /var and directories are not interesting
41
+.mulle-*/var/
42
+
43
+# .mulle-env /bin and /libexec are not interesting
44
+
45
+.mulle-env/bin/
46
+.mulle-env/libexec/
47
+
48
+# style is "fluctuating" on a per-user level so not interesting
49
+.mulle-env/etc/style
50
+
51
+# dynamically .mulle-sourcetree-fix is boring
52
+.mulle-sourcetree-fix
53
+
54
+# stashes are generally boring
55
+
56
+# build stuff is boring too
57
+build/
58
+dependency/
59
+addiction/
60
+stash/
61
+*.tmp/
62
+tmp.*/
63
+
64
+# ### < generated by mulle-sde (extensions/mulle-sde/sde/init)
65
+
66
+*.sublime-workspace
53 67
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+
2
+cc
3
+gcc
4
+ld
5
+inotifywait
6
+ssh
7
+ninja
0 8
new file mode 100644
... ...
@@ -0,0 +1,70 @@
1
+mudo
2
+
3
+cat
4
+chgrp
5
+chmod
6
+chown
7
+cp
8
+date
9
+dd
10
+df
11
+dmesg
12
+echo
13
+false
14
+hostname
15
+kill
16
+ln
17
+login
18
+ls
19
+mkdir
20
+mknod
21
+more
22
+mount
23
+mv
24
+ps
25
+pwd
26
+rm
27
+rmdir
28
+sed
29
+sh
30
+stty
31
+su
32
+sync
33
+true
34
+umount
35
+uname
36
+
37
+awk
38
+basename
39
+base64
40
+bash
41
+clear
42
+command
43
+cut
44
+dirname
45
+ed
46
+egrep
47
+env
48
+expr
49
+find
50
+fgrep
51
+grep
52
+head
53
+less
54
+more
55
+readlink
56
+sleep
57
+sort
58
+stat
59
+tail
60
+test
61
+tr
62
+vi
63
+wc
64
+which
65
+curl
66
+column
67
+git
68
+uuidgen
69
+cmake
70
+make
0 71
new file mode 100644
... ...
@@ -0,0 +1,34 @@
1
+# By default assume a project has source and a sourcetree
2
+export MULLE_SDE_UPDATE_CALLBACKS="source,sourcetree"
3
+
4
+
5
+#
6
+#
7
+#
8
+export MULLE_SDE_INSTALLED_VERSION="0.14.1"
9
+
10
+
11
+#
12
+#
13
+#
14
+export MULLE_SDE_INSTALLED_EXTENSIONS="--meta 'mulle-c/c-cmake'"
15
+
16
+
17
+#
18
+#
19
+#
20
+export PROJECT_NAME="mulle-vararg"
21
+
22
+
23
+#
24
+#
25
+#
26
+export PROJECT_LANGUAGE="c"
27
+
28
+
29
+#
30
+#
31
+#
32
+export PROJECT_TYPE="library"
33
+
34
+
0 35
new file mode 100644
... ...
@@ -0,0 +1,40 @@
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-mirrors"
6
+
7
+#
8
+# Git mirror and Zip/TGZ cache to conserve bandwidth
9
+#
10
+export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/.cache/mulle-fetch/archives"
11
+
12
+#
13
+# PATH to search for git repositories locally
14
+#
15
+export MULLE_FETCH_SEARCH_PATH="${MULLE_VIRTUAL_ROOT}/.."
16
+
17
+#
18
+# Prefer symlinks 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}/stashes"
26
+
27
+#
28
+# Use common build directory
29
+#
30
+export BUILD_DIR="${MULLE_VIRTUAL_ROOT}/build"
31
+
32
+#
33
+# Share dependencies directory (absolute for ease of use)
34
+#
35
+export DEPENDENCIES_DIR="${MULLE_VIRTUAL_ROOT}/dependencies"
36
+
37
+#
38
+# Share addictions directory (absolute for ease of use)
39
+#
40
+export ADDICTIONS_DIR="${MULLE_VIRTUAL_ROOT}/addictions"
0 41
new file mode 100644
... ...
@@ -0,0 +1,77 @@
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
+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
+#
14
+# The aux file if present is to be set by mulle-sde extensions.
15
+# The trick here is that mulle-env doesn't clobber this file
16
+# when doing an init -f, which can be useful. There is no etc
17
+# equivalent.
18
+#
19
+if [ -f "${MULLE_ENV_SHARE_DIR}/environment-aux.sh" ]
20
+then
21
+   . "${MULLE_ENV_SHARE_DIR}/environment-aux.sh"
22
+fi
23
+
24
+#
25
+# Default environment values set by plugins and extensions.
26
+# The user should never edit them. He can override settings
27
+# in etc.
28
+#
29
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-global.sh" ]
30
+then
31
+   . "${MULLE_ENV_ETC_DIR}/environment-global.sh"
32
+else
33
+   if [ -f "${MULLE_ENV_SHARE_DIR}/environment-global.sh" ]
34
+   then
35
+      . "${MULLE_ENV_SHARE_DIR}/environment-global.sh"
36
+   fi
37
+fi
38
+
39
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-os-${MULLE_UNAME}.sh" ]
40
+then
41
+   . "${MULLE_ENV_ETC_DIR}/environment-os-${MULLE_UNAME}.sh"
42
+else
43
+   if [ -f "${MULLE_ENV_SHARE_DIR}/environment-os-${MULLE_UNAME}.sh" ]
44
+   then
45
+      . "${MULLE_ENV_SHARE_DIR}/environment-os-${MULLE_UNAME}.sh"
46
+   fi
47
+fi
48
+
49
+#
50
+# Load in some modifications depending on  hostname, username. These
51
+# won't be provided by extensions or plugins.
52
+#
53
+# These settings could be "cased" in a single file, but it seems convenient.
54
+# And more managable for mulle-env environment
55
+#
56
+
57
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-host-${HOSTNAME}.sh" ]
58
+then
59
+   . "${MULLE_ENV_ETC_DIR}/environment-host-${HOSTNAME}.sh"
60
+fi
61
+
62
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-user-${USER}.sh" ]
63
+then
64
+   . "${MULLE_ENV_ETC_DIR}/environment-user-${USER}.sh"
65
+fi
66
+
67
+#
68
+# For more complex edits, that don't work with the cmdline tool
69
+#
70
+if [ -f "${MULLE_ENV_ETC_DIR}/environment-aux.sh" ]
71
+then
72
+   . "${MULLE_ENV_ETC_DIR}/environment-aux.sh"
73
+fi
74
+
75
+unset MULLE_ENV_ETC_DIR
76
+unset MULLE_ENV_SHARE_DIR
77
+unset HOSTNAME
0 78
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+#
2
+# Git mirror and Zip/TGZ cache to conserve bandwidth
3
+#
4
+export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/git-mirror"
5
+export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/archive"
0 6
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+#
2
+#
3
+#
4
+export PROJECT_TYPE="library"
5
+
6
+
7
+#
8
+#
9
+#
10
+export PROJECT_LANGUAGE="c"
11
+
12
+
13
+#
14
+#
15
+#
16
+export PROJECT_NAME="mulle-vararg"
17
+
18
+
19
+#
20
+#
21
+#
22
+export PROJECT_SOURCE_DIR="src"
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
+
0 60
new file mode 100644
... ...
@@ -0,0 +1,102 @@
1
+[ "${TRACE}" = "YES" ] && set -x  && : "$0" "$@"
2
+
3
+#
4
+# If mulle-env is broken, sometimes its nice just to source this file.
5
+# If you're sourcing this manually on a regular basis, you're doing it wrong.
6
+#
7
+# We need some minimal stuff to get things going though:
8
+#     sed, cut, tr, hostname, pwd, uname
9
+#
10
+if [ -z "${MULLE_UNAME}" ]
11
+then
12
+   MULLE_UNAME="`PATH=/bin:/usr/bin uname | \
13
+                  PATH=/bin:/usr/bin cut -d_ -f1 | \
14
+                  PATH=/bin:/usr/bin sed 's/64$//' | \
15
+                  PATH=/bin:/usr/bin tr 'A-Z' 'a-z'`"
16
+   export MULLE_UNAME
17
+fi
18
+if [ -z "${MULLE_VIRTUAL_ROOT}" ]
19
+then
20
+   MULLE_VIRTUAL_ROOT="`PATH=/bin:/usr/bin pwd -P`"
21
+   echo "Using ${MULLE_VIRTUAL_ROOT} as MULLE_VIRTUAL_ROOT for \
22
+your convenience" >&2
23
+fi
24
+
25
+alias mulle-env-reload='. "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/include-environment.sh"'
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}"`"
33
+
34
+      case "${PS1}" in
35
+         *\\h\[*)
36
+         ;;
37
+
38
+         *\\h*)
39
+            PS1="$(sed 's/\\h/\\h\['${envname}'\]/' <<< '${PS1}' )"
40
+         ;;
41
+
42
+         *)
43
+            PS1='\u@\h['${envname}'] \W$ '
44
+         ;;
45
+      esac
46
+      export PS1
47
+
48
+      unset envname
49
+
50
+      # install cd catcher
51
+      . "${MULLE_ENV_LIBEXEC_DIR}/mulle-env-cd.sh"
52
+      unset MULLE_ENV_LIBEXEC_DIR
53
+
54
+      mulle-env-reload
55
+   ;;
56
+
57
+   *)
58
+      set -a ; mulle-env-reload     # export all definitions for command
59
+      ${COMMAND}
60
+      exit $?
61
+   ;;
62
+esac
63
+
64
+
65
+#
66
+# Source in bash completion if available
67
+# Assumed is, that they are not user modifiable
68
+#
69
+case "${MULLE_SHELL_MODE}" in
70
+   *INTERACTIVE*)
71
+      DEFAULT_IFS="${IFS}"
72
+      shopt -s nullglob; IFS="
73
+"
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}"
79
+
80
+      unset FILENAME
81
+      unset DEFAULT_IFS
82
+   ;;
83
+esac
84
+
85
+#
86
+#
87
+# show motd, if any
88
+#
89
+if [ -z ""]
90
+then
91
+   if [ -f "${MULLE_VIRTUAL_ROOT}/.mulle-env/etc/motd" ]
92
+   then
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
99
+   fi
100
+else
101
+   unset NO_MOTD
102
+fi
0 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
0 95
new file mode 100644
... ...
@@ -0,0 +1,12 @@
1
+\
2
+#! /usr/bin/env bash
3
+
4
+#
5
+# install completion if not yet present.
6
+# mulle-sde-bash-completion.sh will load the inferior completes
7
+#
8
+if [ "`type -t "_mulle_sde_complete"`" != "function" ]
9
+then
10
+   . "$(mulle-sde libexec-dir)/mulle-sde-bash-completion.sh"
11
+fi
12
+
0 13
new file mode 100644
... ...
@@ -0,0 +1,168 @@
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
+[ "${TRACE}" = "YES" ] && set -x && : "$0" "$@"
33
+
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
+
61
+_mulle_env_complete()
62
+{
63
+   local cur=${COMP_WORDS[COMP_CWORD]}
64
+   local prev=${COMP_WORDS[COMP_CWORD-1]}
65
+
66
+   local list
67
+   local i
68
+   local context
69
+
70
+   for i in "${COMP_WORDS[@]}"
71
+   do
72
+      case "$i" in
73
+         environment|init|style|subenv|tool)
74
+            context="$i"
75
+         ;;
76
+      esac
77
+   done
78
+
79
+   case "${context}" in
80
+      tool)
81
+         case "$prev" in
82
+            remove)
83
+               list="`mulle-env -e tool list`"
84
+               COMPREPLY=( $( compgen -W "${list}" -- "$cur" ) )
85
+            ;;
86
+
87
+            list)
88
+            ;;
89
+
90
+            add)
91
+            ;;
92
+
93
+            *)
94
+               COMPREPLY=( $( compgen -W "add remove list}" -- "$cur" ) )
95
+            ;;
96
+         esac
97
+      ;;
98
+
99
+      environment)
100
+         case "$prev" in
101
+            get|set)
102
+               list="`mulle-env -s environment list | sed 's/^\([^=]*\).*/\1/'`"
103
+               COMPREPLY=( $( compgen -W "${list}" -- "$cur" ) )
104
+            ;;
105
+
106
+            list)
107
+            ;;
108
+
109
+            --scope)
110
+               list="`mulle-env -s environment scopes`"
111
+               COMPREPLY=( $( compgen -W "${list}" -- "$cur" ) )
112
+            ;;
113
+
114
+            *)
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
124
+            ;;
125
+         esac
126
+      ;;
127
+
128
+      subenv)
129
+         COMPREPLY=( $( compgen -d -- "$cur" ) )
130
+      ;;
131
+
132
+      style)
133
+         _mulle_env_style_complete
134
+      ;;
135
+
136
+      *)
137
+         case "$prev" in
138
+            -s|--style)
139
+               _mulle_env_style_complete
140
+            ;;
141
+
142
+            -d|--directory)
143
+               COMPREPLY=( $( compgen -d -- "$cur" ) )
144
+            ;;
145
+
146
+            *)
147
+               case "$cur" in
148
+                  -*)
149
+                     COMPREPLY=( $( compgen -W "--style --directory" -- "$cur" ) )
150
+                  ;;
151
+
152
+                  *)
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
159
+                  ;;
160
+               esac
161
+            ;;
162
+         esac
163
+      ;;
164
+   esac
165
+}
166
+
167
+complete -F _mulle_env_complete mulle-env
168
+
0 169
new file mode 100644
... ...
@@ -0,0 +1,10 @@
1
+#! /usr/bin/env bash
2
+
3
+#
4
+# install completion if not yet present.
5
+# mulle-sde-bash-completion.sh will load the inferior completes
6
+#
7
+if [ "`type -t "_mulle_sde_complete"`" != "function" ]
8
+then
9
+   . "$(mulle-sde libexec-dir)/mulle-sde-bash-completion.sh"
10
+fi
0 11
new file mode 100644
... ...
@@ -0,0 +1,2 @@
1
+Ready to build with:
2
+   mulle-sde craft
0 3
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+
2
+inotifywait
3
+ssh
4
+cc
5
+gcc
6
+ld
7
+ninja
0 8
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+mulle/wild
0 2
new file mode 100644
... ...
@@ -0,0 +1,70 @@
1
+mudo
2
+
3
+cat
4
+chgrp
5
+chmod
6
+chown
7
+cp
8
+date
9
+dd
10
+df
11
+dmesg
12
+echo
13
+false
14
+hostname
15
+kill
16
+ln
17
+login
18
+ls
19
+mkdir
20
+mknod
21
+more
22
+mount
23
+mv
24
+ps
25
+pwd
26
+rm
27
+rmdir
28
+sed
29
+sh
30
+stty
31
+su
32
+sync
33
+true
34
+umount
35
+uname
36
+
37
+awk
38
+basename
39
+base64
40
+bash
41
+clear
42
+command
43
+cut
44
+dirname
45
+ed
46
+egrep
47
+env
48
+expr
49
+find
50
+fgrep
51
+grep
52
+head
53
+less
54
+more
55
+readlink
56
+sleep
57
+sort
58
+stat
59
+tail
60
+test
61
+tr
62
+vi
63
+wc
64
+which
65
+curl
66
+column
67
+git
68
+uuidgen
69
+cmake
70
+make
0 71
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+0.12.1
0 2
new file mode 100755
... ...
@@ -0,0 +1,405 @@
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
+
33
+[ "${TRACE}" = "YES" ] && set -x && : "$0" "$@"
34
+
35
+
36
+usage()
37
+{
38
+   cat <<EOF >&2
39
+Usage:
40
+   c-sourcetree-update <action> <filename> <category>
41
+
42
+   This produces the _dependencies.h or some similiarly named file.
43
+
44
+EOF
45
+   exit 1
46
+}
47
+
48
+
49
+#
50
+# this is bullshit right now, just in the process of building it up
51
+#
52
+uname_to_cpp()
53
+{
54
+   log_entry "uname_to_cmake" "$@"
55
+
56
+   local uname="$1"
57
+
58
+   case "${uname}" in
59
+      darwin)
60
+         echo "__APPLE__"
61
+      ;;
62
+
63
+      "")
64
+         fail "uname is empty"
65
+      ;;
66
+
67
+      *)
68
+         echo "__`tr 'a-z' 'A-Z' <<< "${uname}"`__"
69
+      ;;
70
+   esac
71
+}
72
+
73
+
74
+osexclude_to_cpp_if()
75
+{
76
+   log_entry "osexclude_to_cpp_if" "$@"
77
+
78
+   local marks="$1"
79
+
80
+   local cppvar
81
+
82
+   local excludes
83
+   local onlys
84
+
85
+   set -o noglob ; IFS=","
86
+
87
+   for osexclude in ${marks}
88
+   do
89
+      IFS="${DEFAULT_IFS}"; set +o noglob
90
+
91
+      case "${osexclude}" in
92
+         only-os-*)
93
+            cppvar="`uname_to_cpp "${osexclude:8}"`"
94
+            onlys="`concat "${onlys}" "defined( ${cppvar})" " || " `"
95
+         ;;
96
+
97
+         no-os-*)
98
+            cppvar="`uname_to_cpp "${osexclude:6}"`"
99
+            excludes="`concat "${excludes}" "! defined( ${cppvar})" " && "`"
100
+         ;;
101
+      esac
102
+   done
103
+   IFS="${DEFAULT_IFS}"; set +o noglob
104
+
105
+   if [ ! -z "${onlys}" ]
106
+   then
107
+      echo "# if ${onlys}"
108
+      return
109
+   fi
110
+
111
+   if [ ! -z "${excludes}" ]
112
+   then
113
+      echo "# if ${excludes}"
114
+   fi
115
+}
116
+
117
+
118
+_emit_c_include()
119
+{
120
+   log_entry "_emit_c_include" "$@"
121
+
122
+   local address="$1"
123
+   local header="$2"
124
+   local marks="$3"
125
+   local aliases="$4"
126
+
127
+   local indent
128
+   local ifstatement
129
+   local include
130
+   local mark
131
+
132
+   #
133
+   # so objc can reuse this, make a provision for import with --objc flag
134
+   # but allow #include if the mark no-objc is set
135
+   #
136
+   include="include"
137
+   if [ "${OPTION_OBJC}" = "YES" ]
138
+   then
139
+      include="import"
140
+
141
+      set -o noglob ; IFS=","
142
+      for mark in ${marks}
143
+      do
144
+         if [ "${mark}" = "no-objc" ]
145
+         then
146
+            include="include"
147
+            break
148
+         fi
149
+      done
150
+      IFS="${DEFAULT_IFS}" ; set o noglob
151
+   fi
152
+
153
+   if [ ! -z "${marks}" ]
154
+   then
155
+      ifstatement="`osexclude_to_cpp_if "${marks}" `"
156
+   fi
157
+
158
+   if [ ! -z "${ifstatement}" ]
159
+   then
160
+      echo "${ifstatement}"
161
+      indent=" "
162
+   fi
163
+
164
+   echo "# ${indent}include <${header}>   // ${address}"
165
+   if [ ! -z "${ifstatement}" ]
166
+   then
167
+      echo "# endif"
168
+   fi
169
+
170
+   echo
171
+}
172
+
173
+
174
+emit_c_include_library()
175
+{
176
+   log_entry "emit_c_include_library" "$@"
177
+
178
+   local address="$1"
179
+   local marks="$2"
180
+   local aliases="$3"
181
+   local header="$4"
182
+
183
+   #
184
+   # the default for libraries is old style <name.h> not <name/name.h>
185
+   #
186
+   if [ -z "${header}" ]
187
+   then
188
+      local name
189
+
190
+      name="`fast_basename "${address}"`"
191
+      header="${name}.h"
192
+   fi
193
+
194
+   _emit_c_include "${address}" "${header}" "${marks}" "${aliases}"
195
+
196
+}
197
+
198
+
199
+emit_c_include_dependency()
200
+{
201
+   log_entry "emit_c_include_dependency" "$@"
202
+
203
+   local address="$1"
204
+   local marks="$2"
205
+   local aliases="$3"
206
+   local header="$4"
207
+
208
+   #
209
+   # the default for dependencies is <name/name.h>
210
+   #
211
+   if [ -z "${header}" ]
212
+   then
213
+      local name
214
+
215
+      name="`fast_basename "${address}"`"
216
+      header="${name}/${name}.h"
217
+   fi
218
+
219
+   _emit_c_include "${address}" "${header}" "${marks}" "${aliases}"
220
+}
221
+
222
+
223
+emit_c_header()
224
+{
225
+   log_entry "emit_c_header" "$@"
226
+
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
237
+
238
+   local dependency
239
+
240
+   set -o noglob ; IFS="
241
+"
242
+   for header in ${headers}
243
+   do
244
+      IFS="${DEFAULT_IFS}"; set +o noglob
245
+
246
+      local address
247
+      local marks
248
+      local include
249
+
250
+      IFS=";" read address marks aliases include <<< "${header}"
251
+
252
+      if [ -z "${address}" ]
253
+      then
254
+         continue
255
+      fi
256
+
257
+      log_verbose "Emit statements for ${C_MAGENTA}${C_BOLD}${address}"
258
+
259
+      case ",${marks}," in
260
+         *,no-dependency,*)
261
+            emit_c_include_library "${address}" \
262
+                                   "${marks}" \
263
+                                   "${aliases}" \
264
+                                   "${include}" \
265
+                                   "$@"
266
+         ;;
267
+
268
+         *)
269
+            emit_c_include_dependency "${address}" \
270
+                                      "${marks}" \
271
+                                      "${aliases}" \
272
+                                      "${include}" \
273
+                                      "$@"
274
+         ;;
275
+      esac
276
+   done
277
+
278
+   IFS="${DEFAULT_IFS}"; set +o noglob
279
+}
280
+
281
+
282
+main()
283
+{
284
+   log_entry "main" "$@"
285
+
286
+   # technical flags
287
+   local MULLE_TRACE
288
+   local MULLE_FLAG_DONT_DEFER="NO"
289
+   local MULLE_FLAG_EXEKUTOR_DRY_RUN="NO"
290
+   local MULLE_FLAG_FOLLOW_SYMLINKS="YES"
291
+   local MULLE_FLAG_LOG_CACHE="NO"
292
+   local MULLE_FLAG_LOG_DEBUG="NO"
293
+   local MULLE_FLAG_LOG_EXEKUTOR="NO"
294
+   local MULLE_FLAG_LOG_FLUFF="NO"
295
+   local MULLE_FLAG_LOG_MERGE="NO"
296
+   local MULLE_FLAG_LOG_SCRIPTS="NO"
297
+   local MULLE_FLAG_LOG_SETTINGS="NO"
298
+   local MULLE_FLAG_LOG_VERBOSE="NO"
299
+   local MULLE_TRACE_PATHS_FLIP_X="NO"
300
+   local MULLE_TRACE_POSTPONE="NO"
301
+   local MULLE_TRACE_RESOLVER_FLIP_X="NO"
302
+   local MULLE_TRACE_SETTINGS_FLIP_X="NO"
303
+
304
+   local OPTION_OBJC_HEURISTIC="NO"
305
+
306
+   while [ $# -ne 0 ]
307
+   do
308
+      if options_technical_flags "$1"
309
+      then
310
+         shift
311
+         continue
312
+      fi
313
+
314
+      case "$1" in
315
+         -h*|--help|help)
316
+            usage
317
+         ;;
318
+
319
+         --objc)
320
+            OPTION_OBJC="YES"
321
+         ;;
322
+
323
+         -*)
324
+            log_error "unknown option \"$1\""
325
+            usage
326
+         ;;
327
+
328
+         *)
329
+            break
330
+         ;;
331
+      esac
332
+
333
+      shift
334
+   done
335
+
336
+   options_setup_trace "${MULLE_TRACE}"
337
+
338
+
339
+   local projectname
340
+
341
+   projectname="${PROJECT_NAME}"
342
+   if [ -z "${projectname}" ]
343
+   then
344
+      projectname="`fast_basename "${PWD}"`" # could be nicer
345
+   fi
346
+
347
+   if [ "${MULLE_SDE_DEPENDENCIES_HEADER_FILE}" = "NONE" ]
348
+   then
349
+      return
350
+   fi
351
+
352
+   if [ -z "${MULLE_SDE_DEPENDENCIES_HEADER_FILE}" ]
353
+   then
354
+      MULLE_SDE_DEPENDENCIES_HEADER_FILE="${PROJECT_SOURCE_DIR:-src}/_${projectname}-dependencies.h"
355
+   fi
356
+
357
+   local text_h
358
+   local text_dep
359
+
360
+   text_h="`emit_c_header`"     || exit 1
361
+
362
+   if [ -z "${text_h}" ]
363
+   then
364
+      text_h="/* no headers */"
365
+   fi
366
+
367
+   local projectidentifier
368
+
369
+   projectidentifier="`tr 'A-Z-' 'a-z_' <<< "${projectname}" `"
370
+
371
+   text_h="/*
372
+   This file will be regenerated by \`mulle-sde update|monitor\`.
373
+   Edits will be lost.
374
+*/
375
+
376
+#ifndef _${projectidentifier}__dependencies_h__
377
+#define _${projectidentifier}__dependencies_h__
378
+
379
+${text_h}
380
+
381
+#endif"
382
+
383
+   log_fluff "Create header file (${PWD})"
384
+
385
+   log_verbose "Writing ${C_RESET_BOLD}${MULLE_SDE_DEPENDENCIES_HEADER_FILE}"
386
+   redirect_exekutor "${MULLE_SDE_DEPENDENCIES_HEADER_FILE}" echo "${text_h}"
387
+}
388
+
389
+
390
+_init()
391
+{
392
+   if [ -z "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}" ]
393
+   then
394
+      MULLE_BASHFUNCTIONS_LIBEXEC_DIR="`mulle-bashfunctions-env "libexec-dir" 2> /dev/null`"
395
+      [ -z "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}" ] && \
396
+         echo "mulle-bashfunctions-env not installed" >&2 && \
397
+         exit 1
398
+   fi
399
+
400
+   . "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}/mulle-bashfunctions.sh" "minimal" || exit 1
401
+}
402
+
403
+_init "$@"
404
+main "$@"
405
+
0 406
new file mode 100755
... ...
@@ -0,0 +1,338 @@
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
+# Create fresh HeadersAndSources.cmake from filesystem information
33
+#
34
+[ "${TRACE}" = "YES" ] && set -x && : "$0" "$@"
35
+
36
+
37
+CMAKE_SOURCE_UPDATE_VERSION="0.0.1"
38
+
39
+
40
+usage()
41
+{
42
+   if [ ! -z "$1" ]
43
+   then
44
+      log_error "$1"
45
+   fi
46
+
47
+   cat <<EOF >&2
48
+Usage:
49
+   mulle-sde-cmake-source-update
50
+
51
+   Let mulle-monitor or mulle-sde run this for you.
52
+