Browse code

* modernized to mulle-sde with .mulle folder

Nat! authored on 05-01-2019 15:39:05
Showing 85 changed files
... ...
@@ -33,21 +33,18 @@ environment-user-*.sh
33 33
 
34 34
 # ### > generated by mulle-sde (extensions/mulle-sde/sde/init)
35 35
 
36
-# generally /var and directories are not interesting
37
-.mulle-*/var/
36
+# generally /var directories are not interesting
37
+.mulle/var/
38 38
 
39 39
 # .mulle-env /bin and /libexec are not interesting
40 40
 
41
-.mulle-env/bin/
42
-.mulle-env/libexec/
41
+.mulle/bin/
42
+.mulle/libexec/
43 43
 
44 44
 # style is "fluctuating" on a per-user level so not interesting
45
-.mulle-env/etc/style
45
+.mulle/etc/env/style
46 46
 
47
-# .mulle-sde is generally interesting
48 47
 
49
-# .mulle-sourcetree is generally boring, except /etc
50
-.mulle-sourcetree/var/
51 48
 
52 49
 # dynamically .mulle-sourcetree-fix is boring
53 50
 .mulle-sourcetree-fix
54 51
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-1.0.11
2 0
deleted file mode 100755
... ...
@@ -1,731 +0,0 @@
1
-#! /usr/bin/env bash
2
-#
3
-#   Copyright (c) 2018 Nat! - Mulle kybernetiK
4
-#   All rights reserved.
5
-#
6
-#   Redistribution and use in source and binary forms, with or without
7
-#   modification, are permitted provided that the following conditions are met:
8
-#
9
-#   Redistributions of source code must retain the above copyright notice, this
10
-#   list of conditions and the following disclaimer.
11
-#
12
-#   Redistributions in binary form must reproduce the above copyright notice,
13
-#   this list of conditions and the following disclaimer in the documentation
14
-#   and/or other materials provided with the distribution.
15
-#
16
-#   Neither the name of Mulle kybernetiK nor the names of its contributors
17
-#   may be used to endorse or promote products derived from this software
18
-#   without specific prior written permission.
19
-#
20
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
-#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
-#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
-#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
-#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
-#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
-#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
-#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
-#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
-#   POSSIBILITY OF SUCH DAMAGE.
31
-#
32
-[ "${TRACE}" = 'YES' -o "${C_SOURCETREE_UPDATE_TRACE}" = 'YES' ] && set -x && : "$0" "$@"
33
-
34
-
35
-usage()
36
-{
37
-   cat <<EOF >&2
38
-Usage:
39
-   c-sourcetree-update [flags]
40
-
41
-   Produces the _<project>-include.h files and related headers.
42
-
43
-Flags:
44
-      --stdout :  Emit to stdout instead
45
-
46
-EOF
47
-   exit 1
48
-}
49
-
50
-
51
-r_uname_to_cpp()
52
-{
53
-   log_entry "r_uname_to_cpp" "$@"
54
-
55
-   local uname="$1"  # the part after only-os or no
56
-
57
-   case "${uname}" in
58
-      'darwin')
59
-         RVAL="__APPLE__"
60
-      ;;
61
-
62
-      'freebsd')
63
-         RVAL="BSD4_3"  # guess
64
-      ;;
65
-
66
-      'mingw'*)
67
-         RVAL="_WIN32"
68
-      ;;
69
-
70
-      *)
71
-         RVAL="__${uname}__"
72
-      ;;
73
-   esac
74
-}
75
-
76
-
77
-r_osexclude_to_cpp_if()
78
-{
79
-   log_entry "r_osexclude_to_cpp_if" "$@"
80
-
81
-   local marks="$1"
82
-
83
-   local cppvar
84
-
85
-   local excludes
86
-   local onlys
87
-
88
-   set -o noglob ; IFS=","
89
-
90
-   for osexclude in ${marks}
91
-   do
92
-      IFS="${DEFAULT_IFS}"; set +o noglob
93
-
94
-      case "${osexclude}" in
95
-         only-os-*)
96
-				r_uname_to_cpp "${osexclude:8}"
97
-            r_concat "${onlys}" "defined( ${RVAL})" " || "
98
-            onlys="${RVAL}"
99
-         ;;
100
-
101
-         no-os-*)
102
-				r_uname_to_cpp "${osexclude:6}"
103
-            r_concat "${excludes}" "! defined( ${RVAL})" " && "
104
-            excludes="${RVAL}"
105
-         ;;
106
-      esac
107
-   done
108
-   IFS="${DEFAULT_IFS}"; set +o noglob
109
-
110
-   if [ ! -z "${onlys}" ]
111
-   then
112
-      RVAL="# if ${onlys}"
113
-      return
114
-   fi
115
-
116
-   if [ ! -z "${excludes}" ]
117
-   then
118
-      RVAL="# if ${excludes}"
119
-      return
120
-   fi
121
-
122
-   RVAL=""
123
-}
124
-
125
-
126
-_emit_c_include()
127
-{
128
-   log_entry "_emit_c_include" "$@"
129
-
130
-   local address="$1"
131
-   local header="$2"
132
-   local marks="$3"
133
-
134
-   local indent
135
-   local ifstatement
136
-   local include
137
-   local mark
138
-   local RVAL
139
-
140
-   #
141
-   # so objc can reuse this, make a provision for import with --objc flag
142
-   # but allow #include if the mark no-objc is set
143
-   #
144
-   include="include"
145
-   if [ "${OPTION_IMPORT}" = 'YES' ]
146
-   then
147
-      include="import"
148
-
149
-      case ",${marks}," in
150
-         *,no-import,*)
151
-            include="include"
152
-         ;;
153
-      esac
154
-   fi
155
-
156
-   if [ ! -z "${marks}" ]
157
-   then
158
-   	r_osexclude_to_cpp_if "${marks}"
159
-      ifstatement="${RVAL}"
160
-   fi
161
-
162
-   if [ ! -z "${ifstatement}" ]
163
-   then
164
-      echo "${ifstatement}"
165
-      indent=" "
166
-   fi
167
-
168
-   # TODO: remove support __has_include for C ? Not all C compilers have
169
-   #       __has_include
170
-   case ",${marks}," in
171
-      *,no-require,*)
172
-         echo "# if __has_include(<${header}>)"
173
-         echo "#  ${indent}${include} <${header}>   // ${address}"
174
-         echo "# endif"
175
-      ;;
176
-
177
-      *)
178
-         echo "# ${indent}${include} <${header}>   // ${address}"
179
-      ;;
180
-   esac
181
-
182
-
183
-   if [ ! -z "${ifstatement}" ]
184
-   then
185
-      echo "# endif"
186
-   fi
187
-
188
-   echo
189
-}
190
-
191
-
192
-emit_c_include_library()
193
-{
194
-   log_entry "emit_c_include_library" "$@"
195
-
196
-   local address="$1"
197
-   local marks="$2"
198
-   local header="$3"
199
-
200
-   local RVAL
201
-
202
-   #
203
-   # the default for libraries is old style <name.h> not <name/name.h>
204
-   #
205
-   if [ -z "${header}" ]
206
-   then
207
-      local name
208
-
209
-      r_fast_basename "${address}"
210
-      name="${RVAL}"
211
-      header="${name}.h"
212
-   fi
213
-
214
-   _emit_c_include "${address}" "${header}" "${marks}"
215
-
216
-}
217
-
218
-
219
-emit_c_include_dependency()
220
-{
221
-   log_entry "emit_c_include_dependency" "$@"
222
-
223
-   local address="$1"
224
-   local marks="$2"
225
-   local header="$3"
226
-
227
-   local RVAL
228
-   #
229
-   # the default for dependencies is <name/name.h>
230
-   #
231
-   if [ -z "${header}" ]
232
-   then
233
-      local name
234
-
235
-      r_fast_basename "${address}"
236
-      name="${RVAL}"
237
-      header="${name}/${name}.h"
238
-   fi
239
-
240
-   _emit_c_include "${address}" "${header}" "${marks}"
241
-}
242
-
243
-
244
-emit_c_header()
245
-{
246
-   log_entry "emit_c_header" "$@"
247
-
248
-   local marks="$1"
249
-
250
-   local filter_marks
251
-
252
-   r_comma_concat "header" "${marks}"
253
-   filter_marks="${RVAL}"
254
-
255
-   # since the order of the headers is important and needs to be in treeorder
256
-   # we use mulle-sourcetree directly
257
-   local headers
258
-
259
-   headers="`exekutor mulle-sourcetree list \
260
-                                       --format "%a;%m;%i={include,,-------}\\n" \
261
-                                       --marks "${filter_marks}" \
262
-                                       --output-raw \
263
-                                       --no-output-header`" || return 1
264
-
265
-   local dependency
266
-
267
-   set -o noglob ; IFS="
268
-"
269
-   for header in ${headers}
270
-   do
271
-      IFS="${DEFAULT_IFS}"; set +o noglob
272
-
273
-      local address
274
-      local marks
275
-      local include
276
-
277
-      IFS=";" read address marks include <<< "${header}"
278
-
279
-      if [ -z "${address}" ]
280
-      then
281
-         continue
282
-      fi
283
-
284
-      log_verbose "Emit cmake statements for ${C_MAGENTA}${C_BOLD}${address}"
285
-
286
-      case ",${marks}," in
287
-         *,no-dependency,*)
288
-            emit_c_include_library "${address}" \
289
-                                   "${marks}" \
290
-                                   "${include}" \
291
-                                   "$@"
292
-         ;;
293
-
294
-         *)
295
-            emit_c_include_dependency "${address}" \
296
-                                      "${marks}" \
297
-                                      "${include}" \
298
-                                      "$@"
299
-         ;;
300
-      esac
301
-   done
302
-
303
-   IFS="${DEFAULT_IFS}"; set +o noglob
304
-}
305
-
306
-
307
-c_include()
308
-{
309
-   log_entry "c_include" "$@"
310
-
311
-   local projectname="$1"
312
-   local projectidentifier="$2"
313
-
314
-   local text_h
315
-
316
-   case "${MULLE_SDE_INCLUDE_FILENAME}" in
317
-      DISABLE*)
318
-         return
319
-      ;;
320
-
321
-      NONE)
322
-         text_h="/* Contents suppressed by MULLE_SDE_INCLUDE_FILENAME NONE.
323
-* Use
324
-*   mulle-sde environment --global set MULLE_SDE_INCLUDE_FILENAME DISABLE
325
-* to not generate this file.
326
-*/"
327
-      ;;
328
-
329
-      "")
330
-         MULLE_SDE_INCLUDE_FILENAME="${PROJECT_SOURCE_DIR}/_${projectname}-include.h"
331
-      ;;
332
-   esac
333
-
334
-   if [ -z "${text_h}" ]
335
-   then
336
-      local marks
337
-
338
-      case "${PROJECT_DIALECT}" in
339
-         'objc')
340
-            marks="no-import,public"
341
-         ;;
342
-
343
-         *)
344
-            marks="public"
345
-         ;;
346
-      esac
347
-
348
-      text_h="`emit_c_header "${marks}"`" || exit 1
349
-
350
-      if [ -z "${text_h}" ]
351
-      then
352
-         text_h="/* no headers */"
353
-      fi
354
-
355
-      text_h="/*
356
-*   This file will be regenerated by \`mulle-sde update|monitor\`.
357
-* Edits will be lost.
358
-* Suppress this file with MULLE_SDE_INCLUDE_FILENAME NONE|DISABLE.
359
-*/
360
-
361
-#ifndef _${projectidentifier}_include_h__
362
-#define _${projectidentifier}_include_h__
363
-
364
-${text_h}
365
-
366
-#endif"
367
-   fi
368
-
369
-   if [ "${MULLE_SDE_INCLUDE_FILENAME}" = "-" ]
370
-   then
371
-      log_info "-include.h"
372
-      rexekutor echo "${text_h}"
373
-   else
374
-      log_verbose "Writing ${C_RESET_BOLD}${MULLE_SDE_INCLUDE_FILENAME}"
375
-      redirect_exekutor "${MULLE_SDE_INCLUDE_FILENAME}" echo "${text_h}"
376
-   fi
377
-}
378
-
379
-
380
-objc_import()
381
-{
382
-   log_entry "objc_import" "$@"
383
-
384
-   local projectname="$1"
385
-   local projectidentifier="$2"
386
-
387
-   local text_h
388
-
389
-   case "${MULLE_SDE_IMPORT_FILENAME}" in
390
-      DISABLE*)
391
-         return
392
-      ;;
393
-
394
-      NONE)
395
-         text_h="/* Contents suppressed by MULLE_SDE_IMPORT_FILENAME NONE.
396
-* Use
397
-*   mulle-sde environment --global set MULLE_SDE_IMPORT_FILENAME DISABLE
398
-* to not generate this file.
399
-*/"
400
-      ;;
401
-
402
-      "")
403
-         MULLE_SDE_IMPORT_FILENAME="${PROJECT_SOURCE_DIR}/_${projectname}-import.h"
404
-      ;;
405
-   esac
406
-
407
-   if [ -z "${text_h}" ]
408
-   then
409
-      text_h="`emit_c_header "import,public"`" || exit 1
410
-
411
-      if [ -z "${text_h}" ]
412
-      then
413
-         text_h="/* no headers */"
414
-      fi
415
-
416
-
417
-      text_h="/*
418
-* This file will be regenerated by \`mulle-sde update|monitor\`.
419
-* Edits will be lost.
420
-* Suppress this file with MULLE_SDE_IMPORT_FILENAME NONE|DISABLE.
421
-*/
422
-
423
-#ifndef _${projectidentifier}_import_h__
424
-#define _${projectidentifier}_import_h__
425
-
426
-${text_h}
427
-
428
-#endif"
429
-   fi
430
-
431
-   if [ "${MULLE_SDE_IMPORT_FILENAME}" = "-" ]
432
-   then
433
-      log_info "-import.h"
434
-      rexekutor echo "${text_h}"
435
-   else
436
-      log_verbose "Writing ${C_RESET_BOLD}${MULLE_SDE_IMPORT_FILENAME}"
437
-      redirect_exekutor "${MULLE_SDE_IMPORT_FILENAME}" echo "${text_h}"
438
-   fi
439
-}
440
-
441
-
442
-c_include_private()
443
-{
444
-   log_entry "c_include_private" "$@"
445
-
446
-   local projectname="$1"
447
-   local projectidentifier="$2"
448
-
449
-   local text_h
450
-
451
-   case "${MULLE_SDE_INCLUDE_PRIVATE_FILENAME}" in
452
-      DISABLE*)
453
-         return
454
-      ;;
455
-
456
-      NONE)
457
-         text_h="/* Contents suppressed by MULLE_SDE_INCLUDE_PRIVATE_FILENAME NONE.
458
-* Use
459
-*   mulle-sde environment --global set MULLE_SDE_INCLUDE_PRIVATE_FILENAME DISABLE
460
-* to not generate this file.
461
-*/"
462
-      ;;
463
-
464
-      "")
465
-         MULLE_SDE_INCLUDE_PRIVATE_FILENAME="${PROJECT_SOURCE_DIR}/_${projectname}-include-private.h"
466
-      ;;
467
-   esac
468
-
469
-   if [ -z "${text_h}" ]
470
-   then
471
-      local marks
472
-
473
-      case "${PROJECT_DIALECT}" in
474
-         'objc')
475
-            marks="no-import,no-public"
476
-         ;;
477
-
478
-         *)
479
-            marks="no-public"
480
-         ;;
481
-      esac
482
-
483
-      text_h="`emit_c_header "${marks}"`" || exit 1
484
-
485
-      if [ -z "${text_h}" ]
486
-      then
487
-         text_h="/* no headers */"
488
-      fi
489
-
490
-      text_h="/*
491
-   This file will be regenerated by \`mulle-sde update|monitor\`.
492
-   Edits will be lost.
493
-   Suppress this file with MULLE_SDE_INCLUDE_PRIVATE_FILENAME NONE|DISABLE.
494
-*/
495
-
496
-#ifndef _${projectidentifier}_include_private_h__
497
-#define _${projectidentifier}_include_private_h__
498
-
499
-${text_h}
500
-
501
-#endif"
502
-   fi
503
-
504
-   if [ "${MULLE_SDE_INCLUDE_PRIVATE_FILENAME}" = "-" ]
505
-   then
506
-      log_info "-include-private.h"
507
-      rexekutor echo "${text_h}"
508
-   else
509
-      log_verbose "Writing ${C_RESET_BOLD}${MULLE_SDE_INCLUDE_PRIVATE_FILENAME}"
510
-      redirect_exekutor "${MULLE_SDE_INCLUDE_PRIVATE_FILENAME}" echo "${text_h}"
511
-   fi
512
-}
513
-
514
-
515
-objc_import_private()
516
-{
517
-   log_entry "objc_import_private" "$@"
518
-
519
-   local projectname="$1"
520
-   local projectidentifier="$2"
521
-
522
-   local text_h
523
-
524
-   case "${MULLE_SDE_IMPORT_PRIVATE_FILENAME}" in
525
-      DISABLE*)
526
-         return
527
-      ;;
528
-
529
-      NONE)
530
-         text_h="/* Contents suppressed by MULLE_SDE_IMPORT_PRIVATE_FILENAME NONE.
531
-* Use
532
-*   mulle-sde environment --global set MULLE_SDE_IMPORT_PRIVATE_FILENAME DISABLE
533
-* to not generate this file.
534
-*/"
535
-      ;;
536
-
537
-
538
-      "")
539
-         MULLE_SDE_IMPORT_PRIVATE_FILENAME="${PROJECT_SOURCE_DIR}/_${projectname}-import-private.h"
540
-      ;;
541
-   esac
542
-
543
-   if [ -z "${text_h}" ]
544
-   then
545
-      text_h="`emit_c_header "import,no-public"`" || exit 1
546
-
547
-      if [ -z "${text_h}" ]
548
-      then
549
-         text_h="/* no headers */"
550
-      fi
551
-
552
-
553
-      text_h="/*
554
-* This file will be regenerated by \`mulle-sde update|monitor\`.
555
-* Edits will be lost.
556
-* Suppress this file with MULLE_SDE_IMPORT_PRIVATE_FILENAME NONE|DISABLE.
557
-*/
558
-
559
-#ifndef _${projectidentifier}_import_private_h__
560
-#define _${projectidentifier}_import_private_h__
561
-
562
-${text_h}
563
-
564
-#endif"
565
-   fi
566
-
567
-   if [ "${MULLE_SDE_IMPORT_PRIVATE_FILENAME}" = "-" ]
568
-   then
569
-      log_info "-import-private.h"
570
-      rexekutor echo "${text_h}"
571
-   else
572
-      log_verbose "Writing ${C_RESET_BOLD}${MULLE_SDE_IMPORT_PRIVATE_FILENAME}"
573
-      redirect_exekutor "${MULLE_SDE_IMPORT_PRIVATE_FILENAME}" echo "${text_h}"
574
-   fi
575
-}
576
-
577
-
578
-main()
579
-{
580
-   log_entry "main" "$@"
581
-
582
-   # technical flags
583
-   local MULLE_TRACE
584
-   local MULLE_FLAG_DONT_DEFER='NO'
585
-   local MULLE_FLAG_EXEKUTOR_DRY_RUN='NO'
586
-   local MULLE_FLAG_FOLLOW_SYMLINKS='YES'
587
-   local MULLE_FLAG_LOG_CACHE='NO'
588
-   local MULLE_FLAG_LOG_DEBUG='NO'
589
-   local MULLE_FLAG_LOG_EXEKUTOR='NO'
590
-   local MULLE_FLAG_LOG_FLUFF='NO'
591
-   local MULLE_FLAG_LOG_MERGE='NO'
592
-   local MULLE_FLAG_LOG_SCRIPTS='NO'
593
-   local MULLE_FLAG_LOG_SETTINGS='NO'
594
-   local MULLE_FLAG_LOG_VERBOSE='NO'
595
-   local MULLE_TRACE_PATHS_FLIP_X='NO'
596
-   local MULLE_TRACE_POSTPONE='NO'
597
-   local MULLE_TRACE_RESOLVER_FLIP_X='NO'
598
-   local MULLE_TRACE_SETTINGS_FLIP_X='NO'
599
-
600
-   local OPTION_IMPORT="DEFAULT"
601
-
602
-   while [ $# -ne 0 ]
603
-   do
604
-      if options_technical_flags "$1"
605
-      then
606
-         shift
607
-         continue
608
-      fi
609
-
610
-      case "$1" in
611
-         -h*|--help|help)
612
-            usage
613
-         ;;
614
-
615
-         --import)
616
-            OPTION_IMPORT='YES'
617
-         ;;
618
-
619
-         --no-import)
620
-            OPTION_IMPORT='NO'
621
-         ;;
622
-
623
-         -p|--project-name)
624
-            [ "$#" -eq 1 ] && usage "Missing argument to \"$1\""
625
-            shift
626
-
627
-            PROJECT_NAME="$1"
628
-         ;;
629
-
630
-         -t|--project-type)
631
-            [ "$#" -eq 1 ] && usage "Missing argument to \"$1\""
632
-            shift
633
-
634
-            PROJECT_TYPE="$1"
635
-         ;;
636
-
637
-         --project-source-dir)
638
-            [ "$#" -eq 1 ] && usage "Missing argument to \"$1\""
639
-            shift
640
-
641
-            PROJECT_SOURCE_DIR="$1"
642
-         ;;
643
-
644
-         --project-dialect)
645
-            [ "$#" -eq 1 ] && usage "Missing argument to \"$1\""
646
-            shift
647
-
648
-            PROJECT_DIALECT="$1"
649
-         ;;
650
-
651
-         --stdout)
652
-            MULLE_SDE_INCLUDE_FILENAME="-"
653
-            MULLE_SDE_INCLUDE_PRIVATE_FILENAME="-"
654
-            MULLE_SDE_IMPORT_FILENAME="-"
655
-            MULLE_SDE_IMPORT_PRIVATE_FILENAME="-"
656
-         ;;
657
-
658
-         -*)
659
-            log_error "Unknown option \"$1\""
660
-            usage
661
-         ;;
662
-
663
-         *)
664
-            break
665
-         ;;
666
-      esac
667
-
668
-      shift
669
-   done
670
-
671
-   options_setup_trace "${MULLE_TRACE}"
672
-
673
-   [ -z "${MULLE_VIRTUAL_ROOT}" ] && fail "Must run inside the mulle-sde environment"
674
-
675
-   if [ -z "${MULLE_CASE_SH}" ]
676
-   then
677
-      # shellcheck source=mulle-case.sh
678
-      . "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}/mulle-case.sh" || return 1
679
-   fi
680
-
681
-   local RVAL
682
-
683
-   if [ -z "${PROJECT_NAME}" ]
684
-   then
685
-   	r_fast_basename "${PWD}"
686
-      PROJECT_NAME="${RVAL}" # could be nicer
687
-   fi
688
-
689
-   local PROJECT_IDENTIFIER
690
-   local PROJECT_DOWNCASE_IDENTIFIER
691
-
692
-   r_tweaked_de_camel_case "${PROJECT_NAME}"
693
-   PROJECT_IDENTIFIER="${RVAL}"
694
-   PROJECT_IDENTIFIER="`printf "%s" "${PROJECT_IDENTIFIER}" | tr -c 'a-zA-Z0-9' '_'`"
695
-   PROJECT_DOWNCASE_IDENTIFIER="`tr 'A-Z' 'a-z' <<< "${PROJECT_IDENTIFIER}"`"
696
-
697
-   [ -z "${PROJECT_SOURCE_DIR}" ] && internal_fail "PROJECT_SOURCE_DIR not set"
698
-   [ -z "${PROJECT_DIALECT}" ] && log_warning "PROJECT_DIALECT not set"
699
-
700
-   c_include "${PROJECT_NAME}" "${PROJECT_DOWNCASE_IDENTIFIER}" || exit 1
701
-   c_include_private "${PROJECT_NAME}" "${PROJECT_DOWNCASE_IDENTIFIER}" || exit 1
702
-
703
-   if [ "${PROJECT_DIALECT}" = "objc" ]
704
-   then
705
-      if [ "${OPTION_IMPORT}" = "DEFAULT" ]
706
-      then
707
-         OPTION_IMPORT='YES'
708
-      fi
709
-
710
-      objc_import "${PROJECT_NAME}" "${PROJECT_DOWNCASE_IDENTIFIER}" || exit 1
711
-      objc_import_private "${PROJECT_NAME}" "${PROJECT_DOWNCASE_IDENTIFIER}" || exit 1
712
-   fi
713
-}
714
-
715
-
716
-_init()
717
-{
718
-   if [ -z "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}" ]
719
-   then
720
-      MULLE_BASHFUNCTIONS_LIBEXEC_DIR="`mulle-bashfunctions-env "libexec-dir" 2> /dev/null`"
721
-      [ -z "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}" ] && \
722
-         echo "mulle-bashfunctions-env not installed" >&2 && \
723
-         exit 1
724
-   fi
725
-
726
-   . "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}/mulle-bashfunctions.sh" "minimal" || exit 1
727
-}
728
-
729
-_init "$@"
730
-main "$@"
731
-
732 0
deleted file mode 100755
... ...
@@ -1,146 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-
4
-get_includes()
5
-{
6
-   local filename="$1"
7
-
8
-   sed -n -e 's/^.*include([ ]*\([^) ]*\)[ ]*\([^ ]*\)[ ]*).*/\1;\2/p' "${filename}"
9
-}
10
-
11
-
12
-find_cmake_file()
13
-{
14
-   local filename="$1"
15
-   local originator="$2"
16
-   local searchpath="$3"
17
-
18
-   case "${filename}" in
19
-      *.*)
20
-         searchpath="`dirname -- "${originator}"`"
21
-      ;;
22
-
23
-      *)
24
-         filename="${filename}.cmake"
25
-      ;;
26
-   esac
27
-
28
-   local directory
29
-
30
-   IFS=":"
31
-   for directory in ${searchpath}
32
-   do
33
-      IFS="${DEFAULT_IFS}"
34
-
35
-      if [ -f "${directory}/${filename}" ]
36
-      then
37
-         echo "${directory}/${filename}"
38
-         return 0
39
-      fi
40
-   done
41
-   IFS="${DEFAULT_IFS}"
42
-
43
-   return 1
44
-}
45
-
46
-
47
-pretty()
48
-{
49
-   local filename="$1"
50
-
51
-   case "${filename}" in
52
-      ./*)
53
-         pretty "${filename#./}"
54
-         return
55
-      ;;
56
-   esac
57
-
58
-   echo "${filename}"
59
-}
60
-
61
-_list_cmake_include()
62
-{
63
-   local filename="$1"
64
-   local originator="$2"
65
-   local searchpath="$3"
66
-
67
-   local actualfile
68
-
69
-   if ! actualfile="`find_cmake_file "${filename}" "${originator}" "${searchpath}"`"
70
-   then
71
-      if [ -z "${optional}" ]
72
-      then
73
-         echo "\"${filename}\" not found" >&2
74
-         return 1
75
-      fi
76
-         return 0
77
-   fi
78
-
79
-   echo "   \"`pretty "${originator}"`\" -> \"`pretty "${actualfile}"`\""
80
-
81
-   list_cmake_includes "${actualfile}" "${searchpath}"
82
-}
83
-
84
-
85
-list_cmake_includes()
86
-{
87
-   local filename="$1"
88
-   local searchpath="$2"
89
-
90
-   local actualfile
91
-   local includefile
92
-   local includeinfo
93
-   local optional
94
-
95
-   IFS="
96
-"
97
-   for includeinfo in `get_includes "${filename}"`
98
-   do
99
-      IFS="${DEFAULT_IFS}"
100
-
101
-      includefile="${includeinfo%;*}"
102
-      optional="${includeinfo%*#}"
103
-
104
-      if [ "${includefile}" = '"${FILE}"' ]
105
-      then
106
-         local directory
107
-
108
-         directory="`dirname -- "${filename}"`"
109
-         for includefile in "${directory}"/cmake/[A-Za-z0-9]*.cmake
110
-         do
111
-            _list_cmake_include "${includefile}" "${filename}" "${searchpath}"
112
-         done
113
-      else
114
-         _list_cmake_include "${includefile}" "${filename}" "${searchpath}"
115
-      fi
116
-   done
117
-   IFS="${DEFAULT_IFS}"
118
-}
119
-
120
-
121
-main()
122
-{
123
-   local filename="${1:-CMakeLists.txt}"
124
-
125
-   CMAKE_SEARCHPATH="${CMAKE_SEARCHPATH:-cmake:cmake/share:.}"
126
-
127
-   if [ ! -f "${filename}" ]
128
-   then
129
-      echo "\"${filename}\" not found" >&2
130
-      exit 1
131
-   fi
132
-
133
-   echo "digraph xxx {"
134
-   echo "   ordering=out"
135
-   echo "   rankdir=\"LR\""
136
-   echo "   node [ shape=\"note\" ]"
137
-   echo "   \"`pretty "${filename}"`\""
138
-
139
-   list_cmake_includes "${filename}" "${CMAKE_SEARCHPATH}"
140
-   echo "}"
141
-}
142
-
143
-
144
-DEFAULT_IFS="${IFS}"
145
-
146
-main "$@"
147 0
deleted file mode 100755
... ...
@@ -1,429 +0,0 @@
1
-#! /usr/bin/env bash
2
-#
3
-#   Copyright (c) 2018 Nat! - Mulle kybernetiK
4
-#   All rights reserved.
5
-#
6
-#   Redistribution and use in source and binary forms, with or without
7
-#   modification, are permitted provided that the following conditions are met:
8
-#
9
-#   Redistributions of source code must retain the above copyright notice, this
10
-#   list of conditions and the following disclaimer.
11
-#
12
-#   Redistributions in binary form must reproduce the above copyright notice,
13
-#   this list of conditions and the following disclaimer in the documentation
14
-#   and/or other materials provided with the distribution.
15
-#
16
-#   Neither the name of Mulle kybernetiK nor the names of its contributors
17
-#   may be used to endorse or promote products derived from this software
18
-#   without specific prior written permission.
19
-#
20
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
-#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
-#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
-#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
-#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
-#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
-#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
-#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
-#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
-#   POSSIBILITY OF SUCH DAMAGE.
31
-#
32
-# Create fresh HeadersAndSources.cmake from filesystem information
33
-#
34
-[ "${TRACE}" = 'YES' ] && set -x && : "$0" "$@"
35
-
36
-
37
-CMAKE_SOURCE_UPDATE_VERSION="0.0.1"
38
-
39
-
40
-usage()
41
-{
42
-   if [ ! -z "$1" ]
43
-   then
44
-      log_error "$1"
45
-   fi
46
-
47
-   cat <<EOF >&2
48
-Usage:
49
-   mulle-sde-cmake-source-update
50
-
51
-   Let mulle-monitor or mulle-sde run this for you.
52
-
53
-EOF
54
-   exit 1
55
-}
56
-
57
-
58
-emit_cmake_var()
59
-{
60
-   log_entry "emit_cmake_var" "$@"
61
-
62
-   local name="$1"
63
-   local contents="$2"
64
-
65
-   if [ -z "${contents}" ]
66
-   then
67
-      return
68
-   fi
69
-
70
-   echo "set( ${name}"
71
-   LC_ALL="C" sed '/ /s/\(.*\)/"\1"/' <<< "${contents}"
72
-   echo ")"
73
-   echo
74
-}
75
-
76
-
77
-emit_common_directories()
78
-{
79
-   log_entry "emit_common_directories" "$@"
80
-
81
-   local items="$1"
82
-   local emitter="$2"
83
-   local parameter="$3"
84
-
85
-   [ -z "${emitter}" ] && internal_fail "emitter is empty"
86
-
87
-   local collection
88
-
89
-   collection="`rexekutor sed -n -e 's|^[^;]*;\(.*\)/[^/]*\.h|\1|p' <<< "${items}" | LC_ALL=C sort -u`"
90
-
91
-   if [ ! -z "${collection}" ]
92
-   then
93
-      if [ "${PROJECT_SOURCE_DIR}" = "." ]
94
-      then
95
-         collection=".
96
-${collection}"
97
-      fi
98
-
99
-      "${emitter}" "${parameter}" "${collection}"
100
-   fi
101
-}
102
-
103
-
104
-emit_by_category()
105
-{
106
-   log_entry "emit_by_category" "$@"
107
-
108
-   local items="$1"
109
-   local emitter="$2"
110
-
111
-   [ -z "${emitter}" ] && internal_fail "emitter is empty"
112
-
113
-   local collectname
114
-   local collection
115
-   local remainder
116
-
117
-   remainder="${items}"
118
-
119
-   while [ ! -z "${remainder}" ]
120
-   do
121
-      # https://stackoverflow.com/questions/1773939/how-to-use-sed-to-return-something-from-first-line-which-matches-and-quit-early
122
-      collectname="`sed -n -e '/\(^[^;]*\).*/{s//\1/p;q;}' <<< "${remainder}" `"
123
-      collection="`egrep "^${collectname};" <<< "${remainder}" | cut -d ';' -f 2-`"
124
-
125
-      "${emitter}" "${collectname}" "${collection}"
126
-
127
-      remainder="`egrep -v "^${collectname};" <<< "${remainder}" `"
128
-   done
129
-
130
-   :
131
-}
132
-
133
-
134
-create_headers_file()
135
-{
136
-   log_entry "create_headers_file" "$@"
137
-
138
-   local categorized_files="$1"
139
-
140
-   local text_hdr
141
-
142
-   case "${MULLE_SDE_CMAKE_HEADERS_FILE}" in
143
-      DISABLE*)
144
-         log_verbose "Header generation disabled by MULLE_SDE_CMAKE_HEADERS_FILE=DISABLE"
145
-         return
146
-      ;;
147
-
148
-      NONE)
149
-         text_hdr="# Header generation disabled by MULLE_SDE_CMAKE_HEADERS_FILE=NONE"
150
-         MULLE_SDE_CMAKE_HEADERS_FILE=""
151
-      ;;
152
-
153
-      *)
154
-         local categorized_headers
155
-         local text_hdr1
156
-         local text_hdr2
157
-
158
-         categorized_headers="`rexekutor egrep '^[^;]*HEADERS;' <<< "${categorized_files}"`"
159
-
160
-         text_hdr1="`emit_common_directories "${categorized_headers}" emit_cmake_var INCLUDE_DIRS` "  || return 1
161
-         text_hdr2="`emit_by_category "${categorized_headers}" emit_cmake_var` "  || return 1
162
-
163
-         if [ -z "${text_hdr2}" ]
164
-         then
165
-            text_hdr2="# no headers"
166
-         fi
167
-
168
-         text_hdr="${text_hdr1}
169
-
170
-${text_hdr2}"
171
-
172
-      ;;
173
-   esac
174
-
175
-   MULLE_SDE_CMAKE_HEADERS_FILE="${MULLE_SDE_CMAKE_HEADERS_FILE:-cmake/_Headers.cmake}"
176
-
177
-   text_hdr="#
178
-# ${MULLE_SDE_CMAKE_HEADERS_FILE} is generated by \`mulle-sde\`. Edits will be lost.
179
-#
180
-if( MULLE_TRACE_INCLUDE)
181
-   MESSAGE( STATUS \"# Include \\\"\${CMAKE_CURRENT_LIST_FILE}\\\"\" )
182
-endif()
183
-
184
-${text_hdr}
185
-"
186
-
187
-   if [ "${MULLE_SDE_CMAKE_HEADERS_FILE}" = '-' ]
188
-   then
189
-   	log_info "Sources"
190
-   	echo "${text_src}"
191
-   	return 0
192
-   fi
193
-
194
-   log_fluff "Create cmake header files (${PWD})"
195
-
196
-   log_verbose "Writing ${C_RESET_BOLD}${MULLE_SDE_CMAKE_HEADERS_FILE}"
197
-   r_fast_dirname "${MULLE_SDE_CMAKE_HEADERS_FILE}"
198
-   exekutor mkdir -p  "${RVAL}"
199
-   exekutor chmod a+w "${MULLE_SDE_CMAKE_HEADERS_FILE}"  2> /dev/null
200
-   r_mkdir_parent_if_missing "${MULLE_SDE_CMAKE_HEADERS_FILE}"
201
-   redirect_exekutor "${MULLE_SDE_CMAKE_HEADERS_FILE}" echo "${text_hdr}"
202
-   exekutor chmod a-w "${MULLE_SDE_CMAKE_HEADERS_FILE}"
203
-}
204
-
205
-
206
-create_sources_file()
207
-{
208
-   log_entry "create_sources_file" "$@"
209
-
210
-   local categorized_files="$1"
211
-
212
-   local text_src
213
-
214
-   case "${MULLE_SDE_CMAKE_SOURCES_FILE}" in
215
-      DISABLE*)
216
-         log_verbose "Source generation disabled by MULLE_SDE_CMAKE_SOURCES_FILE=DISABLE"
217
-         return
218
-      ;;
219
-
220
-      NONE)
221
-         text_src="# Source generation disabled by MULLE_SDE_CMAKE_SOURCES_FILE=NONE"
222
-         MULLE_SDE_CMAKE_SOURCES_FILE=""
223
-      ;;
224
-
225
-      *)
226
-         local categorized_sources
227
-
228
-         categorized_sources="`rexekutor egrep -v '^[^;]*HEADERS;' <<< "${categorized_files}"`"
229
-
230
-         text_src="`emit_by_category "${categorized_sources}" emit_cmake_var`"   || return 1
231
-
232
-         if [ -z "${text_src}" ]
233
-         then
234
-            #
235
-            # header only libraries are tricky to do portably
236
-            #
237
-            text_src="message( FATAL_ERROR \" No sources found. \`mulle-sde environment set MULLE_SDE_CMAKE_SOURCES_FILE NONE\`, if this is intentional\")"
238
-         fi
239
-      ;;
240
-   esac
241
-
242
-   MULLE_SDE_CMAKE_SOURCES_FILE="${MULLE_SDE_CMAKE_SOURCES_FILE:-cmake/_Sources.cmake}"
243
-   text_src="#
244
-# ${MULLE_SDE_CMAKE_SOURCES_FILE} is generated by \`mulle-sde\`. Edits will be lost.
245
-#
246
-if( MULLE_TRACE_INCLUDE)
247
-   MESSAGE( STATUS \"# Include \\\"\${CMAKE_CURRENT_LIST_FILE}\\\"\" )
248
-endif()
249
-
250
-${text_src}"
251
-
252
-   log_fluff "Create cmake source files (${PWD})"
253
-
254
-   if [ "${MULLE_SDE_CMAKE_SOURCES_FILE}" = '-' ]
255
-   then
256
-   	log_info "Sources"
257
-   	echo "${text_src}"
258
-   	return 0
259
-   fi
260
-
261
-   log_verbose "Writing ${C_RESET_BOLD}${MULLE_SDE_CMAKE_SOURCES_FILE}"
262
-   r_fast_dirname "${MULLE_SDE_CMAKE_SOURCES_FILE}"
263
-   exekutor mkdir -p  "${RVAL}" 2> /dev/null
264
-   exekutor chmod a+w "${MULLE_SDE_CMAKE_SOURCES_FILE}"  2> /dev/null
265
-   r_mkdir_parent_if_missing "${MULLE_SDE_CMAKE_SOURCES_FILE}"
266
-   redirect_exekutor "${MULLE_SDE_CMAKE_SOURCES_FILE}" echo "${text_src}"
267
-   exekutor chmod a-w "${MULLE_SDE_CMAKE_SOURCES_FILE}"
268
-}
269
-
270
-
271
-main()
272
-{
273
-   log_entry "main" "$@"
274
-
275
-   # technical flags
276
-   local MULLE_TRACE
277
-   local MULLE_FLAG_DONT_DEFER='NO'
278
-   local MULLE_FLAG_EXEKUTOR_DRY_RUN='NO'
279
-   local MULLE_FLAG_FOLLOW_SYMLINKS='YES'
280
-   local MULLE_FLAG_LOG_CACHE='NO'
281
-   local MULLE_FLAG_LOG_DEBUG='NO'
282
-   local MULLE_FLAG_LOG_EXEKUTOR='NO'
283
-   local MULLE_FLAG_LOG_FLUFF='NO'
284
-   local MULLE_FLAG_LOG_MERGE='NO'
285
-   local MULLE_FLAG_LOG_SCRIPTS='NO'
286
-   local MULLE_FLAG_LOG_SETTINGS='NO'
287
-   local MULLE_FLAG_LOG_VERBOSE='NO'
288
-   local MULLE_TRACE_PATHS_FLIP_X='NO'
289
-   local MULLE_TRACE_POSTPONE='NO'
290
-   local MULLE_TRACE_RESOLVER_FLIP_X='NO'
291
-   local MULLE_TRACE_SETTINGS_FLIP_X='NO'
292
-
293
-   local OPTION_PARALLEL='YES'
294
-   local OPTION_HEADERS='YES'
295
-   local OPTION_SOURCES='YES'
296
-
297
-   while [ $# -ne 0 ]
298
-   do
299
-      if options_technical_flags "$1"
300
-      then
301
-         shift
302
-         continue
303
-      fi
304
-
305
-      case "$1" in
306
-         -h*|--help|help)
307
-            usage
308
-         ;;
309
-
310
-         --no-parallel)
311
-            OPTION_PARALLEL='NO'
312
-         ;;
313
-
314
-         --no-headers)
315
-				OPTION_HEADERS='NO'
316
-			;;
317
-
318
-         --no-sources)
319
-				OPTION_SOURCES='NO'
320
-			;;
321
-
322
-         --headers-file)
323
-				shift
324
-				MULLE_SDE_CMAKE_HEADERS_FILE="$1"
325
-			;;
326
-
327
-         --sources-file)
328
-				shift
329
-				MULLE_SDE_CMAKE_SOURCES_FILE="$1"
330
-			;;
331
-
332
-         --version)
333
-            echo "${CMAKE_SOURCE_UPDATE_VERSION}"
334
-            return 0
335
-         ;;
336
-
337
-         -*)
338
-            usage "Unknown option \"$1\""
339
-         ;;
340
-
341
-         *)
342
-            break
343
-         ;;
344
-      esac
345
-
346
-      shift
347
-   done
348
-
349
-   options_setup_trace "${MULLE_TRACE}"
350
-
351
-   [ $# -ne 0 ] && usage "superflous arguments $*"
352
-
353
-   MULLE_MATCH="${MULLE_MATCH:-`command -v mulle-match`}"
354
-   [ -z "${MULLE_MATCH}" ] && fail "mulle-match not in PATH"
355
-
356
-   [ -z "${MULLE_VIRTUAL_ROOT}" ] && fail "Must run inside the mulle-sde environment"
357
-
358
-   #
359
-   # With 1000 header and 1000 source files, a full update takes ~7s on
360
-   # my machine. It certainly would be interesting to make this properly
361
-   # incremental.
362
-   #
363
-   # Foreseen problems:
364
-   #
365
-   #     missed events ?
366
-   #
367
-   local categorized_files
368
-
369
-   if ! categorized_files="`exekutor "${MULLE_MATCH}" \
370
-                                 ${MULLE_TECHNICAL_FLAGS} \
371
-                                 ${MULLE_MATCH_FLAGS} \
372
-                                 find --format "%C;%f\\n" \
373
-                                      --match-filter "source"`"
374
-   then
375
-      return 1
376
-   fi
377
-
378
-   if [ -z "${categorized_files}" ]
379
-   then
380
-      log_warning "No matching source files found. " >&2
381
-      # exit 0 # but still create empty files, otherwise cmake is unhappy
382
-   fi
383
-
384
-   categorized_files="`LC_ALL=C rexekutor sort -d -t';' -k 1,2 <<< "${categorized_files}" `"
385
-
386
-   if [ "${OPTION_PARALLEL}" = 'YES' ]
387
-   then
388
-   	if [ "${OPTION_HEADERS}" = 'YES' ]
389
-   	then
390
-      	create_headers_file "${categorized_files}" &
391
-      fi
392
-   	if [ "${OPTION_SOURCES}" = 'YES' ]
393
-   	then
394
-      	create_sources_file "${categorized_files}" &
395
-      fi
396
-
397
-      log_fluff "waiting..."
398
-      wait
399
-      log_fluff 'done!'
400
-   else
401
-   	if [ "${OPTION_HEADERS}" = 'YES' ]
402
-   	then
403
-   	   create_headers_file "${categorized_files}"
404
-      fi
405
-   	if [ "${OPTION_SOURCES}" = 'YES' ]
406
-   	then
407
-   	   create_sources_file "${categorized_files}"
408
-      fi
409
-   fi
410
-}
411
-
412
-
413
-_init()
414
-{
415
-   if [ -z "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}" ]
416
-   then
417
-      MULLE_BASHFUNCTIONS_LIBEXEC_DIR="`mulle-bashfunctions-env "libexec-dir" 2> /dev/null`"
418
-      [ -z "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}" ] && \
419
-         echo "mulle-bashfunctions-env not installed" >&2 && \
420
-         exit 1
421
-   fi
422
-
423
-   . "${MULLE_BASHFUNCTIONS_LIBEXEC_DIR}/mulle-bashfunctions.sh"  || exit 1
424
-}
425
-
426
-_init "$@"
427
-main "$@"
428
-
429
-
430 0
deleted file mode 100755
... ...
@@ -1,913 +0,0 @@
1
-#! /usr/bin/env bash
2
-#
3
-#   Copyright (c) 2018 Nat! - Mulle kybernetiK
4
-#   All rights reserved.
5
-#
6
-#   Redistribution and use in source and binary forms, with or without
7
-#   modification, are permitted provided that the following conditions are met:
8
-#
9
-#   Redistributions of source code must retain the above copyright notice, this
10
-#   list of conditions and the following disclaimer.
11
-#
12
-#   Redistributions in binary form must reproduce the above copyright notice,
13
-#   this list of conditions and the following disclaimer in the documentation
14
-#   and/or other materials provided with the distribution.
15
-#
16
-#   Neither the name of Mulle kybernetiK nor the names of its contributors
17
-#   may be used to endorse or promote products derived from this software
18
-#   without specific prior written permission.
19
-#
20
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
-#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
-#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
-#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
-#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
-#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
-#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
-#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
-#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
-#   POSSIBILITY OF SUCH DAMAGE.
31
-#
32
-
33
-[ "${TRACE}" = 'YES' ] && set -x && : "$0" "$@"
34
-
35
-
36
-CMAKE_SOURCETREE_UPDATE_VERSION="0.0.2"
37
-
38
-
39
-usage()
40
-{
41
-   [ $# -ne 0 ] && log_error "$1"
42
-
43
-   cat <<EOF >&2
44
-Usage:
45
-   ${MULLE_USAGE_NAME} <action> <filename> <category>
46
-
47
-   Create the _Dependencies.cmake and _Libraries.cmake files from the
48
-   information contained in the subtree.
49
-
50
-   ${MULLE_USAGE_NAME} has to run in a mulle-sde environment. You can run it
51
-   with \`mulle-sde run ${MULLE_USAGE_NAME}\`.
52
-
53
-   Subtree marks used:
54
-      no-all-load        : do not emit ObjC specifica
55
-      no-cmakeadd        : do not add to the list of libraries to link
56