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 96
 #######
97 97
 
98 98
 MULLE_BOOTSTRAP_FAIL_PREFIX="`basename -- $0`"
99
-MULLE_HOMEBREW_VERSION="4.0.0"
99
+MULLE_HOMEBREW_VERSION="4.1.0"
100 100
 
101 101
 #
102 102
 # prefer local mulle-homebrew if available
... ...
@@ -136,6 +145,16 @@ main()
136 136
 
137 137
    if [ "${DO_GENERATE_FORMULA}" = "YES" ]
138 138
    then
139
+      if [ -z "${PUBLISHER}" ]
140
+      then
141
+         fail "You need to specify a publisher with --publisher (hint: https://github.com/<publisher>)"
142
+      fi
143
+
144
+      if [ -z "${PUBLISHER_TAP}" ]
145
+      then
146
+         fail "You need to specify a publisher tap with --tap (hint: <mulle-kybernetik/software>)"
147
+      fi
148
+
139 149
       # generate the formula and push it
140 150
       homebrew_main "${PROJECT}" \
141 151
                     "${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 @@
0
+# Templates to support forks
1
+
2
+The templates in this directory structure were initially created with
3
+`mulle-objc-create-templates`.
4
+
5
+Recreate the original files from the templates with
6
+
7
+```
8
+mulle-objc-process-templates --publisher 'mulle-nat' --tap 'mulle-kybernetik/software'
9
+```
10
+
11
+or substitute with your own publisher information.
12
+
13
+---
14
+
15
+`mulle-objc-process-templates` and `mulle-objc-create-templates` are part of
16
+[mulle-objc-developer](https://github.com/mulle-objc/mulle-objc-developer)
0 17
new file mode 100644
... ...
@@ -0,0 +1,62 @@
0
+# mulle-concurrent
1
+
2
+**mulle-concurrent** is a library for lock- and wait-free data structures.
3
+Wait-freeness is a desirable property for "hotly" contested data structures
4
+in multi-threaded environments.
5
+
6
+> Many of the ideas are taken from [Preshing on Programming: A Resizable, Concurrent Map](http://preshing.com/20160222/a-resizable-concurrent-map/).
7
+> 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)
8
+
9
+
10
+Fork      |  Build Status | Release Version
11
+----------|---------------|-----------------------------------
12
+{% if PUBLISHER != "mulle-objc" %}
13
+[{{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)
14
+{% endif %}
15
+[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)
16
+
17
+
18
+## Data structures
19
+
20
+API                                                   | Description    | Example
21
+------------------------------------------------------|----------------|---------
22
+[`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)
23
+[`mulle_concurrent_pointerarray`](dox/API_HASHMAP.md) | A growing array of pointers                                                               | [Example](tests/array/example.c)
24
+
25
+
26
+## Install
27
+
28
+On OS X and Linux you can use
29
+[homebrew](//brew.sh), respectively
30
+[linuxbrew](//linuxbrew.sh)
31
+to install the library:
32
+
33
+```
34
+brew install mulle-objc/softwaremulle-concurrent
35
+```
36
+
37
+On other platforms you can use **mulle-install** from
38
+[mulle-build](//www.mulle-kybernetik.com/software/git/mulle-build)
39
+to install the library:
40
+
41
+```
42
+mulle-install --prefix /usr/local --branch release https://github.com/mulle-objc/mulle-concurrent
43
+```
44
+
45
+Otherwise read:
46
+
47
+* [How to Build](dox/BUILD.md)
48
+
49
+
50
+### Platforms and Compilers
51
+
52
+All platforms and compilers supported by
53
+[mulle-c11](//www.mulle-kybernetik.com/software/git/mulle-c11/) and
54
+[mulle-thread](//www.mulle-kybernetik.com/software/git/mulle-thread/).
55
+
56
+
57
+## Author
58
+
59
+[Nat!](//www.mulle-kybernetik.com/weblog) for
60
+[Mulle kybernetiK](//www.mulle-kybernetik.com) and
61
+[Codeon GmbH](//www.codeon.de)
0 62
new file mode 100644
... ...
@@ -0,0 +1,2 @@
0
+[comment]: <> ({{COMMENT}})
1
+{% includes TEMPLATE_FILE %}
0 2
new file mode 100644
... ...
@@ -0,0 +1,123 @@
0
+# How to build mulle-concurrent
1
+
2
+
3
+## What you get
4
+
5
+* `libmulle_concurrent.a` the mulle-concurrent static library along with a
6
+bunch of headers.
7
+
8
+
9
+## Prerequisites
10
+
11
+#### mulle-aba
12
+
13
+[mulle-aba](//www.mulle-kybernetik.com/software/git/mulle-aba/) provides the
14
+ABA safe freeing of resources. Or use your own ABA free routine and place it
15
+in the allocator.
16
+
17
+#### mulle-allocator
18
+
19
+[mulle-allocator](//www.mulle-kybernetik.com/software/git/mulle-allocator/)
20
+contains the memory-allocation scheme, that mulle-concurrent uses.
21
+
22
+#### mulle-c11
23
+
24
+[mulle-c11](//www.mulle-kybernetik.com/software/git/mulle-c11/) is a header
25
+that abstracts a small set of non-standardized compiler features.
26
+
27
+#### mulle-configuration
28
+
29
+[mulle-configuration](//www.mulle-kybernetik.com/software/git/mulle-configuration/)
30
+are configuration files for building with Xcode or cmake. This is expected to
31
+exist in the project directory root.
32
+
33
+#### mulle-thread
34
+
35
+[mulle-thread](//www.mulle-kybernetik.com/software/git/mulle-thread/) contains
36
+the necessary atomic operations.
37
+
38
+
39
+
40
+## Nice to have
41
+
42
+#### mulle-build
43
+
44
+[mulle-build](//www.mulle-kybernetik.com/software/git/mulle-build) is used
45
+to assemble the dependencies together and build the library.
46
+
47
+#### mulle-homebrew
48
+
49
+[mulle-homebrew](//www.mulle-kybernetik.com/software/git/mulle-homebrew/) is
50
+support for generating homebrew formulae. This is expected to
51
+exist in `./bin`, if you want to release a fork.
52
+
53
+#### mulle-tests
54
+
55
+[mulle-tests](//www.mulle-kybernetik.com/software/git/mulle-tests/) are
56
+scripts to provide an environment for running the tests. This is expected to
57
+exist in `./tests`, if you want to run tests.
58
+
59
+
60
+### Windows: Installing further prerequisites
61
+
62
+Check the [mulle-build README.md](//www.mulle-kybernetik.com/software/git/mulle-build/README.md)
63
+for instructions how to get the "Git for Windows" bash going.
64
+
65
+
66
+### OSX: Install mulle-build using homebrew
67
+
68
+Install the [homebrew](//brew.sh/) package manager, then
69
+
70
+```
71
+brew tap {{PUBLISHER_TAP}}
72
+brew install mulle-build
73
+```
74
+
75
+### Linux: Install mulle-build using linuxbrew
76
+
77
+Install the [linuxbrew](//linuxbrew.sh/) package manager, then it seems you
78
+may need `python-setuptools` dependency as well:
79
+
80
+```
81
+sudo apt-get install python-setuptools
82
+```
83
+
84
+and then
85
+
86
+```
87
+brew tap {{PUBLISHER_TAP}}
88
+brew install mulle-build
89
+```
90
+
91
+### All: Install mulle-build using git
92
+
93
+```
94
+git clone --branch release https://github.com/{{PUBLISHER}}/mulle-bootstrap
95
+( cd mulle-bootstrap ; ./install.sh )
96
+git clone --branch release https://github.com/{{PUBLISHER}}/mulle-build
97
+( cd mulle-build ; ./install.sh )
98
+```
99
+
100
+## All: Install mulle-concurrent using mulle-build
101
+
102
+
103
+Grab the latest **mulle-concurrent** release and go into the project directory:
104
+
105
+```
106
+git clone --branch release https://github.com/mulle-objc/mulle-concurrent
107
+cd mulle-concurrent
108
+```
109
+
110
+Then let **mulle-build** fetch the dependencies and
111
+build **mulle-concurrent** in debug mode:
112
+
113
+```
114
+mulle-build --debug
115
+```
116
+
117
+Build library in release mode and install into `tmp` :
118
+
119
+```
120
+mulle-clean ;
121
+mulle-install --prefix /tmp
122
+```