Browse code

Use templates to create .md files where necessary

Nat! authored on 14-06-2017 15:37:44
Showing 10 changed files
... ...
@@ -39,4 +39,5 @@ tests/array/example.debug
39 39
 tests/hashmap/example.debug
40 40
 tests/hashmap/hashmap.debug
41 41
 tests/array/empty
42
-tests/array/empty.debug
43 42
\ No newline at end of file
43
+tests/array/empty.debugbin/tap-info.sh
44
+tap-info.sh
... ...
@@ -4,7 +4,7 @@ project (mulle-concurrent)
4 4
 
5 5
 cmake_policy(SET CMP0054 NEW)
6 6
 
7
-set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/mulle-configuration)
7
+set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/mulle-configuration/cmake)
8 8
 message(STATUS "CMAKE_MODULE_PATH is ${CMAKE_MODULE_PATH}")
9 9
 message(STATUS "CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
10 10
 if( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
... ...
@@ -1,3 +1,4 @@
1
+[comment]: <> (DO NOT EDIT THIS FILE. EDIT THE TEMPLATE "templates/README.md.scion")
1 2
 # mulle-concurrent
2 3
 
3 4
 **mulle-concurrent** is a library for lock- and wait-free data structures.
... ...
@@ -1,4 +1,4 @@
1
-PROJECT="MulleConcurrent"   # your project name, requires camel-case
1
+PROJECT="mulle-concurrent"
2 2
 DESC="Lock- and Wait-free Hashtable (and an Array too) in C"
3 3
 DEPENDENCIES='${DEPENDENCY_TAP}mulle-allocator
4 4
 ${DEPENDENCY_TAP}mulle-aba
... ...
@@ -1,6 +1,6 @@
1 1
 #! /usr/bin/env bash
2 2
 #
3
-#   Copyright (c) 2017 Nat! - Codeon GmbH
3
+#   Copyright (c) 2017 Nat! - Mulle kybernetiK
4 4
 #   All rights reserved.
5 5
 #
6 6
 #   Redistribution and use in source and binary forms, with or without
... ...
@@ -53,6 +53,15 @@ then
53 53
    . "${EXE_DIR}/formula-info.sh"
54 54
 fi
55 55
 
56
+#
57
+# If there is a - possibly .gitignored - tap-info.sh file read it.
58
+# It could store PUBLISHER and PUBLISHER_TAP
59
+#
60
+if [ -f "${EXE_DIR}/tap-info.sh" ]
61
+then
62
+   . "${EXE_DIR}/tap-info.sh"
63
+fi
64
+
56 65
 
57 66
 #######
58 67
 # If you are using mulle-build, you don't hafta change anything after this
... ...
@@ -96,7 +105,7 @@ generate_brew_formula()
96 105
 #######
97 106
 
98 107
 MULLE_BOOTSTRAP_FAIL_PREFIX="`basename -- $0`"
99
-MULLE_HOMEBREW_VERSION="4.0.0"
108
+MULLE_HOMEBREW_VERSION="4.1.0"
100 109
 
101 110
 #
102 111
 # prefer local mulle-homebrew if available
... ...
@@ -136,6 +145,16 @@ main()
136 145
 
137 146
    if [ "${DO_GENERATE_FORMULA}" = "YES" ]
138 147
    then
148
+      if [ -z "${PUBLISHER}" ]
149
+      then
150
+         fail "You need to specify a publisher with --publisher (hint: https://github.com/<publisher>)"
151
+      fi
152
+
153
+      if [ -z "${PUBLISHER_TAP}" ]
154
+      then
155
+         fail "You need to specify a publisher tap with --tap (hint: <mulle-kybernetik/software>)"
156
+      fi
157
+
139 158
       # generate the formula and push it
140 159
       homebrew_main "${PROJECT}" \
141 160
                     "${NAME}" \
... ...
@@ -1,3 +1,4 @@
1
+[comment]: <> (DO NOT EDIT THIS FILE. EDIT THE TEMPLATE "templates/dox/BUILD.md.scion")
1 2
 # How to build mulle-concurrent
2 3
 
3 4
 
4 5
new file mode 100644
... ...
@@ -0,0 +1,17 @@
1
+# Templates to support forks
2
+
3
+The templates in this directory structure were initially created with
4
+`mulle-objc-create-templates`.
5
+
6
+Recreate the original files from the templates with
7
+
8
+```
9
+mulle-objc-process-templates --publisher 'mulle-nat' --tap 'mulle-kybernetik/software'
10
+```
11
+
12
+or substitute with your own publisher information.
13
+
14
+---
15
+
16
+`mulle-objc-process-templates` and `mulle-objc-create-templates` are part of
17
+[mulle-objc-developer](https://github.com/mulle-objc/mulle-objc-developer)
0 18
new file mode 100644
... ...
@@ -0,0 +1,62 @@
1
+# mulle-concurrent
2
+
3
+**mulle-concurrent** is a library for lock- and wait-free data structures.
4
+Wait-freeness is a desirable property for "hotly" contested data structures
5
+in multi-threaded environments.
6
+
7
+> Many of the ideas are taken from [Preshing on Programming: A Resizable, Concurrent Map](http://preshing.com/20160222/a-resizable-concurrent-map/).
8
+> The definition of concurrent and wait-free are from [concurrencyfreaks.blogspot.de](http://concurrencyfreaks.blogspot.de/2013/05/lock-free-and-wait-free-definition-and.html)
9
+
10
+
11
+Fork      |  Build Status | Release Version
12
+----------|---------------|-----------------------------------
13
+{% if PUBLISHER != "mulle-objc" %}
14
+[{{PUBLISHER_FULLNAME}}](//github.com/{{PUBLISHER}}/mulle-concurrent) | [![Build Status](https://travis-ci.org/{{PUBLISHER}}/mulle-concurrent.svg?branch=release)](https://travis-ci.org/{{PUBLISHER}}/mulle-concurrent) | ![{{PUBLISHER_FULLNAME}} tag](https://img.shields.io/github/tag/{{PUBLISHER}}/mulle-concurrent.svg) [![Build Status](https://travis-ci.org/{{PUBLISHER}}/mulle-concurrent.svg?branch=release)](https://travis-ci.org/{{PUBLISHER}}/mulle-concurrent)
15
+{% endif %}
16
+[Community](https://github.com/mulle-objc/mulle-concurrent/tree/release) | [![Build Status](https://travis-ci.org/mulle-objc/mulle-concurrent.svg)](https://travis-ci.org/mulle-objc/mulle-concurrent) | ![Community tag](https://img.shields.io/github/tag/mulle-objc/mulle-concurrent.svg) [![Build Status](https://travis-ci.org/mulle-objc/mulle-concurrent.svg?branch=release)](https://travis-ci.org/mulle-objc/mulle-concurrent)
17
+
18
+
19
+## Data structures
20
+
21
+API                                                   | Description    | Example
22
+------------------------------------------------------|----------------|---------
23
+[`mulle_concurrent_hashmap`](dox/API_POINTERARRAY.md) | A growing, mutable map of pointers, indexed by a hash. A.k.a. hashtable, dictionary, maptable | [Example](tests/hashmap/example.c)
24
+[`mulle_concurrent_pointerarray`](dox/API_HASHMAP.md) | A growing array of pointers                                                               | [Example](tests/array/example.c)
25
+
26
+
27
+## Install
28
+
29
+On OS X and Linux you can use
30
+[homebrew](//brew.sh), respectively
31
+[linuxbrew](//linuxbrew.sh)
32
+to install the library:
33
+
34
+```
35
+brew install mulle-objc/softwaremulle-concurrent
36
+```
37
+
38
+On other platforms you can use **mulle-install** from
39
+[mulle-build](//www.mulle-kybernetik.com/software/git/mulle-build)
40
+to install the library:
41
+
42
+```
43
+mulle-install --prefix /usr/local --branch release https://github.com/mulle-objc/mulle-concurrent
44
+```
45
+
46
+Otherwise read:
47
+
48
+* [How to Build](dox/BUILD.md)
49
+
50
+
51
+### Platforms and Compilers
52
+
53
+All platforms and compilers supported by
54
+[mulle-c11](//www.mulle-kybernetik.com/software/git/mulle-c11/) and
55
+[mulle-thread](//www.mulle-kybernetik.com/software/git/mulle-thread/).
56
+
57
+
58
+## Author
59
+
60
+[Nat!](//www.mulle-kybernetik.com/weblog) for
61
+[Mulle kybernetiK](//www.mulle-kybernetik.com) and
62
+[Codeon GmbH](//www.codeon.de)
0 63
new file mode 100644
... ...
@@ -0,0 +1,2 @@
1
+[comment]: <> ({{COMMENT}})
2
+{% includes TEMPLATE_FILE %}
0 3
new file mode 100644
... ...
@@ -0,0 +1,123 @@
1
+# How to build mulle-concurrent
2
+
3
+
4
+## What you get
5
+
6
+* `libmulle_concurrent.a` the mulle-concurrent static library along with a
7
+bunch of headers.
8
+
9
+
10
+## Prerequisites
11
+
12
+#### mulle-aba
13
+
14
+[mulle-aba](//www.mulle-kybernetik.com/software/git/mulle-aba/) provides the
15
+ABA safe freeing of resources. Or use your own ABA free routine and place it
16
+in the allocator.
17
+
18
+#### mulle-allocator
19
+
20
+[mulle-allocator](//www.mulle-kybernetik.com/software/git/mulle-allocator/)
21
+contains the memory-allocation scheme, that mulle-concurrent uses.
22
+
23
+#### mulle-c11
24
+
25
+[mulle-c11](//www.mulle-kybernetik.com/software/git/mulle-c11/) is a header
26
+that abstracts a small set of non-standardized compiler features.
27
+
28
+#### mulle-configuration
29
+
30
+[mulle-configuration](//www.mulle-kybernetik.com/software/git/mulle-configuration/)
31
+are configuration files for building with Xcode or cmake. This is expected to
32
+exist in the project directory root.
33
+
34
+#### mulle-thread
35
+
36
+[mulle-thread](//www.mulle-kybernetik.com/software/git/mulle-thread/) contains
37
+the necessary atomic operations.
38
+
39
+
40
+
41
+## Nice to have
42
+
43
+#### mulle-build
44
+
45
+[mulle-build](//www.mulle-kybernetik.com/software/git/mulle-build) is used
46
+to assemble the dependencies together and build the library.
47
+
48
+#### mulle-homebrew
49
+
50
+[mulle-homebrew](//www.mulle-kybernetik.com/software/git/mulle-homebrew/) is
51
+support for generating homebrew formulae. This is expected to
52
+exist in `./bin`, if you want to release a fork.
53
+
54
+#### mulle-tests
55
+
56
+[mulle-tests](//www.mulle-kybernetik.com/software/git/mulle-tests/) are
57
+scripts to provide an environment for running the tests. This is expected to
58
+exist in `./tests`, if you want to run tests.
59
+
60
+
61
+### Windows: Installing further prerequisites
62
+
63
+Check the [mulle-build README.md](//www.mulle-kybernetik.com/software/git/mulle-build/README.md)
64
+for instructions how to get the "Git for Windows" bash going.
65
+
66
+
67
+### OSX: Install mulle-build using homebrew
68
+
69
+Install the [homebrew](//brew.sh/) package manager, then
70
+
71
+```
72
+brew tap {{PUBLISHER_TAP}}
73
+brew install mulle-build
74
+```
75
+
76
+### Linux: Install mulle-build using linuxbrew
77
+
78
+Install the [linuxbrew](//linuxbrew.sh/) package manager, then it seems you
79
+may need `python-setuptools` dependency as well:
80
+
81
+```
82
+sudo apt-get install python-setuptools
83
+```
84
+
85
+and then
86
+
87
+```
88
+brew tap {{PUBLISHER_TAP}}
89
+brew install mulle-build
90
+```
91
+
92
+### All: Install mulle-build using git
93
+
94
+```
95
+git clone --branch release https://github.com/{{PUBLISHER}}/mulle-bootstrap
96
+( cd mulle-bootstrap ; ./install.sh )
97
+git clone --branch release https://github.com/{{PUBLISHER}}/mulle-build
98
+( cd mulle-build ; ./install.sh )
99
+```
100
+
101
+## All: Install mulle-concurrent using mulle-build
102
+
103
+
104
+Grab the latest **mulle-concurrent** release and go into the project directory:
105
+
106
+```
107
+git clone --branch release https://github.com/mulle-objc/mulle-concurrent
108
+cd mulle-concurrent
109
+```
110
+
111
+Then let **mulle-build** fetch the dependencies and
112
+build **mulle-concurrent** in debug mode:
113
+
114
+```
115
+mulle-build --debug
116
+```
117
+
118
+Build library in release mode and install into `tmp` :
119
+
120
+```
121
+mulle-clean ;
122
+mulle-install --prefix /tmp
123
+```