Skip to content

Commit 016f935

Browse files
committed
initial version
0 parents  commit 016f935

File tree

122 files changed

+3697
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+3697
-0
lines changed

.ackrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--ignore-dir=addiction
2+
--ignore-dir=build
3+
--ignore-dir=dependency
4+
--ignore-dir=kitchen
5+
--ignore-dir=stash
6+
--ignore-dir=.mulle/var

.gdb_history

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
b emit_flush
2+
run < x
3+
p *e
4+
q

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
kitchen/
2+
stash/
3+
var/
4+
dependency/

.mulle/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
var/
2+
environment-host-*.sh
3+
!environment-host-ci-*.sh

.mulle/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# .mulle
2+
3+
This `.mulle` folder is used by [mulle-sde](//mulle-sde.gihub.io) to
4+
store project information.
5+
6+
## Structure
7+
8+
* `etc` is user editable, changes will be preserved.
9+
* `share` is read only, changes will be lost on the next upgrade.
10+
* `var` is ephemeral. You can delete and it will get recreated.
11+
12+
Every mulle-sde tool may have its own subfolder within those three folders.
13+
It's name will be the name of the tool without the "mulle-" prefix.
14+
15+
You can edit the files in `etc` with any editor, but for consistency and
16+
ease of use, it's usually better to use the appropriate mulle-sde tool.
17+
18+
## Remove .mulle
19+
20+
The share folder is often write protected, to prevent accidental user edits.
21+
22+
```
23+
chmod -R ugo+rwX .mulle && rm -rf .mulle
24+
```
25+

.mulle/etc/env/auxscope

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project;20

.mulle/etc/env/environment-project.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Edit with: mulle-env environment --scope project set <key> <value>
2+
#
3+
#
4+
#
5+
export PROJECT_TYPE="executable"
6+
7+
8+
#
9+
#
10+
#
11+
export PROJECT_SOURCE_DIR="src"
12+
13+
14+
#
15+
#
16+
#
17+
export PROJECT_NAME="mulle-c-string-escape"
18+
19+
20+
#
21+
#
22+
#
23+
export PROJECT_LANGUAGE="c"
24+
25+
26+
#
27+
#
28+
#
29+
export PROJECT_DIALECT="c"
30+
31+
32+
#
33+
#
34+
#
35+
export PROJECT_EXTENSIONS="c"
36+
37+

.mulle/share/env/auxscope

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extension;30
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Reset to empty
3+
#
4+
export MULLE_SDE_REFLECT_CALLBACKS="sourcetree:source"
5+
6+
7+
#
8+
# Used by `mulle-match find` to speed up the search.
9+
#
10+
export MULLE_MATCH_FILENAMES="config*:*.h:*.inc:*.c:CMakeLists.txt:*.cmake"
11+
12+
13+
#
14+
# Used by `mulle-match find` to locate files
15+
#
16+
export MULLE_MATCH_PATH=".mulle/etc/sourcetree:${PROJECT_SOURCE_DIR}:CMakeLists.txt:cmake"
17+
18+
19+
#
20+
# Used by `mulle-match find` to ignore boring subdirectories like .git
21+
#
22+
export MULLE_MATCH_IGNORE_PATH=""
23+
24+
25+
#
26+
# tell mulle-sde to keep files protected from read/write changes
27+
#
28+
export MULLE_SDE_PROTECT_PATH="cmake/share"
29+
30+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+
6+
#
7+
# Git mirror and Zip/TGZ cache to conserve bandwidth
8+
#
9+
export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/archive"
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# Git mirror and Zip/TGZ cache to conserve bandwidth
3+
# Memo: Will often be overridden in an os-specific environment file
4+
# Can be overridden with -DMULLE_FETCH_ARCHIVE_DIR on the commandline
5+
#
6+
export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/.cache/mulle-fetch/git-mirror"
7+
8+
#
9+
# Git mirror and Zip/TGZ cache to conserve bandwidth
10+
#
11+
export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/.cache/mulle-fetch/archive"
12+
13+
#
14+
# PATH to search for git repositories locally.
15+
#
16+
export MULLE_FETCH_SEARCH_PATH="${MULLE_VIRTUAL_ROOT}/.."
17+
18+
#
19+
# Prefer symlinks to clones of git repos found in MULLE_FETCH_SEARCH_PATH
20+
#
21+
export MULLE_SOURCETREE_SYMLINK="YES"
22+
#
23+
#
24+
#
25+
export MULLE_SDE_INSTALLED_VERSION="0.47.0"
26+
27+

.mulle/share/env/environment.sh

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
#######
2+
### none startup
3+
#######
4+
[ "${TRACE}" = 'YES' -o "${ENVIRONMENT_SH_TRACE}" = 'YES' ] && set -x && : "$0" "$@"
5+
6+
#
7+
# If mulle-env is broken, sometimes its nice just to source this file.
8+
# If you're sourcing this manually on a regular basis, you're doing it wrong.
9+
#
10+
# We need some minimal stuff to get things going though:
11+
# sed, cut, tr, hostname, pwd, uname
12+
#
13+
if [ -z "${MULLE_UNAME}" ]
14+
then
15+
MULLE_UNAME="`PATH=/bin:/usr/bin uname | \
16+
PATH=/bin:/usr/bin cut -d_ -f1 | \
17+
PATH=/bin:/usr/bin sed 's/64$//' | \
18+
PATH=/bin:/usr/bin tr 'A-Z' 'a-z'`"
19+
export MULLE_UNAME
20+
fi
21+
if [ -z "${MULLE_HOSTNAME}" ]
22+
then
23+
MULLE_HOSTNAME="`PATH=/bin:/usr/bin:/sbin:/usr/sbin hostname -s`"
24+
if [ "${MULLE_HOSTNAME:0:1}" = '.' ]
25+
then
26+
MULLE_HOSTNAME="_${MULLE_HOSTNAME}"
27+
fi
28+
export MULLE_HOSTNAME
29+
fi
30+
if [ -z "${MULLE_VIRTUAL_ROOT}" ]
31+
then
32+
MULLE_VIRTUAL_ROOT="`PATH=/bin:/usr/bin pwd -P`"
33+
echo "Using ${MULLE_VIRTUAL_ROOT} as MULLE_VIRTUAL_ROOT for \
34+
your convenience" >&2
35+
fi
36+
37+
#
38+
# now read in custom envionment (required)
39+
#
40+
. "${MULLE_VIRTUAL_ROOT}/.mulle/share/env/include-environment.sh"
41+
42+
#
43+
# basic setup for interactive shells
44+
#
45+
case "${MULLE_SHELL_MODE}" in
46+
*INTERACTIVE*)
47+
#
48+
# Set PS1 so that we can see, that we are in a mulle-env
49+
#
50+
envname="`PATH=/bin:/usr/bin basename -- "${MULLE_VIRTUAL_ROOT}"`"
51+
52+
case "${PS1}" in
53+
*\\h\[*)
54+
;;
55+
56+
*\\h*)
57+
PS1="$(sed 's/\\h/\\h\['${envname}'\]/' <<< '${PS1}' )"
58+
;;
59+
60+
*)
61+
PS1='\u@\h['${envname}'] \W$ '
62+
;;
63+
esac
64+
export PS1
65+
66+
unset envname
67+
68+
# install cd catcher
69+
. "${MULLE_ENV_LIBEXEC_DIR}/mulle-env-cd.sh"
70+
unset MULLE_ENV_LIBEXEC_DIR
71+
72+
# install mulle-env-reload
73+
74+
alias mulle-env-reload='. "${MULLE_VIRTUAL_ROOT}/.mulle/share/env/include-environment.sh"'
75+
76+
#
77+
# source in any bash completion files
78+
#
79+
DEFAULT_IFS="${IFS}"
80+
IFS=$'\n'
81+
# memo: nullglob not easily done on both bash and zsh
82+
for FILENAME in "${MULLE_VIRTUAL_ROOT}/.mulle/share/env/libexec"/*-bash-completion.sh
83+
do
84+
if [ -f "${FILENAME}" ]
85+
then
86+
. "${FILENAME}"
87+
fi
88+
done
89+
IFS="${DEFAULT_IFS}"
90+
91+
unset DEFAULT_IFS
92+
unset FILENAME
93+
94+
vardir="${MULLE_VIRTUAL_ROOT}/.mulle/var/${MULLE_HOSTNAME}"
95+
[ -d "${vardir}" ] || mkdir -p "${vardir}"
96+
97+
HISTFILE="${vardir}/bash_history"
98+
export HISTFILE
99+
100+
unset vardir
101+
102+
#
103+
# show motd, if any
104+
#
105+
if [ -z "${NO_MOTD}" ]
106+
then
107+
if [ -f "${MULLE_VIRTUAL_ROOT}/.mulle/etc/env/motd" ]
108+
then
109+
cat "${MULLE_VIRTUAL_ROOT}/.mulle/etc/env/motd"
110+
else
111+
if [ -f "${MULLE_VIRTUAL_ROOT}/.mulle/share/env/motd" ]
112+
then
113+
cat "${MULLE_VIRTUAL_ROOT}/.mulle/share/env/motd"
114+
fi
115+
fi
116+
fi
117+
;;
118+
esac
119+
120+
# remove some uglies
121+
unset NO_MOTD
122+
unset TRACE
123+
124+
#######
125+
### mulle startup
126+
#######
127+
128+
case "${MULLE_SHELL_MODE}" in
129+
*INTERACTIVE*)
130+
if [ -z "" ]
131+
then
132+
alias craftorder="mulle-sde craftorder"
133+
alias clean="mulle-sde clean"
134+
alias craft="mulle-sde craft"
135+
alias dependency="mulle-sde dependency"
136+
alias environment="mulle-sde environment"
137+
alias extension="mulle-sde extension"
138+
alias fetch="mulle-sde fetch"
139+
alias show="mulle-sde show"
140+
alias list="mulle-sde list"
141+
alias library="mulle-sde library"
142+
alias log="mulle-sde log"
143+
alias match="mulle-sde match"
144+
alias monitor="mulle-sde monitor"
145+
alias reflect="mulle-sde reflect"
146+
alias patternfile="mulle-sde patternfile"
147+
alias subproject="mulle-sde subproject"
148+
fi
149+
150+
if [ -z "" ]
151+
then
152+
alias c="mulle-sde craft"
153+
alias C="mulle-sde clean; mulle-sde craft"
154+
alias CC="mulle-sde clean all; mulle-sde craft"
155+
alias t="mulle-sde test rerun --serial"
156+
alias tt="mulle-sde test craft ; mulle-sde test rerun --serial"
157+
alias T="mulle-sde test craft ; mulle-sde test"
158+
alias TT="mulle-sde test clean all; mulle-sde test"
159+
alias r="mulle-sde reflect"
160+
alias l="mulle-sde list --files"
161+
fi
162+
;;
163+
esac

0 commit comments

Comments
 (0)