Browse code

Adapt to new release scheme

Nat! authored on 14/10/2016 14:42:55
Showing 9 changed files
... ...
@@ -1,3 +1,3 @@
1 1
 https://www.mulle-kybernetik.com/repositories/mulle-configuration
2
-https://www.mulle-kybernetik.com/repositories/mulle-tests
3
-
2
+https://www.mulle-kybernetik.com/repositories/mulle-tests;tests/mulle-tests
3
+https://www.mulle-kybernetik.com/repositories/mulle-homebrew;bin/mulle-homebrew
... ...
@@ -16,3 +16,25 @@ addictions/
16 16
 mulle-tests/
17 17
 tests/include/
18 18
 tests/lib/
19
+/bin/mulle-homebrew/
20
+tests/vararg/char/double_char
21
+tests/vararg/char/int_char
22
+tests/vararg/char/longlong_char
23
+tests/vararg/char/pointer_char
24
+tests/vararg/count/count
25
+tests/vararg/double/double_double
26
+tests/vararg/double/int_double
27
+tests/vararg/double/longlong_double
28
+tests/vararg/double/pointer_double
29
+tests/vararg/int/char_int
30
+tests/vararg/int/double_int
31
+tests/vararg/int/int_int
32
+tests/vararg/int/longlong_int
33
+tests/vararg/int/pointer_int
34
+tests/vararg/longlong/double_longlong
35
+tests/vararg/longlong/int_longlong
36
+tests/vararg/longlong/longlong_longlong
37
+tests/vararg/longlong/pointer_longlong
38
+tests/vararg/pointer/double_pointer
39
+tests/vararg/pointer/int_pointer
40
+tests/vararg/pointer/longlong_pointer
19 41
\ No newline at end of file
... ...
@@ -77,3 +77,9 @@ Otherwise read:
77 77
 All platforms and compilers supported by
78 78
 [mulle-c11](//www.mulle-kybernetik.com/software/git/mulle-c11/)
79 79
 
80
+## Author
81
+
82
+[Nat!](//www.mulle-kybernetik.com/weblog) for
83
+[Mulle kybernetiK](//www.mulle-kybernetik.com) and
84
+[Codeon GmbH](//www.codeon.de)
85
+
... ...
@@ -1,3 +1,7 @@
1
+## 0.5.1-2
2
+
3
+* improve release script and documentation
4
+
1 5
 ## 0.5
2 6
 
3 7
 * renamed function `mulle_align` to `mulle_address_align`
... ...
@@ -1,41 +1,65 @@
1
-#! /bin/sh -x
1
+#! /bin/sh
2 2
 
3 3
 #
4
-# These variables have to be configured on a by project basis
5 4
 #
6
-NAME="mulle-vararg"  # not the ruby name
7
-DESC="Access variable arguments in struct layout fashion"
8
-PROJECT=MulleVararg  # ruby requires camel-case
9
-HEADER="src/mulle_vararg.h"
10
-VERSIONNAME="MULLE_VARARG_VERSION"
11
-ORIGIN=public
12
-DEPENDENCIES=
5
+#
6
+PROJECT="MulleVararg"    # requires camel-case
7
+DESC="Flexible C memory allocation scheme with leak checking"
8
+DEPENDENCIES="mulle-c11" # names not camel case
9
+ORIGIN=public            # git repo to push
10
+LANGUAGE=c               # c,cpp, objc
11
+
12
+. ./bin/mulle-homebrew/mulle-homebrew.sh
13
+
14
+# parse options
15
+homebrew_parse_options "$@"
16
+
17
+# dial past options
18
+while [ $# -ne 0 ]
19
+do
20
+   case "$1" in
21
+      -*)
22
+         shift
23
+      ;;
24
+      *)
25
+         break;
26
+      ;;
27
+   esac
28
+done
29
+
30
+#
31
+# these can usually be deduced, if you follow the conventions
32
+#
33
+NAME="`get_name_from_project "${PROJECT}" "${LANGUAGE}"`"
34
+HEADER="`get_header_from_name "${NAME}"`"
35
+VERSIONNAME="`get_versionname_from_project "${PROJECT}"`"
36
+VERSION="`get_header_version "${HEADER}" "${VERSIONNAME}"`"
13 37
 
38
+
39
+# --- HOMEBREW FORMULA ---
40
+# Information needed to construct a proper brew formula
41
+#
14 42
 HOMEPAGE="https://www.mulle-kybernetik.com/software/git/${NAME}"
15
-RBFILE="${NAME}.rb"
16
-HOMEBREWTAP="../homebrew-software"
43
+ARCHIVEURL='https://www.mulle-kybernetik.com/software/git/${NAME}/tarball/${VERSION}'  # ARCHIVEURL will be evaled later! keep it in single quotes
17 44
 
18
-# ARCHIVEURL will be evaled later! keep it in single quotes
19
-ARCHIVEURL='https://www.mulle-kybernetik.com/software/git/${NAME}/tarball/${VERSION}'
20 45
 
46
+# --- HOMEBREW TAP ---
47
+# Specify to where and under what bame to publish via your brew tap
48
+#
49
+RBFILE="${NAME}.rb"                    # ruby file for brew
50
+HOMEBREWTAP="../homebrew-software"     # your tap repository path
21 51
 
22
-main()
23
-{
24
-   # source it
25
-   . ./bin/mulle-homebrew/mulle-homebrew.sh
26 52
 
27
-   local VERSION  #  upper case for consistency in eval
28
-   local TAG
53
+# --- GIT ---
54
+# tag to tag your release
55
+# and the origin where
56
+TAG="${1:-${TAGPREFIX}${VERSION}}"
29 57
 
30
-   #
31
-   # Version has to be figured out on a per project basis
32
-   # get_header_version grabs the version from a header
33
-   #
34
-   VERSION="`get_header_version ${HEADER}`"
35
-   TAG="${1:-${VERSION}}"
36 58
 
59
+main()
60
+{
37 61
    git_main "${ORIGIN}" "${TAG}" || exit 1
38
-   homebrew_main || exit 1
62
+   homebrew_main
39 63
 }
40 64
 
41 65
 main "$@"
42 66
new file mode 100644
... ...
@@ -0,0 +1,99 @@
0
+# How to build mulle-vararg
1
+
2
+
3
+## What you get
4
+
5
+* `libmulle_vararg.a` the mulle-vararg static library along with a bunch of
6
+headers.
7
+
8
+
9
+## Prerequisites
10
+
11
+#### mulle-c11
12
+
13
+[mulle-c11](//www.mulle-kybernetik.com/software/git/mulle-c11/) is a header
14
+that abstracts a small set of non-standardized compiler features.
15
+
16
+#### mulle-configuration
17
+
18
+[mulle-configuration](//www.mulle-kybernetik.com/software/git/mulle-configuration/)
19
+are configuration files for building with Xcode or cmake. This is expected to
20
+exist in the project directory root.
21
+
22
+
23
+## Nice to have
24
+
25
+#### mulle-build
26
+
27
+[mulle-build](//www.mulle-kybernetik.com/software/git/mulle-build) is used
28
+to assemble the dependencies together and build the library.
29
+
30
+#### mulle-homebrew
31
+
32
+[mulle-homebrew](//www.mulle-kybernetik.com/software/git/mulle-homebrew/) is
33
+support for generating homebrew formulae. This is expected to
34
+exist in `./bin`, if you want to release a fork.
35
+
36
+#### mulle-tests
37
+
38
+[mulle-tests](//www.mulle-kybernetik.com/software/git/mulle-tests/) are
39
+scripts to provide an environment for running the tests. This is expected to
40
+exist in `./tests`, if you want to run tests.
41
+
42
+
43
+### Windows: Installing further prerequisites
44
+
45
+Check the [mulle-build README.md](//www.mulle-kybernetik.com/software/git/mulle-build/README.md)
46
+for instrutions how to get the "Git for Windows" bash going.
47
+
48
+
49
+### OSX: Install mulle-build using homebrew
50
+
51
+Install the [homebrew](//brew.sh/) package manager, then
52
+
53
+```
54
+brew tap mulle-kybernetik/software
55
+brew install mulle-build
56
+```
57
+
58
+### Linux: Install mulle-build using linuxbrew
59
+
60
+Install the [linuxbrew](//linuxbrew.sh/) package manager, then
61
+
62
+```
63
+brew tap mulle-kybernetik/software
64
+brew install mulle-build
65
+```
66
+
67
+### All: Install mulle-build using git
68
+
69
+```
70
+git clone https://www.mulle-kybernetik.com/repositories/mulle-bootstrap
71
+( cd mulle-bootstrap ; ./install.sh )
72
+git clone https://www.mulle-kybernetik.com/repositories/mulle-build
73
+( cd mulle-build ; ./install.sh )
74
+```
75
+
76
+## All: Install mulle-vararg using mulle-build
77
+
78
+
79
+Grab the latest **mulle-vararg** release and go into the project directory:
80
+
81
+```
82
+git clone https://www.mulle-kybernetik.com/repositories/mulle-vararg
83
+cd mulle-vararg
84
+```
85
+
86
+Then let **mulle-build** fetch the dependencies and build **mulle-vararg** in
87
+debug mode:
88
+
89
+```
90
+mulle-build --debug
91
+```
92
+
93
+Build library in release mode and install into `tmp` :
94
+
95
+```
96
+mulle-clean ;
97
+mulle-install --prefix /tmp
98
+```
... ...
@@ -11,7 +11,7 @@
11 11
 
12 12
 #include "mulle_align.h"
13 13
 
14
-#define MULLE_VARARG_VERSION  ((0 << 20) | (5 << 8) | 1)
14
+#define MULLE_VARARG_VERSION  ((0 << 20) | (5 << 8) | 2)
15 15
 
16 16
 
17 17
 /*
... ...
@@ -2,6 +2,7 @@
2 2
 
3 3
 LIBRARY_SHORTNAME="mulle_vararg"
4 4
 
5
-. "../mulle-tests/test-c-common.sh"
6
-. "../mulle-tests/test-tools-common.sh"
7
-. "../mulle-tests/build-test-common.sh"
5
+. "mulle-tests/test-c-common.sh"
6
+. "mulle-tests/test-tools-common.sh"
7
+. "mulle-tests/test-staticlib-common.sh"
8
+. "mulle-tests/build-test-common.sh"
... ...
@@ -8,6 +8,7 @@
8 8
 
9 9
 LIBRARY_SHORTNAME="mulle_vararg"
10 10
 
11
-. "../mulle-tests/test-c-common.sh"
12
-. "../mulle-tests/test-tools-common.sh"
13
-. "../mulle-tests/run-test-common.sh"
11
+. "mulle-tests/test-c-common.sh"
12
+. "mulle-tests/test-tools-common.sh"
13
+. "mulle-tests/test-staticlib-common.sh"
14
+. "mulle-tests/run-test-common.sh"