~ubuntu-branches/ubuntu/trusty/argyll/trusty-proposed

« back to all changes in this revision

Viewing changes to Jambase

  • Committer: Package Import Robot
  • Author(s): Artur Rona
  • Date: 2014-02-12 00:35:39 UTC
  • mfrom: (13.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20140212003539-24tautzlitsiz61w
Tags: 1.5.1-5ubuntu1
* Merge from Debian unstable. (LP: #1275572) Remaining changes:
  - debian/control:
    + Build-depend on libtiff-dev rather than libtiff4-dev.
  - debian/control, debian/patches/06_fix_udev_rule.patch:
    + Fix udev rules to actually work; ENV{ACL_MANAGE} has
      stopped working ages ago, and with logind it's now the
      "uaccess" tag. Dropping also consolekit from Recommends.
  - debian/patches/drop-usb-db.patch:
    + Use hwdb builtin, instead of the obsolete usb-db
      in the udev rules.
* debian/patches/05_ftbfs-underlinkage.diff:
  - Dropped change, no needed anymore.
* Refresh the patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
# FileNoClean dest : source ;                   copy file, but don't delete dest during clean
63
63
# FakeFile dest : source ;                              Fudge to say dest is created with source
64
64
# Fortran obj.o : source.f ;                    .f -> .o
65
 
# GenFile source.c : program args ;             make custom file
66
 
# GenFileND source.c : program args : extra_dependecies ;
 
65
# GenFile target : program args ;               make custom file
 
66
# GenFileND target : program args : extra_dependecies ;
67
67
#                                                                               make custom file, program dependent & args not
68
 
# GenFileNND source.c : program args : extra_dependecies ;
 
68
# GenFileNND target : program args : extra_dependecies ;
69
69
#                                       make custom file, program & args not dependent
70
70
# CatToFile dest : strings ;                    save the arguments to the file
71
71
# GuiBin image ;                                                Mark executable as GUI applications
94
94
#                                                                               create executable from objects
95
95
# MainVariant image : sources : flags : defines : hdrpaths : objects : libs : shlibs ;
96
96
#                                                                               create exe from compiled sources with separate named objs
 
97
# MainLinkFlags mains : flags ;                 add linker flags for object
97
98
# MkDir dir ;                                                   make a directory, if not there
98
99
# Mod target : mode ;                                   sets mode of file
99
100
# NDepends dest : source ;                              make Normalized dependency
 
101
# NNoUpdate targ ;                                              create Normalized target if needed but never update it 
100
102
# NIncludes dest : source ;                             make Normalized co-dependency
101
 
# Object object : sources : flags : defines : hdrpaths  compile object from source
 
103
# Object object : sources : flags : defines : hdrpaths ;        compile object from source
102
104
# ObjectCcFlags objects : flags ;               add compiler flags for object
 
105
# ObjectPrefCcFlags objects : flags ;   add preference compiler flags for object (overridable)
103
106
# ObjectC++Flags objects : flags ;              add compiler flags for object
 
107
# ObjectPrefC++Flags objects : flags ;  add preference compiler flags for object (overridable)
104
108
# ObjectDefines objects : defines ;             add defines for object
105
109
# ObjectHdrs objects : dirs ;                   add include directories for object
106
110
# ObjectKeep objects ;                                  mark objects to be kept after library build
300
304
 
301
305
# NOTE: Cross compiling support :-
302
306
#       To fix this to support cross compilation, the setup needs to be
303
 
#       modularised into 3, making them all rules that can be re-involked:
 
307
#       modularised into 3 parts, making them all rules that can be re-involked:
304
308
#       1) OS/Platform setup. System tools like copy, delete etc.
305
309
#       2) Compiler setup. Basic compiler syntax etc.
306
310
#       3) Target setup. Make this a rule, and allow switching
420
424
                        ECHO "Compiler is MingW for 64 bit target" ;
421
425
                        TARGET64     = true ;
422
426
                        TPFX         = x86_64-w64-mingw32- ;
 
427
                        MINGW64_LIB32 = $(MINGW)/mingw/lib32 ;
423
428
                } else {
424
429
                        ECHO "Compiler is MingW for 32 bit target" ;
425
430
                }
465
470
                }
466
471
 
467
472
                CCDEBUGFLAG             ?= -g ;                         # default (TABS? DWARF2 ?) format
468
 
                CCPROFFLAG              ?= -p ;
469
 
                LINKDEBUGFLAG   ?= ;
470
 
                LINKPROFFLAG    ?= -p ; 
 
473
                CCPROFFLAG              ?= -pg ;
 
474
                LINKDEBUGFLAG   ?= -g ;
 
475
                LINKPROFFLAG    ?= -pg ; 
471
476
                LINKOPTFLAG             ?= -s -O ;                      # Affects creating .so's ??
472
477
                LINKSTRIPFLAG   ?= -s ; 
473
478
 
901
906
        if $(OS) = MACOSX {
902
907
                CCFLAGS                 += -Wno-sign-compare ;          # supress new gcc4 warnings ?
903
908
                CCFLAGS                 += -fpascal-strings ;           # for compatibility with the OSX API
904
 
                LINKFLAGS               += -framework Carbon ;          # A good default
 
909
                LINKFLAGS               += -framework Carbon ;          # default for .c
 
910
                LINKFLAGS       += -framework Cocoa ;           # default for .m
905
911
        }
906
912
 
907
913
        # Make things work on 64 bit Linux
1960
1966
                P_SHLINKLIBS = [ NormPaths $(SHLINKLIBS) ] $(P_SHLINKLIBS) ;
1961
1967
                P_SHLINKSHLIBS = [ NormPaths $(SHLINKSHLIBS) ] $(P_SHLINKSHLIBS) ;
1962
1968
 
1963
 
                P_PREF_ASFLAGS = $(PREF_ASFLAGS) ;
1964
 
                P_PREF_CCFLAGS = $(PREF_CCFLAGS) ;
1965
 
                P_PREF_C++FLAGS = $(PREF_C++FLAGS) ;
1966
 
                P_PREF_LINKFLAGS = $(PREF_LINKFLAGS) ;
1967
 
                P_PREF_SHLINKFLAGS = $(PREF_SHLINKFLAGS) ;
1968
 
 
 
1969
                # Set parent flags no existing parent flags
 
1970
                if ! $(P_PREF_ASFLAGS) {
 
1971
                        P_PREF_ASFLAGS = $(PREF_ASFLAGS) ; }
 
1972
                if ! $(P_PREF_CCFLAGS) {
 
1973
                        P_PREF_CCFLAGS = $(PREF_CCFLAGS) ; }
 
1974
                if ! $(P_PREF_C++FLAGS) {
 
1975
                        P_PREF_C++FLAGS = $(PREF_C++FLAGS) ; }
 
1976
                if ! $(P_PREF_LINKFLAGS) {
 
1977
                        P_PREF_LINKFLAGS = $(PREF_LINKFLAGS) ; }
 
1978
                if ! $(P_PREF_SHLINKFLAGS) {
 
1979
                        P_PREF_SHLINKFLAGS = $(PREF_SHLINKFLAGS) ; }
1969
1980
        }
1970
 
 
1971
1981
        
1972
1982
        # Set default for new Jamfile extra and preferred flags
1973
1983
        ASFLAGS = ;
2078
2088
rule As_
2079
2089
{
2080
2090
        local pref_asflags = $(P_PREF_ASFLAGS) ;
2081
 
        pref_asflags = $(PREF_ASFLAGS) ;
 
2091
        pref_asflags ?= $(PREF_ASFLAGS) ;
2082
2092
        ASFLAGS1 on $(<) = $(P_ASFLAGS) $(ASFLAGS) ;
2083
2093
        ASFLAGS2 on $(<) = $(pref_asflags) ;
2084
2094
        ASFLAGS on $(<) = [ geton $(<) : ASFLAGS1 ] [ geton $(<) : ASFLAGS2 ] ;
2166
2176
 
2167
2177
        local pref_ccflags = $(P_PREF_CCFLAGS) ;
2168
2178
        pref_ccflags ?= $(PREF_CCFLAGS) ;
2169
 
        CCFLAGS1 on $(<) = $(P_CCFLAGS) $(CCFLAGS) ;
2170
 
        CCFLAGS2 on $(<) = $(pref_ccflags) ;
 
2179
        # Make sure we incorporate any CCFLAGS[12] on object into total
 
2180
        CCFLAGS1 on $(<) += $(P_CCFLAGS) $(CCFLAGS) ;
 
2181
        CCFLAGS2 on $(<) += $(pref_ccflags) ;
2171
2182
        CCFLAGS on $(<) = [ geton $(<) : CCFLAGS1 ] [ geton $(<) : CCFLAGS2 ] ;
2172
2183
 
2173
2184
#Echo "Cc object '" $(<) "' got CCFLAGS1 '" [ geton $(<) : CCFLAGS1 ] "' and CCFLAGS2 '" [ geton $(<) : CCFLAGS2 ] "' for total CCFLAGS '" [ geton $(<) : CCFLAGS ] "'" ;
2231
2242
        }
2232
2243
 
2233
2244
        local pref_c++flags = $(P_PREF_C++FLAGS) ;
2234
 
        pref_c++flags = $(PREF_C++FLAGS) ;
2235
 
        C++FLAGS1 on $(<) = $(P_C++FLAGS) $(C++FLAGS) ;
2236
 
        C++FLAGS2 on $(<) = $(pref_c++flags) ;
 
2245
        pref_c++flags ?= $(PREF_C++FLAGS) ;
 
2246
        # Make sure we incorporate any C++FLAGS[12] on object into total
 
2247
        C++FLAGS1 on $(<) += $(P_C++FLAGS) $(C++FLAGS) ;
 
2248
        C++FLAGS2 on $(<) += $(pref_c++flags) ;
2237
2249
        C++FLAGS on $(<) = [ geton $(<) : C++FLAGS1 ] [ geton $(<) : C++FLAGS2 ] ;
2238
2250
 
2239
2251
        # Make sure the CCHDRS and CCDEFS are formatter correctly
2285
2297
        Depends $(_t) : $(_s) ;
2286
2298
}
2287
2299
 
 
2300
# Public use NoUpdate that does normalisation of its targets
 
2301
# (non-normalizing NoUpdate is a built in)
 
2302
# NNoUpdate dest ;                      Make sure created, but don't update
 
2303
rule NNoUpdate {
 
2304
        local _t ;
 
2305
        local _p = ;
 
2306
 
 
2307
#Echo "NNoUpdate got '" $(<) "'" ;
 
2308
 
 
2309
        # Don't anchor psuedo targets
 
2310
        switch $(<)
 
2311
        {
 
2312
       case all : _p = true ;
 
2313
       case first : _p = true ;
 
2314
       case shell : _p = true ;
 
2315
       case files : _p = true ;
 
2316
       case lib : _p = true ;
 
2317
       case exe : _p = true ;
 
2318
       case obj : _p = true ;
 
2319
       case dirs : _p = true ;
 
2320
       case clean : _p = true ;
 
2321
       case install : _p = true ;
 
2322
       case uninstall : _p = true ;
 
2323
        }
 
2324
 
 
2325
        # Normalize target names and set Grist LOCATE and SOURCE
 
2326
        if ! $(_p) {
 
2327
                _t = [ NormDstTargets $(<) ] ;
 
2328
        } else {
 
2329
                _t = $(<) ;
 
2330
        }
 
2331
        _s = [ NormSrcTargets $(>) ] ;
 
2332
 
 
2333
#Echo "Passing NoUpdate '" $(_t) "'" ;
 
2334
 
 
2335
        NoUpdate $(_t) ;
 
2336
}
 
2337
 
2288
2338
# Public use Includes that does normalisation of its targets
2289
2339
# (non-normalizing Includes is a built in)
2290
2340
# NDepends dest : source ;                      make dependency
2459
2509
        MakeLocate $(<) ;
2460
2510
}
2461
2511
 
 
2512
# GenFileNND target : program args : extra_dependecies ;
2462
2513
# None of > is assumed to be a file.
2463
2514
# $(3) are optional extra dependecies
2464
2515
# SRCDIR and DSTDIR are ignored.
2468
2519
        # Normalize target names and set Grist LOCATE and SOURCE
2469
2520
        local _t = [ NormIDstTargets $(<) ] ;
2470
2521
        local _a = $(>) ;
2471
 
        _a = $(_a:J=" ") ;
 
2522
        _a = $(_a:J=" ") ;              # Split up by space delimeter ?
2472
2523
        local _d = [ NormSrcTargets $(3) ] ;
2473
2524
 
2474
2525
#Echo "GenFileNND normed '$(_t)' plus '$(_a)' and src targets '$(_d)'" ;
3006
3057
        if $(SHLINKFLAGS) || $(P_SHLINKFLAGS)
3007
3058
         || $(PREF_SHLINKFLAGS) || $(P_PREF_SHLINKFLAGS) {
3008
3059
                local pref_shlinkflags = $(P_PREF_SHLINKFLAGS) ;
3009
 
                pref_shlinkflags = $(PREF_SHLINKFLAGS) ;
 
3060
                pref_shlinkflags ?= $(PREF_SHLINKFLAGS) ;
3010
3061
                SHLINKFLAGS on $(_sl) += $(P_SHLINKFLAGS) $(SHLINKFLAGS) $(pref_shlinkflags) ;
3011
3062
        }
3012
3063
 
3111
3162
        SHLINKSHLIBS on $(_t) += $(_l) ;
3112
3163
}
3113
3164
 
 
3165
# Add extra LINKFLAGS to mains
 
3166
# MainLinkFlags mains : flags ;
 
3167
rule MainLinkFlags
 
3168
{
 
3169
#Echo "MainLinkFlags got '" $(<) "' and '" $(>) "'" ;
 
3170
        local _t = [ NormDstTargets $(<:S=$(SUFEXE)) ] ;
 
3171
        local _i ;
 
3172
 
 
3173
        for _i in $(_t) {
 
3174
                LINKFLAGS on $(_i) += $(>) ;
 
3175
#Echo "exes '" $(_i) "' got LINKFLAGS '" [ geton $(_i) : LINKFLAGS ] "'" ;
 
3176
        }
 
3177
}
 
3178
 
3114
3179
# Make an executable from sources
3115
3180
# Main image : sources : flags : defines : hdrpaths : objects : libs : shlibs ; 
3116
3181
rule Main
3175
3240
        if $(LINKFLAGS) || $(P_LINKFLAGS)
3176
3241
         || $(PREF_LINKFLAGS) || $(P_PREF_LINKFLAGS) {
3177
3242
                local pref_linkflags = $(P_PREF_LINKFLAGS) ;
3178
 
                pref_linkflags = $(PREF_LINKFLAGS) ;
 
3243
                pref_linkflags ?= $(PREF_LINKFLAGS) ;
3179
3244
                LINKFLAGS on $(_t) += $(P_LINKFLAGS) $(LINKFLAGS) $(pref_linkflags) ;
 
3245
#Echo "LINKFLAGS on $(_t) = '" [ geton $(_t) : LINKFLAGS ] "'" ; 
3180
3246
        }
3181
3247
 
3182
3248
#Echo "MainFromObjects LINKOBJS = '" $(LINKOBJS) "' and P_LINKOBJS ='" $(P_LINKOBJS) "'" ;
3439
3505
                case .cpp : C++_ $(_t) : $(_s) ;
3440
3506
                case .cxx : C++_ $(_t) : $(_s) ;
3441
3507
 
 
3508
                case .m :       Cc_ $(_t) : $(_s) ;
 
3509
 
3442
3510
                case .f :       Fortran_ $(_t) : $(_s) ;
3443
3511
 
3444
3512
                case .l :       {
3511
3579
                for _i in $(_t) {
3512
3580
                        CCFLAGS2 on $(_i) += $(>) ;
3513
3581
                        CCFLAGS on $(_i) = [ geton $(_i) : CCFLAGS1 ] [ geton $(_i) : CCFLAGS2 ] ;
 
3582
#Echo "object '" $(_i) "' got CCFLAGS1 '" [ geton $(_i) : CCFLAGS1 ] "' and CCFLAGS2 '" [ geton $(_i) : CCFLAGS2 ] "' for total CCFLAGS '" [ geton $(_i) : CCFLAGS ] "'" ;
3514
3583
                }
3515
3584
        }
3516
3585
}
4017
4086
        $(MV) lex.yy.c $(<)
4018
4087
}
4019
4088
 
 
4089
#       Old: $(LINK) $(LINKFLAGS) $(LINKOUTFLAG)$(<) $(UNDEFS) $(>) $(LINKOBJS) $(LINKLIBS) $(LINKSHLIBS) $(STDLIBS) 
 
4090
#       $(LINK) $(LINKOUTFLAG)$(<) $(UNDEFS) $(>) $(LINKFLAGS) $(LINKOBJS) $(LINKLIBS) $(LINKSHLIBS) $(STDLIBS) 
4020
4091
actions Link_ bind LINKOBJS LINKLIBS LINKSHLIBS
4021
4092
{
4022
 
        $(LINK) $(LINKOUTFLAG)$(<) $(UNDEFS) $(>) $(LINKOBJS) $(LINKFLAGS) $(LINKLIBS) $(LINKSHLIBS) $(STDLIBS) 
 
4093
        $(LINK) $(LINKOUTFLAG)$(<) $(UNDEFS) $(>) $(LINKOBJS) $(LINKLIBS) $(LINKSHLIBS) $(LINKFLAGS) $(STDLIBS)  
4023
4094
}
4024
4095
 
4025
4096
if $(OS) = MACOSX {             # OS X version of ld
4029
4100
        # -Wl,-install_name,@executable_path ???
4030
4101
        actions ShLink_ 
4031
4102
        {
4032
 
                $(LINK) -dynamiclib -Wl,-undefined,dynamic_lookup,-install_name,$(SHLINKSEARCHEXEPATH)$(<[1]:BS) $(SHLINKFLAGS) $(LINKOUTFLAG)$(<[1]) $(>) $(SHLINKOBJS) $(SHLINKLIBS) $(SHLINKSHLIBS) $(SHSTDLIBS)
 
4103
                $(LINK) -dynamiclib -Wl,-undefined,dynamic_lookup,-install_name,$(SHLINKSEARCHEXEPATH)$(<[1]:BS) $(LINKOUTFLAG)$(<[1]) $(>) $(SHLINKOBJS) $(SHLINKLIBS) $(SHLINKSHLIBS) $(SHLINKFLAGS) $(SHSTDLIBS)
4033
4104
        }
4034
4105
 
4035
4106
} else {        # General gcc
4039
4110
        # or set LD_LIBRARY_PATH
4040
4111
        # or set /etc/ld.so.conf.d/*.conf
4041
4112
        # To set .so search path (after flag):  -Wl,-soname=$(<[1]:BS)
 
4113
# Old:  $(LINK) -shared -Wl,-soname=$(SHLINKSEARCHEXEPATH)$(<[1]:BS) $(SHLINKFLAGS) $(LINKOUTFLAG)$(<[1]) $(>) $(SHLINKOBJS) $(SHLINKLIBS) $(SHLINKSHLIBS) $(SHSTDLIBS)
4042
4114
        actions ShLink_ 
4043
4115
        {
4044
 
                $(LINK) -shared -Wl,-soname=$(SHLINKSEARCHEXEPATH)$(<[1]:BS) $(SHLINKFLAGS) $(LINKOUTFLAG)$(<[1]) $(>) $(SHLINKOBJS) $(SHLINKLIBS) $(SHLINKSHLIBS) $(SHSTDLIBS)
 
4116
                $(LINK) -shared -Wl,-soname=$(SHLINKSEARCHEXEPATH)$(<[1]:BS) $(LINKOUTFLAG)$(<[1]) $(>) $(SHLINKOBJS) $(SHLINKLIBS) $(SHLINKSHLIBS) $(SHLINKFLAGS) $(SHSTDLIBS)
4045
4117
        }
4046
4118
}
4047
4119
 
4155
4227
                # but this no longer works in OS X 10.5, and we don't need this
4156
4228
                # stuff with TransformProcessType()
4157
4229
                # Another alternative is to use link option "-sectcreate __TEXT __info_plist Info.plist" ???
 
4230
                # to embed the plist in the executable, but not sure what should be in plist.
4158
4231
                # Pure GUI app
4159
4232
                actions GUIAPP
4160
4233
                {
4233
4306
                for %%i in ( $(>) ) do COPY %%i $(<:BS)_ 1>nul
4234
4307
                if exist $(<) set _$(<:B)_=$(<)
4235
4308
                $(AR) /out:$(<) %_$(<:B)_% $(<:BS)_\*
4236
 
                RMDIR /S/Q $(<:BS)_
4237
 
 
 
4309
                DEL /F/S/Q $(<:BS)_\* 1>nul
 
4310
                RMDIR /Q $(<:BS)_
4238
4311
        }
4239
4312
 
4240
4313
        actions together ArchiveArchive