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 @@
1
+# How to build mulle-vararg
2
+
3
+
4
+## What you get
5
+
6
+* `libmulle_vararg.a` the mulle-vararg static library along with a bunch of
7
+headers.
8
+
9
+
10
+## Prerequisites
11
+
12
+#### mulle-c11
13
+
14
+[mulle-c11](//www.mulle-kybernetik.com/software/git/mulle-c11/) is a header
15
+that abstracts a small set of non-standardized compiler features.
16
+
17
+#### mulle-configuration
18
+
19
+[mulle-configuration](//www.mulle-kybernetik.com/software/git/mulle-configuration/)
20
+are configuration files for building with Xcode or cmake. This is expected to
21
+exist in the project directory root.
22
+
23
+
24
+## Nice to have
25
+
26
+#### mulle-build
27
+
28
+[mulle-build](//www.mulle-kybernetik.com/software/git/mulle-build) is used
29
+to assemble the dependencies together and build the library.
30
+
31
+#### mulle-homebrew
32
+
33
+[mulle-homebrew](//www.mulle-kybernetik.com/software/git/mulle-homebrew/) is
34
+support for generating homebrew formulae. This is expected to
35
+exist in `./bin`, if you want to release a fork.
36
+
37
+#### mulle-tests
38
+
39
+[mulle-tests](//www.mulle-kybernetik.com/software/git/mulle-tests/) are
40
+scripts to provide an environment for running the tests. This is expected to
41
+exist in `./tests`, if you want to run tests.
42
+
43
+
44
+### Windows: Installing further prerequisites
45
+
46
+Check the [mulle-build README.md](//www.mulle-kybernetik.com/software/git/mulle-build/README.md)
47
+for instrutions how to get the "Git for Windows" bash going.
48
+
49
+
50
+### OSX: Install mulle-build using homebrew
51
+
52
+Install the [homebrew](//brew.sh/) package manager, then
53
+
54
+```
55
+brew tap mulle-kybernetik/software
56
+brew install mulle-build
57
+```
58
+
59
+### Linux: Install mulle-build using linuxbrew
60
+
61
+Install the [linuxbrew](//linuxbrew.sh/) package manager, then
62
+
63
+```
64
+brew tap mulle-kybernetik/software
65
+brew install mulle-build
66
+```
67
+
68
+### All: Install mulle-build using git
69
+
70
+```
71
+git clone https://www.mulle-kybernetik.com/repositories/mulle-bootstrap
72
+( cd mulle-bootstrap ; ./install.sh )
73
+git clone https://www.mulle-kybernetik.com/repositories/mulle-build
74
+( cd mulle-build ; ./install.sh )
75
+```
76
+
77
+## All: Install mulle-vararg using mulle-build
78
+
79
+
80
+Grab the latest **mulle-vararg** release and go into the project directory:
81
+
82
+```
83
+git clone https://www.mulle-kybernetik.com/repositories/mulle-vararg
84
+cd mulle-vararg
85
+```
86
+
87
+Then let **mulle-build** fetch the dependencies and build **mulle-vararg** in
88
+debug mode:
89
+
90
+```
91
+mulle-build --debug
92
+```
93
+
94
+Build library in release mode and install into `tmp` :
95
+
96
+```
97
+mulle-clean ;
98
+mulle-install --prefix /tmp
99
+```
... ...
@@ -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"