-
Notifications
You must be signed in to change notification settings - Fork 100
/
Jamroot.jam
1805 lines (1569 loc) · 72.2 KB
/
Jamroot.jam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# $Id$
#
#
# Original author: Darren Kessner <[email protected]>
#
# Copyright 2008 Spielberg Family Center for Applied Proteomics
# Cedars-Sinai Medical Center, Los Angeles, California 90048
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if ( "--help" in [ modules.peek : ARGV ] )
{ # slip our own help text in here
ECHO
################################
## Targets and Related Options #
################################
# build Build ProteoWizard applications
# =====
# --libraries-path=<DIR> Find libraries directory here.
# Default: "./libraries"
#
# --boost-src=<DIR> Find Boost source distribution here.
# Default: "<libraries-path>/boost_*"
#
# --zlib-src=<DIR> Find zlib source distribution here.
# Default: "<libraries-path>/zlib-1.23.0"
#
# --i-agree-to-the-vendor-licenses For windows builds, indicates
# your willingness to comply with
# license terms of the vendor DLLs
# that enable reading of proprietary
# binary data formats. Without this
# switch your build will not include
# support for reading vendor binary
# files.
#
# --incremental Skip the checks for extracting external library
# tarballs - useful after your initial build
#
# --without-mz5 Build without mz5 support
# --without-mzmlb Build without mzMLb support
# --without-agilent Build without Agilent support
# --without-bruker Build without Bruker support
# --without-sciex Build without Sciex support
# --without-shimadzu Build without Shimadzu support
# --without-thermo Build without Thermo support
# --without-waters Build without Waters support
#
# --without-binary-msdata Build with support for mass spec text formats only
# (mzML, mzXML, MGF, etc - no binary formats
# like mz5 or vendor-specifics )
#
# There are some aliases to build commonly used subsets of pwiz:
#
# msconvert (just the command-line executable, copied to <BUILD_DIR>/<TOOLSET_DIR>)
# executables (all the pwiz core tools, copied to <BUILD_DIR>/<TOOLSET_DIR>)
#
# If you just want to build a specific subset of pwiz, add a target to
# your command line. For example to build just the msdata file
# read/write stuff, add:
#
# pwiz/data/msdata
#
# Or to build a particular item of that subset, such as a test,
# you could add (note the double slashes!) :
#
# pwiz/data/msdata//MSDataFileTest
#
; # end of our own help text
}
import errors ;
.os = [ modules.peek : OS ] ; # NT, LINUX, MACOSX
.platform = [ modules.peek : OSPLAT ] ; # X86, X86_64, POWERPC
# set up explicit 32-bit or 64-bit builds
if "address-model=64" in [ modules.peek : ARGV ]
{
constant PROCESSOR_ARCHITECTURE : "AMD64" ;
constant PLATFORM : "x64" ;
if "address-model=32" in [ modules.peek : ARGV ] { errors.user-error "Pick either address-model=32 or address-model=64, not both." ; }
}
else if "address-model=32" in [ modules.peek : ARGV ]
{
constant PROCESSOR_ARCHITECTURE : "x86" ;
constant PLATFORM : "x86" ;
if "address-model=64" in [ modules.peek : ARGV ] { errors.user-error "Pick either address-model=32 or address-model=64, not both." ; }
}
else if [ modules.peek : NT ] # require address-model to be specified on Windows
{
errors.user-error "No address-model specified. Command-line must specify address-model=32 or address-model=64 (because B2 apparently changed the default MSVC address-model, breaking many pwiz assumptions)." ;
}
local default_libraries_path = "./libraries" ;
local libraries_path = [ MATCH --libraries-path=(.*) : [ modules.peek : ARGV ] ] ;
libraries_path ?= $(default_libraries_path) ; # set default path in absence of command-line path
local default_boost_src = "$(libraries_path)/boost_1_76_0" ;
local boost_src = [ MATCH --boost-src=(.*) : [ modules.peek : ARGV ] ] ;
boost_src ?= $(default_boost_src) ; # set default path in absence of command-line path
local default_zlib_src = "$(libraries_path)/zlib-1.2.3" ;
local zlib_src = [ MATCH --zlib-src=(.*) : [ modules.peek : ARGV ] ] ;
zlib_src ?= $(default_zlib_src) ; # set default path in absence of command-line path
# TODO: get version from boost/version.hpp
import regex ;
local boost_version_suffix = [ MATCH "boost_(._..(_.)?)" : $(boost_src:L) ] ;
if ! $(boost_version_suffix) { errors.user-error "Unable to determine version from external Boost source; expected x_xx[_xx] format." ; }
constant BOOST_VERSION : [ regex.split $(boost_version_suffix[1]) _ ] ;
import path ;
import feature ;
# declare a feature indicating vendor API support is desired (but not necessarily possible on the current platform)
if [ modules.peek : NT ] && --i-agree-to-the-vendor-licenses in [ modules.peek : ARGV ]
{
feature.feature vendor-api-support : on off : incidental propagated ; # on is the default
}
else
{
feature.feature vendor-api-support : off on : incidental propagated ; # off is the default
}
rule vendor-api-support ( properties * )
{
if [ modules.peek : NT ] && --i-agree-to-the-vendor-licenses in [ modules.peek : ARGV ]
{
return <vendor-api-support>on ;
}
else
{
return <vendor-api-support>off ;
}
}
if ( "--without-binary-msdata" in [ modules.peek : ARGV ] ) # support only text formats like mzML, mzXML, MGF etc
{
echo "NOTICE: building without support for binary msdata formats as requested" ;
}
else
{
if ( "--without-mz5" in [ modules.peek : ARGV ] )
{
echo "NOTICE: building without mz5 support as requested" ;
}
if ( "--without-mzmlb" in [ modules.peek : ARGV ] )
{
echo "NOTICE: building without mzMLb support as requested" ;
}
}
# do we want to skip mz5 support?
rule without-mz5 ( properties * )
{
if --without-mz5 in [ modules.peek : ARGV ]
{
return <location-prefix>without-mz5 <define>WITHOUT_MZ5 ;
}
else
{
return [ without-binary-msdata $(properties) ] ;
}
}
# do we want to skip mzMLb support?
rule without-mzmlb ( properties * )
{
if --without-mzmlb in [ modules.peek : ARGV ]
{
return <location-prefix>without-mzmlb <define>WITHOUT_MZMLB ;
}
else
{
return [ without-binary-msdata $(properties) ] ;
}
}
# do we want to skip all binary file formats (vendors and mz5)?
rule without-binary-msdata ( properties * )
{
if --without-binary-msdata in [ modules.peek : ARGV ]
{
return <location-prefix>without-binary-msdata <define>WITHOUT_MZ5 <define>WITHOUT_MZMLB <vendor-api-support>off ;
}
}
# do we want to skip all binary file formats (vendors and mz5)?
rule without-binary-msdata ( properties * )
{
if --without-binary-msdata in [ modules.peek : ARGV ]
{
return <location-prefix>without-binary-msdata <define>WITHOUT_MZ5 <vendor-api-support>off ;
}
}
local default_build_path = [ MATCH --build-path=(.*) : [ modules.peek : ARGV ] ] ;
if $(default_build_path)
{
path-constant PWIZ_BUILD_PATH : $(default_build_path) ;
}
else if [ modules.peek : NT ]
{
path-constant PWIZ_BUILD_PATH : build-nt-x86 ; # force x86 since .NET projects assume that location
}
else
{
path-constant PWIZ_BUILD_PATH : build-$(.os:L)-$(.platform:L) ;
}
path-constant PWIZ_ROOT_PATH : . ;
path-constant PWIZ_LIBRARIES_PATH : $(libraries_path) ;
import testing ; # needed to enable unit-test rule
import package ; # needed for package install
import path ; # needed for glob, exists, etc.
import project ; # needed for project.current
import errors ;
modules.poke : BOOST_BUILD_PATH : [ modules.peek : BOOST_BUILD_PATH ] $(PWIZ_LIBRARIES_PATH)/predef/check ;
import $(PWIZ_LIBRARIES_PATH)/predef/check/predef : require check : predef-require predef-check ;
if --teamcity-test-decoration in [ modules.peek : ARGV ]
{
if [ modules.peek : NT ]
{
TEST_PRECOMMAND = "set pp=##\necho %pp%teamcity[testStarted name='%name%']" ;
TEST_POSTCOMMAND =
"set pp=##\n"
"IF %status% NEQ 0"
"(echo %pp%teamcity[testFailed name='%name%' message='Exit status: %status%'] )\n" # TODO: does testFailed go to stderr? 1>&2
"echo %pp%teamcity[testFinished name='%name%']" ;
TEST_POSTCOMMAND = $(TEST_POSTCOMMAND:J=" ") ;
}
else
{
TEST_PRECOMMAND = "pp=##\necho $pp\"teamcity[testStarted name='$name']\"" ;
TEST_POSTCOMMAND =
"pp=##"
"if test $status -ne 0 ; then"
"echo $pp\"teamcity[testFailed name='$name' message='Exit status: $status']\" ;"
"fi"
"echo $pp\"teamcity[testFinished name='$name']\"" ;
TEST_POSTCOMMAND = $(TEST_POSTCOMMAND:J=\n) ;
}
# put raw commands in global module
modules.poke : TEST_PRECOMMAND : $(TEST_PRECOMMAND) ;
modules.poke : TEST_POSTCOMMAND : $(TEST_POSTCOMMAND) ;
TEAMCITY_TEST_DECORATION = <testing.arg>--teamcity-test-decoration ;
}
# return the itemname if textonly build is off (the default)
rule binary-readers-build ( itemname )
{
if ( ! [ without-binary-msdata ] )
{
return $(itemname) ; # do build binary readers
}
}
# return the itemname if mz5 build is on (the default)
rule mz5-build ( itemname )
{
if ( ! [ without-mz5 ] )
{
return $(itemname) ; # do build mz5
}
}
# return the itemname if mzmlb build is on (the default)
rule mzmlb-build ( itemname )
{
if ( ! [ without-mzmlb ] )
{
return $(itemname) ; # do build mzmlb
}
}
if ! [ modules.peek : NT ]
{
# make msbuild targets a no-op
rule msbuild ( name : sources * : requirements * : default-build * : usage-requirements * )
{
}
PREDEF_CHECKS =
# starting with gcc 4.8, gcc is extremely verbose about unused typedefs; heavily used in Boost concept checks
[ predef-check "BOOST_COMP_GNUC >= 4.8" : : <cxxflags>-Wno-unused-local-typedefs ]
# starting with gcc 4.9, gcc offers colored diagnostic messages, helpful when looking for an elusive "error" message in a sea of warning spam
[ predef-check "BOOST_COMP_GNUC >= 4.9" : : <cxxflags>-fdiagnostics-color=always ]
;
}
else
{
# SEH exceptions crossing native/managed boundaries are problematic with this set to off;
# also, catch(...) will catch SEH exceptions with this on
DEFAULT_ASYNCH_EXCEPTIONS = <asynch-exceptions>on ;
}
project pwiz
: requirements
<include>$(PWIZ_ROOT_PATH)
<include>$(PWIZ_LIBRARIES_PATH)/boost_aux
<include>$(boost_src)
<include>$(zlib_src)
<toolset>gcc,<link>shared:<runtime-link>shared
<toolset>darwin:<runtime-link>shared
# any module which links with .NET (either dynamically or statically) must use the shared runtime
<toolset>msvc:<runtime-link>shared
# avoid deprecation warnings
<define>BOOST_NO_AUTO_PTR
<define>BOOST_BIND_GLOBAL_PLACEHOLDERS
<define>BOOST_REGEX_MATCH_EXTRA # enable access to all captures
# special msvc hacks
<toolset>msvc:<define>WIN32 # windows
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE # don't deprecate the standard library
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE # don't deprecate the standard library
<toolset>msvc:<define>_USE_MATH_DEFINES # for M_PI in <cmath>
<toolset>msvc:<define>BOOST_ALL_NO_LIB # disable auto-link
<toolset>msvc:<cxxflags>/wd4100 # warning: unreferenced formal parameter
<toolset>msvc:<cxxflags>/wd4512 # warning: assignment operator could not be generated
<toolset>msvc:<cxxflags>/wd4127 # warning: conditional expression is constant (boost::lexical_cast)
<toolset>msvc:<cxxflags>/wd4701 # warning: potentially uninitialized local variable 'result' used (boost::lexical_cast, debug)
<toolset>msvc:<cxxflags>/wd4245 # warning: conversion from 'type1' to 'type2', signed/unsigned mismatch (boost/filesystem/convenience.hpp)
<toolset>msvc:<cxxflags>/wd4251 # warning: class needs to have dll-interface to be used by clients of class
<toolset>msvc:<cxxflags>/wd4267 # warning: conversion from 'type1' to 'type2', possible loss of data (boost::lexical_cast)
<toolset>msvc:<cxxflags>/wd4244 # warning: conversion from 'int' to 'unsigned short', possible loss of data (boost/date_time/microsec_time_clock.hpp)
<toolset>msvc:<cxxflags>/wd4275 # warning: non dll-interface class 'base' used as base for dll-interface class 'derived'
<toolset>msvc:<cxxflags>/wd4702 # warning: unreachable code (boost::lexical_cast)
<toolset>msvc:<cxxflags>/wd4714 # warning: marked as __forceinline not inlined (boost::spirit::karma::sequence)
<toolset>msvc:<cxxflags>/wd4456 # warning: declaration of 'type' hides previous local declaration
<toolset>msvc:<cxxflags>/wd4459 # warning: declaration of 'type' hides global declaration
<toolset>msvc:<cxxflags>/wd4458 # warning: declaration of 'type' hides class member
<toolset>msvc,<debug-symbols>off:<linkflags>"/OPT:REF,ICF"
<toolset>msvc,<toolset-msvc:version>12.0:<define>_HAS_TR1
<toolset>msvc,<toolset-msvc:version>14.0:<define>_HAS_TR1
<toolset>msvc,<toolset-msvc:version>14.1:<define>_HAS_TR1
<toolset>msvc,<toolset-msvc:version>14.2:<define>_HAS_TR1
<toolset>msvc,<toolset-msvc:version>14.3:<define>_HAS_TR1
# link-time optimization for release builds
#<variant>release:<lto>on
# target Windows 7 or later
<toolset>msvc:<define>_WIN32_WINNT=_WIN32_WINNT_WIN7
<toolset>msvc:<define>NTDDI_VERSION=NTDDI_WIN7
<conditional>@secure-scl-throws
# TODO: figure out a way to only apply this to 3rd party headers
#<toolset>gcc:<cxxflags>-Wno-uninitialized # warning: '__cur' might be used uninitialized in this function
<toolset>gcc:<define>_DEFAULT_SOURCE
<toolset>clang:<define>_DEFAULT_SOURCE
# msparser uses old libstd++ API, so with GCC 5+, the entire project has to use it as well
<toolset>gcc:<define>_GLIBCXX_USE_CXX11_ABI=0
# set standard to C++14
<toolset>gcc:<cxxflags>-std=c++14
<toolset>darwin:<cxxflags>-std=c++14
<toolset>clang:<cxxflags>-std=c++14
# prevent warning about _BSD_SOURCE deprecation
<toolset>gcc:<define>_DEFAULT_SOURCE
# disable "warning: suggest parentheses around '&&' within '||'"
<toolset>gcc:<cxxflags>-Wno-parentheses
<toolset>clang:<cxxflags>-Wno-parentheses
<toolset>darwin:<cxxflags>-Wno-parentheses
# avoid warnings like concept_check.hpp ... warning: unused typedef 'boost_concept_check'
<toolset>clang:<cxxflags>-Wno-unused-local-typedef
<toolset>darwin:<cxxflags>-Wno-unused-local-typedef
# avoid unused parameter warnings (especially annoying for stub functions)
<toolset>clang:<cxxflags>-Wunused-parameter
# avoid C++1x deprecation warnings
<toolset>gcc:<cxxflags>-Wno-deprecated-declarations
<toolset>clang:<cxxflags>-Wno-deprecated-declarations
# allow MSVC region pragmas
<toolset>gcc:<cxxflags>-Wno-unknown-pragmas
<toolset>clang:<cxxflags>-Wno-unknown-pragmas
<toolset>darwin:<cxxflags>-Wno-unknown-pragmas
$(PREDEF_CHECKS)
# special Cygwin gcc-3.4.4 hack
# linker "multiple definition" error on inclusion of boost-1.34.1 filesystem headers
<toolset>gcc-3.4.4:<linkflags>-Wl,--allow-multiple-definition
<toolset>gcc-mingw-3.4.5:<linkflags>-Wl,--allow-multiple-definition
<toolset-gcc:flavor>mingw:<linkflags>-Wl,--allow-multiple-definition
# allow "long long" even with -pedantic
<toolset>gcc:<cxxflags>-Wno-long-long
<toolset>darwin:<cxxflags>-Wno-long-long
# any GCC executable that uses shared libraries must have all its code built with -fPIC
<conditional>@static-with-fpic
# mz5 support?
<conditional>@without-mz5
# msdata text only?
<conditional>@without-binary-msdata
# don't call 'strip' -- causes 'Bus error' in some cases
# e.g. find_if with inline predicate
<toolset>darwin:<debug-symbols>on
# use of boost::thread requires multithreaded runtime
<threading>multi
# change boost debug assertions to exceptions by force including Exception.hpp
<variant>debug,<toolset>msvc:<cxxflags>/FIpwiz/utility/misc/Exception.hpp
<variant>debug,<toolset>gcc:<cxxflags>"-include pwiz/utility/misc/Exception.hpp"
<variant>debug,<toolset>darwin:<cxxflags>"-include pwiz/utility/misc/Exception.hpp"
<conditional>@msvc-runtime-dlls
$(TEAMCITY_TEST_DECORATION)
: build-dir $(PWIZ_BUILD_PATH)
: usage-requirements
<include>.
: default-build
release
<link>static
<runtime-link>static
#<warnings-as-errors>on
<warnings>all
<threading>multi
<response-file>file # auto-detection of max command-line length broken on Windows Server?
$(DEFAULT_ASYNCH_EXCEPTIONS)
;
# external library declarations
lib pthread
: # sources
: # requirements
<name>pthread
<link>shared
<toolset>gcc:<linkflags>-pthread # sometimes segfault without this -- dk
: # default-build
: # usage-requirements
<toolset>gcc:<linkflags>-pthread # sometimes segfault without this -- dk
;
lib fftw3 : : <threading>multi <search>$(PWIZ_LIBRARIES_PATH)/fftw-3.1.2/.libs : : <include>$(PWIZ_LIBRARIES_PATH)/fftw-3.1.2/api ;
lib fftw3 : : <threading>multi <toolset>msvc <name>libfftw3-3 <search>$(PWIZ_LIBRARIES_PATH) : : <include>$(PWIZ_LIBRARIES_PATH)/fftw-3.1.2/api ;
alias svm : $(PWIZ_LIBRARIES_PATH)/libsvm-3.0//svm ;
modules.poke : BOOST_BUILD_PATH : [ modules.peek : BOOST_BUILD_PATH ] $(PWIZ_LIBRARIES_PATH) ;
import numbers ;
rule is_leap_year ( year )
{
if [ CALC $(year) % 100 ] = 0
{
if [ CALC $(year) % 400 ] = 0 { return 1 ; }
else { return 0 ; }
}
else
{
if [ CALC $(year) % 4 ] = 0 { return 1 ; }
else { return 0 ; }
}
}
# given year, month, day return day of year
# Astronomical Algorithms, Jean Meeus, 2d ed, 1998, chap 7
rule day_of_year ( Y M D )
{
local K ;
if [ is_leap_year $(Y) ] = 1 { K = 1 ; }
else { K = 2 ; }
local a = [ CALC 275 * $(M) ] ;
local b = [ CALC $(M) + 9 ] ;
local c = [ CALC $(b) / 12 ] ;
local d = [ CALC $(K) * $(c) ] ;
local e = [ CALC $(a) / 9 ] ;
local f = [ CALC $(e) - $(d) ] ;
local g = [ CALC $(f) + $(D) ] ;
local N = [ CALC $(g) - 30 ] ;
if [ numbers.less $(N) 10 ]
{
N = "00" $(N) ;
return $(N:J=) ;
}
else if [ numbers.less $(N) 100 ]
{
N = "0" $(N) ;
return $(N:J=) ;
}
else
{
return $(N) ;
}
}
# YMMDD in UTC where Y is number of years since 2016, optionally suffixed with HH (hour)
rule MAKE_BUILD_TIMESTAMP ( )
{
local utc = [ modules.peek : JAMDATE ] ;
local ymd = [ MATCH "([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])" : $(utc) ] ;
local d = [ MATCH "[0-9][0-9]([0-9][0-9])" : $(ymd[0]) ] [ day_of_year $(ymd) ] ;
return $(d:J=) ;
}
local rev = [ MATCH "([a-f0-9]*)" : [ SHELL "git rev-parse --short HEAD" ] ] ;
local branch = [ MATCH "\\* ([^\r\n]*)" : [ SHELL "git branch" ] ] ;
local args = [ modules.peek : ARGV ] ;
constant PWIZ_MAJOR : 3 ;
constant PWIZ_MINOR : 0 ;
constant PWIZ_BUILD_TIMESTAMP : [ MAKE_BUILD_TIMESTAMP ] ;
constant PWIZ_GIT_REV : $(rev:E=0) ;
constant PWIZ_GIT_BRANCH : $(branch:E=master) ;
numeric-version-tag = $(PWIZ_MAJOR) $(PWIZ_MINOR) $(PWIZ_BUILD_TIMESTAMP) ;
version-tag = $(numeric-version-tag) $(PWIZ_GIT_REV) ;
constant PWIZ_NUMERIC_VERSION_TAG : $(numeric-version-tag:J=.) ;
constant PWIZ_VERSION_TAG : $(version-tag:J=.) ;
echo ProteoWizard $(version-tag:J=.) $(PWIZ_GIT_BRANCH) $(PLATFORM) $(PROCESSOR_ARCHITECTURE) $(.os) ;
import generate-version ;
generate-version.cpp $(PWIZ_ROOT_PATH)/pwiz/data/msdata/Version.cpp : pwiz msdata : $(PWIZ_MAJOR) : $(PWIZ_MINOR) : $(PWIZ_BUILD_TIMESTAMP) : $(PWIZ_GIT_REV) : $(PWIZ_GIT_BRANCH) ;
generate-version.cpp $(PWIZ_ROOT_PATH)/pwiz/analysis/Version.cpp : pwiz analysis : $(PWIZ_MAJOR) : $(PWIZ_MINOR) : $(PWIZ_BUILD_TIMESTAMP) : $(PWIZ_GIT_REV) : $(PWIZ_GIT_BRANCH) ;
generate-version.cpp $(PWIZ_ROOT_PATH)/pwiz/data/identdata/Version.cpp : pwiz identdata : $(PWIZ_MAJOR) : $(PWIZ_MINOR) : $(PWIZ_BUILD_TIMESTAMP) : $(PWIZ_GIT_REV) : $(PWIZ_GIT_BRANCH) ;
generate-version.cpp $(PWIZ_ROOT_PATH)/pwiz/data/tradata/Version.cpp : pwiz tradata : $(PWIZ_MAJOR) : $(PWIZ_MINOR) : $(PWIZ_BUILD_TIMESTAMP) : $(PWIZ_GIT_REV) : $(PWIZ_GIT_BRANCH) ;
generate-version.cpp $(PWIZ_ROOT_PATH)/pwiz/data/proteome/Version.cpp : pwiz proteome : $(PWIZ_MAJOR) : $(PWIZ_MINOR) : $(PWIZ_BUILD_TIMESTAMP) : $(PWIZ_GIT_REV) : $(PWIZ_GIT_BRANCH) ;
generate-version.cpp $(PWIZ_ROOT_PATH)/pwiz/Version.cpp : pwiz : $(PWIZ_MAJOR) : $(PWIZ_MINOR) : $(PWIZ_BUILD_TIMESTAMP) : $(PWIZ_GIT_REV) : $(PWIZ_GIT_BRANCH) ;
# create a VERSION file which can be used by TC to parse the canonical pwiz version
make VERSION : : @make_VERSION : <location>$(PWIZ_BUILD_PATH) ;
actions make_VERSION { @($(STDOUT):E=$(version-tag:]=.)) > "$(<)" }
#actions make_VERSION { @($(STDOUT):E=$(version-tag:]=.)) > "$(<)" ; @($(STDOUT):E=<version>$(version-tag:J=.)</version>) > "$(PWIZ_BUILD_PATH)/VERSION.xml" }
import tar ;
using tar ;
if ! [ without-mz5 ]
{
tar.extract $(PWIZ_LIBRARIES_PATH)/hdf5-1.8.7.tar.bz2 : *.c* *.h* *.jam *.settings : <location>$(PWIZ_LIBRARIES_PATH) ;
}
path-constant BOOST_SOURCE : $(boost_src) ;
path-constant ZLIB_SOURCE : $(zlib_src) ;
path-constant GD_SOURCE : $(PWIZ_LIBRARIES_PATH)/libgd-2.1.0alpha ;
path-constant PNG_SOURCE : $(PWIZ_LIBRARIES_PATH)/libpng-1.5.6 ;
path-constant FREETYPE_SOURCE : $(PWIZ_LIBRARIES_PATH)/freetype-2.4.7 ;
path-constant EXPAT_SOURCE : $(PWIZ_LIBRARIES_PATH)/expat-2.0.1 ;
using ext-boost : $(BOOST_VERSION:J=.) : $(BOOST_SOURCE) : <zlib-src-location>$(ZLIB_SOURCE) ;
if [ modules.peek : NT ]
{
import path ;
if ( ! --incremental in $(args) ) && ! [ without-binary-msdata ]
{
# extract the vendor APIs if the user agrees to the licenses
if --i-agree-to-the-vendor-licenses in $(args)
{
echo "Extracting vendor APIs..." ;
if ! --without-sciex in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility $(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility\\vendor_api_ABI.7z" ; }
if ! --without-agilent in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility $(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility\\vendor_api_Agilent.7z" ; }
if ! --without-bruker in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility $(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility\\vendor_api_Bruker.7z" ; }
if ! --without-mobilion in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility $(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility\\vendor_api_Mobilion.7z" ; }
if ! --without-shimadzu in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility $(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility\\vendor_api_Shimadzu.7z" ; }
if ! --without-thermo in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility $(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility\\vendor_api_Thermo.7z" ; }
#if ! --without-unifi in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility $(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility\\vendor_api_UNIFI.7z" ; }
if ! --without-waters in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility $(PWIZ_ROOT_PATH)\\pwiz_aux\\msrc\\utility\\vendor_api_Waters.7z" ; }
if ! --without-mascot in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)\\7za.exe x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_LIBRARIES_PATH) $(PWIZ_LIBRARIES_PATH)\\msparser_2_8_1_x86_win64.7z" ; }
RESCAN ;
}
else
{
echo "NOTICE: not extracting vendor APIs; use --i-agree-to-the-vendor-licenses to extract and use them." ;
}
}
# overwrite the original header files because of MSVC looking in the current header's path with #include "foo"
# HACK: fix program_options implicit_value eating adjacent positional tokens
# Reapplying commit: https://github.com/boostorg/program_options/commit/88dea3c6fdea8c9ea894911897b1770599c383e4 (which was later reverted but was the proper behavior IMO)
SHELL "@IF NOT EXIST $(BOOST_SOURCE)\\boost\\program_options\\value_semantic.hpp.bak rename $(BOOST_SOURCE)\\boost\\program_options\\value_semantic.hpp value_semantic.hpp.bak" ;
SHELL "@IF NOT EXIST $(BOOST_SOURCE)\\libs\\program_options\\src\\cmdline.cpp.bak rename $(BOOST_SOURCE)\\libs\\program_options\\src\\cmdline.cpp cmdline.cpp.bak" ;
SHELL "@copy /Y $(PWIZ_LIBRARIES_PATH)\\boost_aux\\boost\\program_options\\value_semantic.hpp $(BOOST_SOURCE)\\boost\\program_options" ;
SHELL "@copy /Y $(PWIZ_LIBRARIES_PATH)\\boost_aux\\libs\\program_options\\src\\cmdline.cpp $(BOOST_SOURCE)\\libs\\program_options\\src" ;
}
else
{
import path ;
if ( ! --incremental in $(args) ) && ! [ without-binary-msdata ]
{
# extract the vendor APIs if the user agrees to the licenses
if --i-agree-to-the-vendor-licenses in $(args)
{
echo "Extracting vendor APIs..." ;
if ! --without-mascot in $(args) { SHELL "$(PWIZ_LIBRARIES_PATH)/7zz x -aoa -pi-agree-to-the-vendor-licenses -o$(PWIZ_LIBRARIES_PATH) $(PWIZ_LIBRARIES_PATH)/msparser_2_8_1_x86_linux64.7z" ; }
RESCAN ;
}
else
{
echo "NOTICE: not extracting vendor APIs; use --i-agree-to-the-vendor-licenses to extract and use them." ;
}
}
}
rule project-exists ( project-path )
{
if [ path.exists $(project-path) ] &&
[ path.glob $(project-path) : "[Jj]amroot.jam" "[Jj]amfile.jam" "[Jj]amroot" "[Jj]amfile" ]
{
return true ;
}
else
{
return ;
}
}
# simplify calling rules/variables from other projects/modules
rule get-project-expression ( project-path : expression args * : * )
{
if [ project-exists $(project-path) ]
{
import project ;
import modules ;
# support that full set of parameters that can be used (19).
# Example in Boost Build source file src/kernel/modules.jam, with rule call-locally
# Must load the project before we can 'call-in' to it, because projects are loaded differently than modules
return [ modules.call-in [ project.load $(project-path) ] : $(expression) $(args) : $(2) : $(3) :
$(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13)
$(14) : $(15) : $(16) : $(17) : $(18) : $(19) ] ;
}
else
{
return ;
}
}
# to make subsetting the source tree much easier,
# use these rules to test that a sub-project path exists before building it
rule build-project-if-exists ( project-path )
{
local project = [ project.current ] ;
local p = [ path.native [ path.join [ $(project).location ] $(project-path) ] ] ;
if [ project-exists $(p) ]
{
local attributes = [ project.attributes [ $(project).name ] ] ;
local now = [ $(attributes).get projects-to-build ] ;
$(attributes).set projects-to-build : $(now) $(project-path) ;
}
}
rule run-if-exists ( sources + : args * : input-files * : requirements * : target-name ? : default-build * )
{
local project = [ project.current ] ;
local full-path = [ path.native [ path.join [ $(project).location ] $(project-path) $(sources[1]) ] ] ;
if [ path.exists $(full-path) ]
{
return [ run $(sources) : $(args) : $(input-files) : $(requirements) : $(target-name) : $(default-build) ] ;
}
}
rule run-fail-if-exists ( sources + : args * : input-files * : requirements * : target-name ? : default-build * )
{
local project = [ project.current ] ;
local full-path = [ path.native [ path.join [ $(project).location ] $(project-path) $(sources[1]) ] ] ;
if [ path.exists $(full-path) ]
{
return [ run-fail $(sources) : $(args) : $(input-files) : $(requirements) : $(target-name) : $(default-build) ] ;
}
}
rule unit-test-if-exists ( target : sources + : properties * )
{
local project = [ project.current ] ;
local full-path = [ path.native [ path.join [ $(project).location ] $(project-path) $(sources[1]) ] ] ;
if [ path.exists $(full-path) ]
{
return [ unit-test $(target) : $(sources) : $(properties) ] ;
}
}
rule doctest ( name : sources + : requirements * )
{
unit-test-if-exists $(name) : $(sources) : $(requirements) <define>PWIZ_DOCTEST <location-prefix>doctest ;
}
# build/install
build-project-if-exists pwiz ;
build-project-if-exists pwiz_aux ;
build-project-if-exists pwiz_tools ;
rule install-location ( properties * )
{
local toolsets = [ feature.get-values <toolset> : $(properties) ] ;
local variants = [ feature.get-values <variant> : $(properties) ] ;
local location = [ path.make $(PWIZ_BUILD_PATH)/$(toolsets[1])-$(variants[1]) ] ;
if <link>shared in $(properties) { location = $(location)-shared ; }
if <address-model>64 in $(properties) { location = $(location)-x86_64 ; }
return <location>$(location) ;
}
rule install-type ( properties * )
{
local result = <install-type>EXE ;
if <link>shared in $(properties)
{
result += <install-dependencies>on <install-type>SHARED_LIB <install-type>MANIFEST ;
}
return $(result) ;
}
import string ;
rule install-vendor-api-dependencies-to-locations ( locations + : properties * )
{
local dependencies ;
if <toolset>msvc in $(properties) && <link>static in $(properties) && ! [ without-binary-msdata ]
{
for loc in $(locations)
{
local location = <location>$(loc) ;
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI//install_pwiz_vendor_api_abi_dlls/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI//install_pwiz_vendor_api_abi_sqlite/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI/T2D ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI/T2D//install_pwiz_vendor_api_abi_t2d/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Agilent ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Agilent//install_pwiz_vendor_api_agilent/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Bruker ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Bruker//install_pwiz_vendor_api_bruker/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Mobilion ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Mobilion//install_pwiz_vendor_api_mbi/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Shimadzu ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Shimadzu//install_pwiz_vendor_api_shimadzu/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/thermo ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/thermo//install_pwiz_vendor_api_thermo/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/UIMF ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/UIMF//install_pwiz_vendor_api_uimf/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/UNIFI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/UNIFI//install_pwiz_vendor_api_unifi/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Waters ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Waters//install_pwiz_vendor_api_waters/$(location) ; }
if <vendor-api-support>on in $(properties) { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_tools/prototype//ThermoRawMetaDumpInstall/$(location) ; }
}
}
return $(dependencies) ;
}
rule install-vendor-api-dependencies ( properties * )
{
properties = $(properties) [ vendor-api-support $(properties) ] ;
local location = [ feature.get-values <location> : $(properties) ] ;
if $(location) { location = [ string.join <location> [ path.make $(location[1]) ] ] ; }
location ?= [ install-location $(properties) ] ;
return [ install-vendor-api-dependencies-to-locations $(location) : $(properties) ] ;
}
rule install-identdata-dependencies ( properties * )
{
local location = [ feature.get-values <location> : $(properties) ] ;
if $(location) { location = [ string.join <location> [ path.make $(location[1]) ] ] ; }
location ?= [ install-location $(properties) ] ;
local dependencies ;
if [ path.exists pwiz/data/identdata ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz/data/identdata//install_pwiz_identdata/$(location) ; }
return $(dependencies) ;
}
rule pwiz-bindings-dependency ( properties * )
{
if <toolset>msvc in $(properties)
{
local variants = [ feature.get-values <variant> : $(properties) ] ;
local location = <location>$(PWIZ_BUILD_PATH)/obj/$(PLATFORM)/$(variants[1]) ;
return <assembly>$(PWIZ_ROOT_PATH)/pwiz/utility/bindings/CLI//pwiz_bindings_cli
<dependency>$(PWIZ_ROOT_PATH)/pwiz/utility/bindings/CLI//pwiz_bindings_cli/$(location)
<dependency>$(PWIZ_ROOT_PATH)/pwiz/utility/bindings/CLI//pwiz_bindings_cli.xml/$(location) ;
}
}
rule dotNET-dependencies ( properties * )
{
if [ msvc-has-current-dotnet $(properties) ]
{
local location = [ install-location $(properties) ] ;
return <dependency>$(PWIZ_ROOT_PATH)/pwiz_tools/MSConvertGUI//MSConvertGUI.exe/$(location)
<dependency>$(PWIZ_ROOT_PATH)/pwiz_tools/SeeMS//seems/$(location) ;
}
}
rule gcc-install-dll-path ( properties * )
{
if <toolset>gcc in $(properties) && <link>shared in $(properties) && <target-os>linux in $(properties)
{
return <dll-path>'$ORIGIN' ;
}
}
install executables
: pwiz_tools/commandline
pwiz_tools/sld//sldout
pwiz_tools/examples//example_tools
: <conditional>@install-type
<conditional>@install-location
<conditional>@install-identdata-dependencies
<conditional>@install-vendor-api-dependencies
<conditional>@dotNET-dependencies
<conditional>@gcc-install-dll-path
<toolset>msvc:<dependency>install-msvc-runtime-dlls
<dependency>VERSION
;
install gui_tools
: pwiz_tools/commandline//msconvert
: <conditional>@install-type
<conditional>@install-location
<conditional>@install-identdata-dependencies
<conditional>@install-vendor-api-dependencies
<conditional>@dotNET-dependencies
<conditional>@gcc-install-dll-path
<toolset>msvc:<dependency>install-msvc-runtime-dlls
<dependency>VERSION
;
install package_docs
: doc/package/readme.txt
: <conditional>@install-location
;
# convenient test targets
install msconvert
: pwiz_tools/commandline//msconvert
: <conditional>@install-type
<conditional>@install-location
<conditional>@install-identdata-dependencies
<conditional>@install-vendor-api-dependencies
<conditional>@gcc-install-dll-path
<toolset>msvc:<dependency>install-msvc-runtime-dlls
;
explicit msconvert ;
install msbenchmark
: pwiz_tools/examples//msbenchmark
: <conditional>@install-type
<conditional>@install-location
<conditional>@install-vendor-api-dependencies
<conditional>@gcc-install-dll-path
<toolset>msvc:<dependency>install-msvc-runtime-dlls
;
explicit msbenchmark ;
install idconvert
: pwiz_tools/commandline//idconvert
: <conditional>@install-type
<conditional>@install-location
<conditional>@install-identdata-dependencies
<conditional>@install-vendor-api-dependencies
<conditional>@gcc-install-dll-path
<toolset>msvc:<dependency>install-msvc-runtime-dlls
;
explicit idconvert ;
alias all-tests : pwiz pwiz_tools pwiz_aux ;
if ! --without-compassxtract in [ modules.peek : ARGV ]
{
.installer-vendor-files-location = $(PWIZ_BUILD_PATH)/$(PLATFORM) ;
}
else
{
.installer-vendor-files-location = $(PWIZ_BUILD_PATH)/without-cxt/$(PLATFORM) ;
}
rule make_INSTALLER_VENDOR_FILES ( targets * : sources * : properties * )
{
# enumerate .NET assemblies and their native DLL dependencies
local assemblies = [ feature.get-values <assembly> : $(properties) ] ;
assemblies += [ feature.get-values <assembly-dependency> : $(properties) ] ;
if $(assemblies)
{
for local assembly in $(assemblies)
{
local assembly-path = [ path.basename [ $(assembly).name ] ] ;
if ! $(assembly-path:L) in $(.unique-vendor-files:L)
{
.unique-vendor-files += $(assembly-path) ;
}
}
}
# TODO: figure out a better way to specify subdirectories for assembly-dependencies
local assemblies-ex = [ feature.get-values <assembly-dependency-ex> : $(properties) ] ;
if $(assemblies-ex)
{
for local assembly in $(assemblies-ex)
{
local assembly-parts = [ SPLIT_BY_CHARACTERS $(assembly) : "|" ] ;
local assembly-path = [ path.basename $(assembly-parts[1]) ] ;
if ( $(assembly-parts[2]) )
{
local features = [ feature.split $(assembly-parts[2]) ] ;
assembly-path = [ path.join [ feature.get-values <location-prefix> : $(features) ] $(assembly-path) ] ;
}
if ! $(assembly-path:L) in $(.unique-vendor-files:L)
{
.unique-vendor-files += $(assembly-path) ;
}
}
}
local rule case-insensitive-compare ( a b ) { if $(a:L) < $(b:L) { return true ; } }
local sorted-vendor-files = [ sequence.insertion-sort $(.unique-vendor-files) : case-insensitive-compare ] ;
local .nl = [ common.newline-char ] ;
TARGETS on $(<) = $(sorted-vendor-files:J=$(.nl)) ;
}
actions make_INSTALLER_VENDOR_FILES bind TARGETS
{
@($(STDOUT):E=$(TARGETS)
) > "$(<)"
}
make INSTALLER_VENDOR_FILES.txt : msconvert : @make_INSTALLER_VENDOR_FILES : <location>$(.installer-vendor-files-location) ;
explicit INSTALLER_VENDOR_FILES.txt ;
# for copying all libraries and headers to one dir each
alias libraries : install-pwiz-lib install-boost-headers ;
explicit libraries ;
# default install location
local default-prefix = /usr/local ; # LINUX, MACOS
if [ modules.peek : NT ] { default-prefix = "C:\\" ; }
# set the default option value to be used when building the lib tarball
option.set prefix : $(default-prefix) ;
local headers = [ path.glob-tree pwiz : *.h *.hpp : .svn ] ;
package.install install-pwiz-lib
: <install-source-root>$(PWIZ_ROOT_PATH)
: # executables
: pwiz
: $(headers)
;
explicit install-pwiz-lib ;
# move boost headers separately because install-source-root is different
local boost_headers = [ path.glob-tree $(BOOST_SOURCE)/boost : *.h *.hpp : .svn ] ;
package.install install-boost-headers
: <install-source-root>$(BOOST_SOURCE)
: # exe
: # lib
: $(boost_headers)