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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
|
#! /usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# version number of the defaults package
VDEF := $(strip $(shell dpkg-parsechangelog | awk -F: '/^Version:/ {print $$NF}'))
SOURCE := $(strip $(shell dpkg-parsechangelog | awk -F: '/^Source:/ {print $$NF}'))
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
VMAJOR := $(shell echo $(VDEF) | awk -F. '{print $$1}')
VMINOR := $(shell echo $(VDEF) | awk -F. '{print $$2}' | sed -e 's/\([0-9]*\).*/\1/')
REL_EXT := $(shell echo $(VDEF) | sed -e 's/^$(VMAJOR)\.$(VMINOR)//')
SPACE := $(EMPTY) $(EMPTY)
# gcc-defaults 0.8 is the first version for 2.95.4.
#REL_NO_295 := $(shell expr $(VMINOR) + 15)$(REL_EXT)
# gcc-defaults 0.6 is the first version with 2.96 support.
#REL_NO_296 := $(shell expr $(VMINOR) + 17)$(REL_EXT)
# gcc-defaults 0.17 is the first version with 3.0.4 support.
#REL_NO_30 := $(shell expr $(VMINOR) + 6)$(REL_EXT)
# gcc-defaults 1.0 is the first version with 3.1 support.
#REL_NO_31 := $(shell expr $(VMINOR) + 1)$(REL_EXT)
# gcc-defaults 1.2 is the first version with 3.2 support.
#REL_NO_32 := $(shell expr $(VMINOR) - 1)$(REL_EXT)
# gcc-defaults 1.3 is the first version with 3.2.2 support.
#REL_NO_322 := $(shell expr $(VMINOR) - 3)$(REL_EXT)
# gcc-defaults 1.4 is the first version with 3.2.3 support.
#REL_NO_323 := $(shell expr $(VMINOR) - 4)$(REL_EXT)
# gcc-defaults 1.5 is the first version with 3.3 support.
#REL_NO_33 := $(shell expr $(VMINOR) - 5)$(REL_EXT)
# gcc-defaults 1.7 is the first version with 3.3.1 support.
#REL_NO_331 := $(shell expr $(VMINOR) - 7)$(REL_EXT)
# gcc-defaults 1.10 is the first version with 3.3.2 support.
#REL_NO_332 := $(shell expr $(VMINOR) - 9)$(REL_EXT)
# gcc-defaults 1.13 is the first version with 3.3.3 support.
#REL_NO_333 := $(shell expr $(VMINOR) - 12)$(REL_EXT)
# gcc-defaults 1.16 is the first version with 3.3.4 support.
#REL_NO_334 := $(shell expr $(VMINOR) - 15)$(REL_EXT)
# gcc-defaults 1.19 is the first version with 3.3.5 support.
#REL_NO_335 := $(shell expr $(VMINOR) - 18)$(REL_EXT)
# gcc-defaults 1.22 is the first version with 3.3.6 support.
#REL_NO_336 := $(shell expr $(VMINOR) - 21)$(REL_EXT)
# gcc-defaults 1.22 is the first version with 3.4.3 support.
#REL_NO_343 := $(shell expr $(VMINOR) - 21)$(REL_EXT)
# gcc-defaults 1.23 is the first version with 3.4.4 support.
#REL_NO_344 := $(shell expr $(VMINOR) - 23)$(REL_EXT)
# gcc-defaults 1.30 is the first version with 3.4.5 support.
#REL_NO_345 := $(shell expr $(VMINOR) - 29)$(REL_EXT)
# gcc-defaults 1.32 is the first version with 3.4.5 support.
#REL_NO_346 := $(shell expr $(VMINOR) - 31)$(REL_EXT)
# gcc-defaults 1.23 is the first version with 4.0.0 support.
#REL_NO_400 := $(shell expr $(VMINOR) - 22)$(REL_EXT)
# gcc-defaults 1.26 is the first version with 4.0.1 support.
#REL_NO_401 := $(shell expr $(VMINOR) - 25)$(REL_EXT)
# gcc-defaults 1.29 is the first version with 4.0.2 support.
#REL_NO_402 := $(shell expr $(VMINOR) - 28)$(REL_EXT)
# gcc-defaults 1.32 is the first version with 4.0.3 support.
#REL_NO_403 := $(shell expr $(VMINOR) - 31)$(REL_EXT)
# gcc-defaults 1.33 is the first version with 4.1.0 support.
#REL_NO_410 := $(shell expr $(VMINOR) - 33)$(REL_EXT)
# gcc-defaults 1.36 is the first version with 4.1.1 support.
#REL_NO_411 := $(shell expr $(VMINOR) - 35)$(REL_EXT)
# gcc-defaults 1.51 is the first version with 4.1.2 support.
#REL_NO_412 := $(shell expr $(VMINOR) - 50)$(REL_EXT)
# gcc-defaults 1.54 is the first version with 4.2.0 support.
#REL_NO_420 := $(shell expr $(VMINOR) - 54)$(REL_EXT)
# gcc-defaults 1.56 is the first version with 4.2.1 support.
#REL_NO_421 := $(shell expr $(VMINOR) - 55)$(REL_EXT)
# gcc-defaults 1.62 is the first version with 4.2.2 support.
#REL_NO_422 := $(shell expr $(VMINOR) - 61)$(REL_EXT)
# gcc-defaults 1.63 is the first version with 4.2.3 support.
#REL_NO_423 := $(shell expr $(VMINOR) - 62)$(REL_EXT)
# gcc-defaults 1.73 is the first version with 4.2.4 support.
#REL_NO_424 := $(shell expr $(VMINOR) - 72)$(REL_EXT)
# gcc-defaults 1.63 is the first version with 4.3 support.
#REL_NO_43 := $(shell expr $(VMINOR) - 62)$(REL_EXT)
# gcc-defaults 1.66 is the first version with 4.3 support.
#REL_NO_430 := $(shell expr $(VMINOR) - 65)$(REL_EXT)
# gcc-defaults 1.74 is the first version with 4.3.1 support.
#REL_NO_431 := $(shell expr $(VMINOR) - 73)$(REL_EXT)
# gcc-defaults 1.76 is the first version with 4.3.2 support.
#REL_NO_432 := $(shell expr $(VMINOR) - 75)$(REL_EXT)
# gcc-defaults 1.79 is the first version with 4.3.3 support.
#REL_NO_433 := $(shell expr $(VMINOR) - 78)$(REL_EXT)
# gcc-defaults 1.88 is the first version with 4.3.4 support.
#REL_NO_434 := $(shell expr $(VMINOR) - 87)$(REL_EXT)
# gcc-defaults 1.94 is the first version with 4.3.5 support.
#REL_NO_435 := $(shell expr $(VMINOR) - 93)$(REL_EXT)
# gcc-defaults 1.81 is the first version with 4.4.0 support.
#REL_NO_440 := $(shell expr $(VMINOR) - 80)$(REL_EXT)
# gcc-defaults 1.88 is the first version with 4.4.1 support.
#REL_NO_441 := $(shell expr $(VMINOR) - 87)$(REL_EXT)
# gcc-defaults 1.90 is the first version with 4.4.2 support.
#REL_NO_442 := $(shell expr $(VMINOR) - 89)$(REL_EXT)
# gcc-defaults 1.93 is the first version with 4.4.3 support.
#REL_NO_443 := $(shell expr $(VMINOR) - 92)$(REL_EXT)
# gcc-defaults 1.94 is the first version with 4.4.4 support.
#REL_NO_444 := $(shell expr $(VMINOR) - 93)$(REL_EXT)
# gcc-defaults 1.96 is the first version with 4.4.5 support.
#REL_NO_445 := $(shell expr $(VMINOR) - 95)$(REL_EXT)
# gcc-defaults 1.106 is the first version with 4.4.6 support.
#REL_NO_446 := $(shell expr $(VMINOR) - 105)$(REL_EXT)
# gcc-defaults 1.98 is the first version with 4.5.2 support.
#REL_NO_452 := $(shell expr $(VMINOR) - 97)$(REL_EXT)
# gcc-defaults 1.103 is the first version with 4.5.3 support.
#REL_NO_453 := $(shell expr $(VMINOR) - 102)$(REL_EXT)
# gcc-defaults 1.100 is the first version with 4.6.0 support.
#REL_NO_460 := $(shell expr $(VMINOR) - 99)$(REL_EXT)
# gcc-defaults 1.106 is the first version with 4.6.1 support.
#REL_NO_461 := $(shell expr $(VMINOR) - 105)$(REL_EXT)
# gcc-defaults 1.109 is the first version with 4.6.2 support.
#REL_NO_462 := $(shell expr $(VMINOR) - 108)$(REL_EXT)
# gcc-defaults 1.113 is the first version with 4.6.3 support.
#REL_NO_463 := $(shell expr $(VMINOR) - 112)$(REL_EXT)
# gcc-defaults 1.121 is the first version with 4.6.4 support.
#REL_NO_464 := $(shell expr $(VMINOR) - 120)$(REL_EXT)
# gcc-defaults 1.113 is the first version with 4.7.0 support.
#REL_NO_470 := $(shell expr $(VMINOR) - 112)$(REL_EXT)
# gcc-defaults 1.119 is the first version with 4.7.1 support.
#REL_NO_471 := $(shell expr $(VMINOR) - 118)$(REL_EXT)
# gcc-defaults 1.120 is the first version with 4.7.2 support.
#REL_NO_472 := $(shell expr $(VMINOR) - 119)$(REL_EXT)
# gcc-defaults 1.121 is the first version with 4.7.3 support.
#REL_NO_473 := $(shell expr $(VMINOR) - 120)$(REL_EXT)
REL_NO_481 := $(shell expr $(VMINOR) - 120)$(REL_EXT)
REL_NO_482 := $(shell expr $(VMINOR) - 123)$(REL_EXT)
REL_NO_483 := $(shell expr $(VMINOR) - 127)$(REL_EXT)
REL_NO_484 := $(shell expr $(VMINOR) - 135)$(REL_EXT)
REL_NO_490 := $(shell expr $(VMINOR) - 125)$(REL_EXT)
REL_NO_491 := $(shell expr $(VMINOR) - 129)$(REL_EXT)
REL_NO_492 := $(shell expr $(VMINOR) - 134)$(REL_EXT)
REL_NO_493 := $(shell expr $(VMINOR) - 141)$(REL_EXT)
REL_NO_50 := $(shell expr $(VMINOR) - 138)$(REL_EXT)
REL_NO_52 := $(shell expr $(VMINOR) - 141)$(REL_EXT)
REL_NO_53 := $(shell expr $(VMINOR) - 149)$(REL_EXT)
REL_NO_54 := $(shell expr $(VMINOR) - 163)$(REL_EXT)
REL_NO_60 := $(shell expr $(VMINOR) - 159)$(REL_EXT)
REL_NO_61 := $(shell expr $(VMINOR) - 162)$(REL_EXT)
REL_NO_62 := $(shell expr $(VMINOR) - 163)$(REL_EXT)
REL_NO_63 := $(shell expr $(VMINOR) - 164)$(REL_EXT)
REL_NO_64 := $(shell expr $(VMINOR) - 170)$(REL_EXT)
REL_NO_70 := $(shell expr $(VMINOR) - 167)$(REL_EXT)
REL_NO_71 := $(shell expr $(VMINOR) - 169)$(REL_EXT)
REL_NO_71 := $(shell expr $(VMINOR) - 170)$(REL_EXT)
REL_NO_72 := $(shell expr $(VMINOR) - 172)$(REL_EXT)
REL_NO_73 := $(shell expr $(VMINOR) - 173)$(REL_EXT)
REL_NO_80 := $(shell expr $(VMINOR) - 175)$(REL_EXT)
REL_NO_81 := $(shell expr $(VMINOR) - 177)$(REL_EXT)
REL_NO_82 := $(shell expr $(VMINOR) - 178)$(REL_EXT)
REL_NO_83 := $(shell expr $(VMINOR) - 182)$(REL_EXT)
REL_NO_90 := $(shell expr $(VMINOR) - 181)$(REL_EXT)
REL_NO_91 := $(shell expr $(VMINOR) - 182)$(REL_EXT)
REL_NO_921 := $(shell expr $(VMINOR) - 182)$(REL_EXT)
# minimum required gcc-X.Y versions
REQV_295 := (>= 1:2.95.4-16)
REQV_296 :=
REQV_30 := (>= 1:3.0.4-12)
REQV_32 := (>= 1:3.2.3-1)
REQV_33 := (>= 1:3.3.6-1)
REQV_34 := (>= 3.4.6-1)
REQV_40 := (>= 4.0.3-1)
REQV_41 := (>= 4.1.2-1)
REQV_42 := (>= 4.2.4-1)
REQV_43 := (>= 4.3.5-1)
REQV_44 := (>= 4.4.7-1~)
REQV_45 := (>= 4.5.3-1)
REQV_46 := (>= 4.6.4-1~)
REQV_46_GDC := $(REQV_46)
REQV_47 := (>= 4.7.3-1~)
REQV_48 := (>= 4.8.4-1~)
REQV_49 := (>= 4.9.3-10~)
REQV_5 := (>= 5.4.1-2~)
REQV_6 := (>= 6.4.0-1~)
REQV_7 := (>= 7.3.0-11~)
REQV_8 := (>= 8.3.0-6~)
REQV_9 := (>= 9.2.1-1~)
# architecture dependent variables
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
ifneq (,$(filter $(DEB_HOST_ARCH), i386 kfreebsd-i386 hurd-i386))
DEB_HOST_GNU_TYPE := $(subst i586,i686,$(DEB_HOST_GNU_TYPE))
i586_symlinks = yes
endif
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
all_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el riscv64 s390 s390x sh4 sparc sparc64 x32 hurd-i386 kfreebsd-amd64 kfreebsd-i386
gcc8_archs = powerpcspe
gcc9_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k mipsel mips64 mips64el or1k powerpc ppc64 ppc64el riscv64 s390 s390x sh4 sparc sparc64 x32 hurd-i386 kfreebsd-amd64 kfreebsd-i386
gnat_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 hurd-i386 kfreebsd-amd64 kfreebsd-i386
gnat8_archs =
# CV_XXX is the complete version number, including the release, without epoch
CV_CPP := 9.2.1-$(REL_NO_921)
CV_GCC := 9.2.1-$(REL_NO_921)
CV_GPP := 9.2.1-$(REL_NO_921)
CV_GOBJC := 9.2.1-$(REL_NO_921)
CV_GOBJCXX := 9.2.1-$(REL_NO_921)
CV_GFORT := 9.2.1-$(REL_NO_921)
CV_GGO := 9.2.1-$(REL_NO_921)
CV_GNAT := 9.2.1-$(REL_NO_921)
CV_GDC := 9.2.1-$(REL_NO_921)
CV_GM2 := 9.2.1-$(REL_NO_921)
CV_BRIG := 9.2.1-$(REL_NO_921)
CV_OFFL := 9.2.1-$(REL_NO_921)
$(foreach a, $(all_archs), \
$(foreach v, CV_CPP CV_GCC CV_GPP CV_GOBJC CV_GOBJCXX CV_GFORT CV_GGO CV_GNAT CV_GDC CV_GM2 CV_BRIG CV_OFFL, \
$(eval $(v)_$(a) = $(call $(v)))))
ifneq (,$(filter $(DEB_HOST_ARCH), $(gcc8_archs)))
CV_CPP := 8.3.0-$(REL_NO_83)
CV_GCC := 8.3.0-$(REL_NO_83)
CV_GPP := 8.3.0-$(REL_NO_83)
CV_GOBJC := 8.3.0-$(REL_NO_83)
CV_GOBJCXX := 8.3.0-$(REL_NO_83)
CV_GFORT := 8.3.0-$(REL_NO_83)
CV_GGO := 8.3.0-$(REL_NO_83)
CV_GDC := 8.3.0-$(REL_NO_83)
CV_GM2 := 8.3.0-$(REL_NO_83)
CV_BRIG := 8.3.0-$(REL_NO_83)
CV_OFFL := 8.3.0-$(REL_NO_83)
$(foreach a, $(gcc8_archs), \
$(foreach v, CV_CPP CV_GCC CV_GPP CV_GOBJC CV_GOBJCXX CV_GFORT CV_GGO CV_GDC CV_GM2 CV_BRIG CV_OFFL, \
$(eval $(v)_$(a) = $(call $(v)))))
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(gnat8_archs)))
CV_GNAT := 8.3.0-$(REL_NO_83)
$(foreach a, $(gnat5_archs), \
$(foreach v, CV_GNAT, \
$(eval $(v)_$(a) = $(call $(v)))))
endif
REQV_CPP = $(REQV_9)
REQV_GCC = $(REQV_9)
REQV_GPP = $(REQV_9)
REQV_GOBJC = $(REQV_9)
REQV_GOBJCXX = $(REQV_9)
REQV_GFORT = $(REQV_9)
REQV_GGO = $(REQV_9)
REQV_GNAT = $(REQV_9)
REQV_GDC = $(REQV_9)
REQV_GM2 = $(REQV_9)
REQV_BRIG = $(REQV_9)
REQV_OFFL = $(REQV_9)
$(foreach a, $(all_archs), \
$(foreach v, REQV_CPP REQV_GCC REQV_GPP REQV_GOBJC REQV_GOBJCXX REQV_GFORT REQV_GGO REQV_GNAT REQV_GDC REQV_GM2 REQV_BRIG REQV_OFFL, \
$(eval $(v)_$(a) = $(call $(v)))))
ifneq (,$(filter $(DEB_HOST_ARCH),$(gcc8_archs)))
REQV_CPP = $(REQV_8)
REQV_GCC = $(REQV_8)
REQV_GPP = $(REQV_8)
REQV_GOBJC = $(REQV_8)
REQV_GOBJCXX = $(REQV_8)
REQV_GFORT = $(REQV_8)
REQV_GGO = $(REQV_8)
REQV_GNAT = $(REQV_8)
REQV_GDC = $(REQV_8)
REQV_GM2 = $(REQV_8)
REQV_BRIG = $(REQV_8)
REQV_OFFL = $(REQV_8)
$(foreach a, $(gcc8_archs), \
$(foreach v, REQV_CPP REQV_GCC REQV_GPP REQV_GOBJC REQV_GOBJCXX REQV_GFORT REQV_GGO REQV_GDC REQV_GM2 REQV_BRIG REQV_OFFL, \
$(eval $(v)_$(a) = $(call $(v)))))
endif
ifneq (,$(filter $(DEB_HOST_ARCH),$(gnat8_archs)))
REQV_GNAT = $(REQV_8)
$(foreach a, $(gnat8_archs), \
$(foreach v, REQV_GNAT, \
$(eval $(v)_$(a) = $(call $(v)))))
endif
EPOCH=4
OS_NAME := Linux
distribution := $(shell lsb_release -is)
distrelease := $(shell lsb_release -cs)
vendor := $(shell if dpkg-vendor --derives-from Ubuntu; then echo Ubuntu; else echo Debian; fi)
lib32 = /usr/lib32
multilib_archs = $(sort \
amd64 i386 kfreebsd-amd64 mips64 mips64el mipsel \
powerpc ppc64 s390 s390x sparc sparc64 x32 \
illumos-amd64 \
$(if $(filter $(vendor), Ubuntu), armel armhf))
go_archs = alpha amd64 arm64 armel armhf i386 ia64 \
mips64 mipsel mips64el mipsn32 mipsn32el \
illumos-amd64 \
mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el \
powerpc powerpcspe ppc64 ppc64el riscv64 s390 s390x sparc sparc64 x32
go_multilib_archs = $(filter $(go_archs), $(filter-out armel armhf, $(multilib_archs)))
d_multilib_archs = $(filter-out armel, $(multilib_archs))
ada_archs = alpha amd64 arm64 armel armhf hppa i386 ia64 m68k \
mips64 mipsel mips64el mipsn32 mipsn32el \
mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el \
powerpc ppc64 ppc64el riscv64 s390 s390x sh4 sparc sparc64 \
kfreebsd-amd64 kfreebsd-i386 hurd-i386
nvptx_archs = amd64
brig_archs = amd64 i386 x32
hppa64_archs = amd64 hppa i386 x32
phobos_archs = amd64 armel armhf arm64 i386 x32 kfreebsd-amd64 kfreebsd-i386 \
hppa riscv64 s390x \
mips64 mipsel mips64el mipsn32 mipsn32el \
mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el
m2_archs = alpha amd64 arm64 armel armhf i386 ia64 \
mips64 mipsel mips64el mipsn32 mipsn32el \
illumos-amd64 \
mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el \
ppc64el riscv64 s390 s390x sparc64
HOST_ARCHS_alpha = amd64 i386 x32
HOST_ARCHS_amd64 = arm64 i386 ppc64el x32
HOST_ARCHS_armhf = amd64 i386 x32 arm64 ppc64el
HOST_ARCHS_armel = amd64 i386 x32 arm64 ppc64el
HOST_ARCHS_arm64 = amd64 i386 x32 ppc64el
HOST_ARCHS_hppa = amd64 i386 x32
HOST_ARCHS_i386 = amd64 arm64 ppc64el x32
HOST_ARCHS_m68k = amd64 i386 x32
HOST_ARCHS_mipsel = amd64 i386 x32 mips64el
HOST_ARCHS_mips64 = amd64 i386 x32 mips64el
HOST_ARCHS_mips64el = amd64 i386 x32 mips64el
HOST_ARCHS_mipsr6 = amd64 i386 x32 mips64el
HOST_ARCHS_mipsr6el = amd64 i386 x32 mips64el
HOST_ARCHS_mips64r6 = amd64 i386 x32 mips64el
HOST_ARCHS_mips64r6el = amd64 i386 x32 mips64el
HOST_ARCHS_powerpc = amd64 i386 x32 ppc64el
HOST_ARCHS_powerpcspe = amd64 i386 x32
HOST_ARCHS_ppc64 = amd64 i386 x32 ppc64el
HOST_ARCHS_ppc64el = amd64 i386 x32 ppc64 arm64
HOST_ARCHS_riscv64 = amd64 i386 x32 arm64 ppc64el
HOST_ARCHS_s390x = amd64 i386 x32 arm64 ppc64el
HOST_ARCHS_sh4 = amd64 i386 x32
HOST_ARCHS_sparc64 = amd64 i386 x32
HOST_ARCHS_x32 = amd64 arm64 i386 ppc64el
ifeq (,$(CROSS_ARCHS))
ifeq ($(SOURCE),gcc-defaults)
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32))
CROSS_ARCHS = s390x ppc64el arm64 armhf armel \
$(if $(filter $(vendor), Ubuntu), powerpc) \
$(if $(filter $(DEB_HOST_ARCH), i386 x32), amd64) \
$(if $(filter $(DEB_HOST_ARCH), amd64 x32), i386)
else ifeq ($(DEB_HOST_ARCH),arm64)
CROSS_ARCHS = amd64 armel armhf i386 ppc64el s390x
else ifeq ($(DEB_HOST_ARCH),ppc64)
CROSS_ARCHS = ppc64el
else ifeq ($(DEB_HOST_ARCH),ppc64el)
CROSS_ARCHS = amd64 i386 $(if $(filter $(vendor), Ubuntu), powerpc) \
armel armhf arm64 s390x
else
CROSS_ARCHS =
endif
else ifeq ($(SOURCE),gcc-defaults-mipsen)
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32 arm64 ppc64el mips64el))
CROSS_ARCHS ?= mipsel mips64el mips64 \
mipsr6 mipsr6el mips64r6 mips64r6el # mipsn32 mipsn32el mipsn32r6 mipsn32r6el
else
CROSS_ARCHS =
endif
else # -ports package
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32))
CROSS_ARCHS ?= alpha hppa m68k ppc64 riscv64 sh4 sparc64 \
$(if $(filter $(vendor), Ubuntu),, powerpc) \
$(if $(filter $(DEB_HOST_ARCH), amd64 i386), x32)
else ifeq ($(DEB_HOST_ARCH),arm64)
CROSS_ARCHS = x32 riscv64
else ifeq ($(DEB_HOST_ARCH),ppc64el)
CROSS_ARCHS = x32 riscv64 $(if $(filter $(vendor), Ubuntu),, powerpc)
else
CROSS_ARCHS =
endif
endif
endif
ifeq ($(SOURCE),gcc-defaults)
with_native = yes
endif
ifneq (,$(CROSS_ARCHS))
with_cross = yes
endif
CROSS_ARCH = $(subst .,,$(suffix $@))
_gnu_type = $(shell dpkg-architecture -a$(1) -qDEB_HOST_GNU_TYPE -f)
CROSS_GNU_TYPE = $(call _gnu_type,${CROSS_ARCH})
CROSS_PKG_GNU_TYPE = $(subst _,-,$(call _gnu_type,${CROSS_ARCH}))
all_packages :=
ifeq ($(with_native),yes)
# FIXME: not all packages ...
all_packages := cpp gcc g++ gfortran gobjc gobjc++ gdc gccgo libgphobos-dev
ifneq (,$(filter $(DEB_HOST_ARCH), $(hppa64_archs)))
all_packages += gcc-hppa64-linux-gnu
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(nvptx_archs)))
all_packages += gcc-offload-nvptx
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(brig_archs)))
all_packages += gccbrig
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(m2_archs)))
all_packages += gm2
endif
endif
no_packages :=
# TODO:
# - setup packages, no_packages macro
# is this a multiarch-enabled build?
ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick))
with_multiarch_lib := yes
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(multilib_archs)))
with_multilib = yes
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(go_multilib_archs)))
with_go_multilib = yes
endif
with_gfdl_docs := no
ifeq ($(distribution),Ubuntu)
with_gfdl_docs := yes
endif
ifeq ($(DEB_HOST_ARCH_OS),illumos)
with_gfdl_docs := yes
endif
ifeq ($(with_native),yes)
ifeq (,$(filter $(DEB_HOST_ARCH),$(go_archs)))
no_packages += gccgo
endif
gdc_no_archs = s390
ifneq (,$(filter $(DEB_HOST_ARCH),$(gdc_no_archs)))
no_packages += gdc
endif
ifeq (,$(filter $(DEB_HOST_ARCH),$(phobos_archs)))
no_packages += libgphobos-dev
endif
ifeq (,$(filter $(DEB_HOST_ARCH),$(m2_archs)))
no_packages += gm2
endif
ifeq (,$(filter $(DEB_HOST_ARCH),$(hppa64_archs)))
no_packages += gcc-hppa64-linux-gnu
endif
ifeq (,$(filter $(DEB_HOST_ARCH),$(ada_archs)))
no_packages += gnat gnat-sjlj
endif
ifneq ($(with_gfdl_docs),yes)
no_packages := $(sort $(no_packages) cpp-doc gcc-doc gfortran-doc)
endif
endif
ifeq ($(DEB_HOST_ARCH),hurd-i386)
OS_NAME := Hurd
endif
ifneq (,$(filter $(DEB_HOST_ARCH),kfreebsd-i386 kfreebsd-amd64))
OS_NAME := kFreeBSD
endif
ifeq ($(DEB_HOST_ARCH),netbsd-i386)
OS_NAME := NetBSD
endif
# packages which are in the control file, but never built ...
invalid_packages = \
gccgo-hppa-linux-gnu \
gccgo-m68k-linux-gnu \
gccgo-sh4-linux-gnu \
gccgo-multilib-arm-linux-gnueabi \
gccgo-multilib-arm-linux-gnueabihf \
gdc-multilib-arm-linux-gnueabi \
gm2-powerpc-linux-gnu \
gm2-powerpc64-linux-gnu \
gm2-sh4-linux-gnu \
gm2-x86-64-linux-gnux32 \
ifeq ($(with_cross),yes)
cross_packages := $(filter-out $(invalid_packages) gcc-hppa64-linux-gnu, \
$(shell dh_listpackages -a | egrep -- '-gnu|-kfreebsd'))
all_packages := $(all_packages) $(cross_packages)
endif
packages := $(filter-out $(no_packages), $(all_packages))
# derived version number (without release, e.g. 4.9.3, 5.2.1)
$(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GNAT V_GDC V_GM2 V_BRIG V_OFFL, \
$(eval $(v) = $(patsubst %-$(lastword $(subst -, ,$(call C$(v)))),%,$(call C$(v)))) \
)
$(foreach a, $(all_archs), \
$(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GNAT V_GDC V_GM2 V_BRIG V_OFFL, \
$(eval $(v)_$(a) = $(patsubst %-$(lastword $(subst -, ,$(call C$(v)_$(a)))),%,$(call C$(v)_$(a)))) \
))
# number for the package name (e.g. 4.9, 5, 6)
$(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GNAT V_GDC V_GM2 V_BRIG V_OFFL, \
$(eval P$(v) = $(firstword $(subst -, ,$(subst ., ,$(call $(v)))))) \
)
$(foreach a, $(all_archs), \
$(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GNAT V_GDC V_GM2 V_BRIG V_OFFL, \
$(eval P$(v)_$(a) = $(firstword $(subst -, ,$(subst ., ,$(call $(v)_$(a)))))) \
))
ifneq (,$(filter $(DEB_HOST_ARCH), $(gcc49_archs)))
$(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GDC V_GM2 V_BRIG V_OFFL, \
$(eval P$(v) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)))))) \
)
$(foreach a, $(gcc49_archs), \
$(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GDC V_GM2 V_BRIG V_OFFL, \
$(eval P$(v)_$(a) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)_$(a)))))) \
))
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(gnat49_archs)))
$(foreach v, V_GNAT, \
$(eval P$(v) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)))))) \
)
$(foreach a, $(gnat49_archs), \
$(foreach v, V_GNAT, \
$(eval P$(v)_$(a) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)_$(a)))))) \
))
endif
MOD_VER := $(shell apt-cache show gfortran-$(PV_GFORT) \
| sed -n '/^Provides/s/.*\(gfortran-mod-[0-9]*\).*/\1/p' \
| head -1)
README:
m4 -DPACKAGES="$(packages)" \
-DOS_NAME=$(OS_NAME) \
-DDEB_ARCH=$(DEB_HOST_ARCH) \
-DV_CPP=$(V_CPP) -DPV_CPP=$(PV_CPP) \
-DV_GCC=$(V_GCC) -DPV_GCC=$(PV_GCC) \
-DV_GPP=$(V_GPP) -DPV_GPP=$(PV_GPP) \
-DV_GOBJC=$(V_GOBJC) -DPV_GOBJC=$(PV_GOBJC) \
-DV_GOBJCXX=$(V_GOBJCXX) -DPV_GOBJCXX=$(PV_GOBJCXX) \
-DV_GFORT=$(V_GFORT) -DPV_GFORT=$(PV_GFORT) \
-DV_GGO=$(V_GGO) -DPV_GGO=$(PV_GGO) \
-DV_GNAT=$(V_GNAT) -DPV_GNAT=$(PV_GNAT) \
-DV_GDC=$(V_GDC) -DPV_GDC=$(PV_GDC) \
-DV_GM2=$(V_GM2) -DPV_GM2=$(PV_GM2) \
-DV_BRIG=$(V_BRIG) -DPV_BRIG=$(PV_BRIG) \
-DV_OFFL=$(V_OFFL) -DPV_OFFL=$(PV_OFFL) \
$(if $(filter yes,$(with_gfdl_docs)), -DGFDL) \
debian/README.Debian.m4 > debian/README.Debian.tmp2
uniq debian/README.Debian.tmp2 > debian/README.Debian.tmp
rm -f debian/README.Debian.tmp2
[ -e debian/README.Debian ] \
&& cmp -s debian/README.Debian debian/README.Debian.tmp \
&& rm -f debian/README.Debian.tmp && exit 0; \
mv debian/README.Debian.tmp debian/README.Debian
substvars: substvars-native $(foreach a,$(CROSS_ARCHS),substvars.$(a))
substvars-native:
( \
echo 'version:cpp=$(EPOCH):$(CV_CPP)'; \
echo 'version:gcc=$(EPOCH):$(CV_GCC)'; \
echo 'version:gpp=$(EPOCH):$(CV_GPP)'; \
echo 'version:gobjc=$(EPOCH):$(CV_GOBJC)'; \
echo 'version:gobjcxx=$(EPOCH):$(CV_GOBJCXX)'; \
echo 'version:gfort=$(EPOCH):$(CV_GFORT)'; \
echo 'version:ggo=$(EPOCH):$(CV_GGO)'; \
echo 'version:gnat=$(EPOCH):$(CV_GNAT)'; \
echo 'version:gdc=$(CV_GDC)'; \
echo 'version:gm2=$(CV_GM2)'; \
echo 'version:brig=$(CV_BRIG)'; \
echo 'version:offl=$(CV_OFFL)'; \
echo 'pv:cpp=$(PV_CPP)'; \
echo 'pv:gcc=$(PV_GCC)'; \
echo 'pv:gpp=$(PV_GPP)'; \
echo 'pv:gobjc=$(PV_GOBJC)'; \
echo 'pv:gobjcxx=$(PV_GOBJCXX)'; \
echo 'pv:gfort=$(PV_GFORT)'; \
echo 'pv:ggo=$(PV_GGO)'; \
echo 'pv:gnat=$(PV_GNAT)'; \
echo 'pv:gdc=$(PV_GDC)'; \
echo 'pv:gm2=$(PV_GM2)'; \
echo 'pv:brig=$(PV_BRIG)'; \
echo 'pv:offl=$(PV_OFFL)'; \
echo 'reqv:cpp=$(REQV_CPP)'; \
echo 'reqv:gcc=$(REQV_GCC)'; \
echo 'reqv:gpp=$(REQV_GPP)'; \
echo 'reqv:gobjc=$(REQV_GOBJC)'; \
echo 'reqv:gobjcxx=$(REQV_GOBJCXX)'; \
echo 'reqv:gfort=$(REQV_GFORT)'; \
echo 'reqv:ggo=$(REQV_GGO)'; \
echo 'reqv:gnat=$(REQV_GNAT)'; \
echo 'reqv:gdc=$(REQV_GDC)'; \
echo 'reqv:gm2=$(REQV_GM2)'; \
echo 'reqv:brig=$(REQV_BRIG)'; \
echo 'reqv:offl=$(REQV_OFFL)'; \
echo 'gcc:triplet=gcc-$(subst _,-,$(DEB_HOST_GNU_TYPE)) (= $(EPOCH):$(CV_GCC))'; \
echo 'gpp:triplet=g++-$(subst _,-,$(DEB_HOST_GNU_TYPE)) (= $(EPOCH):$(CV_GPP))'; \
) > debian/substvars.native
ifeq ($(with_multilib),yes)
( \
echo 'pkgmulti:gcc=gcc-multilib'; \
echo 'pkgmulti:gpp=g++-multilib'; \
echo 'pkgmulti:gobjc=gobjc-multilib'; \
echo 'pkgmulti:gobjcxx=gobjc++-multilib'; \
echo 'pkgmulti:gfort=gfortran-multilib'; \
echo 'pkgmulti:ggo=gccgo-multilib'; \
echo 'pkgmulti:gdc=gdc-multilib'; \
) >> debian/substvars.native
endif
ifneq (,$(MOD_VER))
echo 'fortran:mod-version=$(MOD_VER)' >> debian/substvars.native
endif
ifneq (,$(filter $(DEB_HOST_ARCH),$(phobos_archs)))
echo 'dep:libgphobos=libgphobos-dev (= $${version:gdc})' >> debian/substvars.native
endif
substvars.%:
( \
echo 'version:cpp=$(EPOCH):$(CV_CPP_$(CROSS_ARCH))'; \
echo 'version:gcc=$(EPOCH):$(CV_GCC_$(CROSS_ARCH))'; \
echo 'version:gpp=$(EPOCH):$(CV_GPP_$(CROSS_ARCH))'; \
echo 'version:gobjc=$(EPOCH):$(CV_GOBJC_$(CROSS_ARCH))'; \
echo 'version:gobjcxx=$(EPOCH):$(CV_GOBJCXX_$(CROSS_ARCH))'; \
echo 'version:gfort=$(EPOCH):$(CV_GFORT_$(CROSS_ARCH))'; \
echo 'version:ggo=$(EPOCH):$(CV_GGO_$(CROSS_ARCH))'; \
echo 'version:gdc=$(CV_GDC_$(CROSS_ARCH))'; \
echo 'version:gm2=$(CV_GM2_$(CROSS_ARCH))'; \
echo 'pv:cpp=$(PV_CPP_$(CROSS_ARCH))'; \
echo 'pv:gcc=$(PV_GCC_$(CROSS_ARCH))'; \
echo 'pv:gpp=$(PV_GPP_$(CROSS_ARCH))'; \
echo 'pv:gobjc=$(PV_GOBJC_$(CROSS_ARCH))'; \
echo 'pv:gobjcxx=$(PV_GOBJCXX_$(CROSS_ARCH))'; \
echo 'pv:gfort=$(PV_GFORT_$(CROSS_ARCH))'; \
echo 'pv:ggo=$(PV_GGO_$(CROSS_ARCH))'; \
echo 'pv:gdc=$(PV_GDC_$(CROSS_ARCH))'; \
echo 'pv:gm2=$(PV_GM2_$(CROSS_ARCH))'; \
echo 'reqv:cpp=$(REQV_CPP_$(CROSS_ARCH))'; \
echo 'reqv:gcc=$(REQV_GCC_$(CROSS_ARCH))'; \
echo 'reqv:gpp=$(REQV_GPP_$(CROSS_ARCH))'; \
echo 'reqv:gobjc=$(REQV_GOBJC_$(CROSS_ARCH))'; \
echo 'reqv:gobjcxx=$(REQV_GOBJCXX_$(CROSS_ARCH))'; \
echo 'reqv:gfort=$(REQV_GFORT_$(CROSS_ARCH))'; \
echo 'reqv:ggo=$(REQV_GGO_$(CROSS_ARCH))'; \
echo 'reqv:gdc=$(REQV_GDC_$(CROSS_ARCH))'; \
echo 'reqv:gm2=$(REQV_GM2_$(CROSS_ARCH))'; \
) > debian/substvars.$*
$(if $(filter $(CROSS_ARCH),$(multilib_archs)), \
( \
echo 'pkgmulti:gcc=gcc-multilib'; \
echo 'pkgmulti:gpp=g++-multilib'; \
echo 'pkgmulti:gobjc=gobjc-multilib'; \
echo 'pkgmulti:gobjcxx=gobjc++-multilib'; \
echo 'pkgmulti:gfort=gfortran-multilib'; \
echo 'pkgmulti:ggo=gccgo-multilib'; \
echo 'pkgmulti:gdc=gdc-multilib'; \
echo 'pkgmulti:gm2=gm2-multilib'; \
) >> debian/substvars.$*; \
)
ifneq (,$(MOD_VER))
echo 'fortran:mod-version=$(MOD_VER)' >> debian/substvars.$*
endif
$(if $(filter $(CROSS_ARCH),$(phobos_archs)), \
echo 'dep:libgphobos=libgphobos-dev (= $${version:gdc})' >> debian/substvars.$* \
)
control:
ifeq ($(with_native),yes)
sed \
-e "s/@SOURCE@/$(SOURCE)/g" \
debian/control.source > debian/control
sed \
-e "s/@multilib_archs@/$(multilib_archs)/g" \
-e "s/@go_multilib_archs@/$(go_multilib_archs)/g" \
-e "s/@d_multilib_archs@/$(d_multilib_archs)/g" \
debian/control.native.in >> debian/control
else
sed \
-e "s/@SOURCE@/$(SOURCE)/g" debian/control.source \
| grep -v '^Build-Depends-Indep:' \
> debian/control
endif
ifeq ($(SOURCE),gcc-defaults)
sed \
-e "s/@hppa64_archs@/$(hppa64_archs)/g" \
debian/control.hppa64.in >> debian/control
endif
ifeq ($(with_cross),yes)
: # FIXME: filter-out some gdc and gccgo multilib configs
$(foreach a, $(if $(filter gcc-defaults, $(SOURCE)),amd64) $(CROSS_ARCHS), \
sed \
-e "s/CROSS_ARCH/$(a)/g" \
-e 's/CROSS_GNU_TYPE/$(subst _,-,$(call _gnu_type,$(a)))/g' \
-e 's/@host_archs@/$(HOST_ARCHS_$(a))/g' \
debian/control.cross.in \
$(if $(filter $(a),$(multilib_archs)), debian/control.cross-ml.in) \
$(if $(filter $(vendor),Ubuntu), debian/control.pkg-config.in) \
| awk '/^Package: gccgo-(hppa|m68k|sh)/ {skip=1} skip == 0 {print } /^$$/ && skip == 1 {skip=0}' \
>> debian/control; \
)
endif
ifeq ($(SOURCE)-$(with_gfdl_docs),gcc-defaults-yes)
cat debian/control.doc >> debian/control
endif
build-arch: build
build-indep: build-stamp
build: README build-stamp
build-stamp:
dh_testdir
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f *-stamp
rm -rf build
rm -f debian/control.tmp*
rm -f debian/substvars.*
rm -f debian/gcc.postinst debian/g++.postinst debian/gfortran.postinst
dh_clean
pre-install: build substvars
dh_testdir
dh_testroot
dh_prep
install: pre-install install-native $(foreach a,$(CROSS_ARCHS),install.$(a))
install-native: pre-install
ifeq ($(with_native),yes)
for p in $(filter-out $(cross_packages), $(shell dh_listpackages)); do \
cp -l debian/substvars.native debian/$$p.substvars; \
done
: # cpp
dh_installdirs -pcpp \
lib usr/bin \
usr/share/man/man1 usr/share/man/man7 usr/share/doc/cpp
dh_link -pcpp \
/usr/bin/cpp-$(PV_CPP) /usr/bin/cpp \
/usr/bin/cpp-$(PV_CPP) /usr/bin/$(DEB_HOST_GNU_TYPE)-cpp
ifeq (illumos,$(DEB_HOST_ARCH_OS))
# rpcgen uses /usr/lib/cpp by default:
dh_link -pcpp \
/usr/bin/cpp /usr/lib/cpp
endif
ifeq ($(with_gfdl_docs),yes)
for i in gfdl.7 gpl.7 fsf-funding.7; do \
cp -p $$i debian/cpp/usr/share/man/man7/$${i}gcc; \
done
dh_link -pcpp \
/usr/share/man/man1/cpp-$(PV_CPP).1.gz /usr/share/man/man1/cpp.1.gz \
/usr/share/man/man1/cpp-$(PV_CPP).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-cpp.1.gz
: # cpp-doc
dh_installdirs -pcpp-doc \
usr/share/doc usr/share/info
dh_link -pcpp-doc \
/usr/share/doc/gcc-$(PV_CPP)-base/cpp.html /usr/share/doc/cpp-doc/cpp.html \
/usr/share/doc/gcc-$(PV_CPP)-base/cppinternals.html /usr/share/doc/cpp-doc/cppinternals.html \
/usr/share/info/cpp-$(PV_CPP).info.gz /usr/share/info/cpp.info.gz \
/usr/share/info/cppinternals-$(PV_CPP).info.gz /usr/share/info/cppinternals.info.gz
endif
: # gcc
dh_installdirs -pgcc usr/bin usr/share/man/man1 usr/share/doc
dh_link -pgcc \
/usr/share/doc/cpp /usr/share/doc/gcc \
/usr/bin/gcc-$(PV_GCC) /usr/bin/gcc \
/usr/bin/gcc-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc \
/usr/bin/gcov-$(PV_GCC) /usr/bin/gcov \
/usr/bin/gcov-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcov \
/usr/lib/gcc/$(DEB_HOST_GNU_TYPE)/$(PV_GCC)/liblto_plugin.so /usr/lib/bfd-plugins/liblto_plugin.so \
/usr/share/doc/gcc-$(PV_GCC)/README.Bugs /usr/share/doc/cpp/README.Bugs \
$(if $(filter $(DEB_HOST_ARCH), $(gcc49_archs)),, \
/usr/bin/gcov-dump-$(PV_GCC) /usr/bin/gcov-dump \
/usr/bin/gcov-dump-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcov-dump \
/usr/bin/gcov-tool-$(PV_GCC) /usr/bin/gcov-tool \
/usr/bin/gcov-tool-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcov-tool \
)
dh_link -pgcc \
/usr/bin/gcc-ar-$(PV_GCC) /usr/bin/gcc-ar \
/usr/bin/gcc-nm-$(PV_GCC) /usr/bin/gcc-nm \
/usr/bin/gcc-ranlib-$(PV_GCC) /usr/bin/gcc-ranlib \
/usr/bin/gcc-ar-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc-ar \
/usr/bin/gcc-nm-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc-nm \
/usr/bin/gcc-ranlib-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc-ranlib \
/usr/share/man/man1/gcc-ar-$(PV_GCC).1.gz /usr/share/man/man1/gcc-ar.1.gz \
/usr/share/man/man1/gcc-ar-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcc-ar.1.gz \
/usr/share/man/man1/gcc-nm-$(PV_GCC).1.gz /usr/share/man/man1/gcc-nm.1.gz \
/usr/share/man/man1/gcc-nm-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcc-nm.1.gz \
/usr/share/man/man1/gcc-ranlib-$(PV_GCC).1.gz /usr/share/man/man1/gcc-ranlib.1.gz \
/usr/share/man/man1/gcc-ranlib-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcc-ranlib.1.gz
install -m 755 -p c89 debian/gcc/usr/bin/c89-gcc
install -m 644 -p c89.1 debian/gcc/usr/share/man/man1/c89-gcc.1
install -m 755 -p c99 debian/gcc/usr/bin/c99-gcc
install -m 644 -p c99.1 debian/gcc/usr/share/man/man1/c99-gcc.1
sed 's/@VER@/$(PV_GCC)/g' c99.1 > debian/gcc/usr/share/man/man1/c99-gcc.1
sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \
debian/gcc.postinst.in > debian/gcc.postinst
ifeq ($(with_gfdl_docs),yes)
dh_link -pgcc \
/usr/share/man/man1/gcc-$(PV_GCC).1.gz /usr/share/man/man1/gcc.1.gz \
/usr/share/man/man1/gcc-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcc.1.gz \
/usr/share/man/man1/gcov-$(PV_GCC).1.gz /usr/share/man/man1/gcov.1.gz \
/usr/share/man/man1/gcov-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcov.1.gz \
$(if $(filter $(DEB_HOST_ARCH), $(gcc49_archs)),, \
/usr/share/man/man1/gcov-tool-$(PV_GCC).1.gz /usr/share/man/man1/gcov-tool.1.gz \
/usr/share/man/man1/gcov-tool-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcov-tool.1.gz \
/usr/share/man/man1/gcov-dump-$(PV_GCC).1.gz /usr/share/man/man1/gcov-dump.1.gz \
/usr/share/man/man1/gcov-dump-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcov-dump.1.gz \
)
: # gcc-doc
dh_installdirs -pgcc-doc \
usr/share/doc usr/share/info
dh_link -pgcc-doc \
/usr/share/doc/gcc-$(PV_GCC)-base/gcc.html /usr/share/doc/gcc-doc/gcc.html \
/usr/share/doc/gcc-$(PV_GCC)-base/gccint.html /usr/share/doc/gcc-doc/gccint.html \
/usr/share/doc/gcc-$(PV_GCC)-base/libgomp.html /usr/share/doc/gcc-doc/libgomp.html \
/usr/share/info/gcc-$(PV_GCC).info.gz /usr/share/info/gcc.info.gz \
/usr/share/info/gccint-$(PV_GCC).info.gz /usr/share/info/gccint.info.gz \
/usr/share/info/libgomp-$(PV_GCC).info.gz /usr/share/info/libgomp.info.gz
endif
ifeq ($(with_multiarch_lib),yes)
ifeq ($(with_multilib),yes)
: # gcc-multilib
# multilib needs to provide a compat symlink pointing to the asm
# header directory of the primary architecture, since we may not
# have separate asm headers installed for our non-default targets.
dh_link -pgcc-multilib \
/usr/include/$(DEB_HOST_MULTIARCH)/asm /usr/include/asm
endif
endif
ifneq (,$(filter gdc, $(packages)))
: # gdc
dh_installdirs -pgdc
dh_installdocs -pgdc debian/README.Debian
dh_link -pgdc \
/usr/bin/gdc-$(PV_GDC) /usr/bin/gdc \
/usr/bin/gdc-$(PV_GDC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gdc
dh_link -pgdc \
/usr/share/man/man1/gdc-$(PV_GDC).1.gz /usr/share/man/man1/gdc.1.gz \
/usr/share/man/man1/gdc-$(PV_GDC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gdc.1.gz
ifneq (,$(filter libgphobos-dev, $(packages)))
: # gdc
dh_installdirs -plibgphobos-dev
dh_installdocs -plibgphobos-dev
endif
endif
ifneq (,$(filter gm2, $(packages)))
: # gm2
dh_installdirs -pgm2
dh_installdocs -pgm2 debian/README.Debian
dh_link -pgm2 \
/usr/bin/gm2-$(PV_GDC) /usr/bin/gm2 \
/usr/bin/gm2-$(PV_GDC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gm2
dh_link -pgm2 \
/usr/share/man/man1/gm2-$(PV_GDC).1.gz /usr/share/man/man1/gm2.1.gz \
/usr/share/man/man1/gm2-$(PV_GDC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gm2.1.gz
endif
ifneq (,$(filter gobjc, $(packages)))
: # gobjc
dh_installdirs -pgobjc
dh_link -pgobjc \
/usr/share/doc/cpp /usr/share/doc/gobjc
endif
ifneq (,$(filter gobjc++, $(packages)))
: # gobjc++
dh_installdirs -pgobjc++
dh_link -pgobjc++ \
/usr/share/doc/cpp /usr/share/doc/gobjc++
endif
ifneq (,$(filter g++, $(packages)))
: # g++
dh_installdirs -pg++
dh_link -pg++ \
/usr/share/doc/cpp /usr/share/doc/g++ \
/usr/bin/g++-$(PV_GPP) /usr/bin/g++ \
/usr/bin/g++-$(PV_GPP) /usr/bin/$(DEB_HOST_GNU_TYPE)-g++ \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/g++-$(PV_GPP).1.gz /usr/share/man/man1/g++.1.gz \
/usr/share/man/man1/g++-$(PV_GPP).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-g++.1.gz \
)
sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \
debian/g++.postinst.in > debian/g++.postinst
endif
ifneq (,$(filter gfortran, $(packages)))
: # gfortran
dh_installdirs -pgfortran usr/bin /usr/share/man/man1 usr/share/doc
dh_link -pgfortran \
/usr/share/doc/cpp /usr/share/doc/gfortran \
/usr/bin/gfortran-$(PV_GFORT) /usr/bin/gfortran \
/usr/bin/gfortran-$(PV_GFORT) /usr/bin/$(DEB_HOST_GNU_TYPE)-gfortran \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/gfortran-$(PV_GFORT).1.gz /usr/share/man/man1/gfortran.1.gz \
/usr/share/man/man1/gfortran-$(PV_GFORT).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gfortran.1.gz \
)
ifeq ($(with_gfdl_docs),yes)
: # gfortran-doc
dh_installdirs -pgfortran-doc \
usr/share/doc usr/share/info
dh_link -pgfortran-doc \
/usr/share/doc/gcc-$(PV_GFORT)-base/fortran/gfortran.html \
/usr/share/doc/gfortran-doc/fortran/gfortran.html \
/usr/share/info/gfortran-$(PV_GFORT).info.gz /usr/share/info/gfortran.info.gz
endif
sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \
debian/gfortran.postinst.in > debian/gfortran.postinst
endif
ifneq (,$(filter gccgo, $(packages)))
: # Go
dh_installdirs -pgccgo usr/share/doc
dh_link -pgccgo \
/usr/share/doc/cpp /usr/share/doc/gccgo \
/usr/bin/gccgo-$(PV_GGO) /usr/bin/gccgo \
/usr/bin/gccgo-$(PV_GGO) /usr/bin/$(DEB_HOST_GNU_TYPE)-gccgo \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/gccgo-$(PV_GGO).1.gz /usr/share/man/man1/gccgo.1.gz \
/usr/share/man/man1/gccgo-$(PV_GGO).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gccgo.1.gz \
)
ifeq ($(with_gfdl_docs),yes)
: # gccgo-doc
dh_installdirs -pgccgo-doc \
usr/share/doc usr/share/info
dh_link -pgccgo-doc \
/usr/share/doc/gcc-$(PV_GGO)-base/gccgo.html /usr/share/doc/gccgo-doc/gccgo.html \
/usr/share/info/gccgo-$(PV_GGO).info.gz /usr/share/info/gccgo.info.gz
endif
endif
ifneq (,$(filter gccbrig, $(packages)))
: # gccbrig
dh_installdirs -pgccbrig
dh_link -pgccbrig \
/usr/share/doc/cpp /usr/share/doc/gccbrig \
/usr/bin/gccbrig-$(PV_BRIG) /usr/bin/gccbrig \
/usr/bin/gccbrig-$(PV_BRIG) /usr/bin/$(DEB_HOST_GNU_TYPE)-gccbrig \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/gccbrig-$(PV_BRIG).1.gz /usr/share/man/man1/gccbrig.1.gz \
/usr/share/man/man1/gccbrig-$(PV_BRIG).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gccbrig.1.gz \
)
endif
ifneq (,$(filter gcc-offload-nvptx, $(packages)))
: # gcc-offload-nvptx
dh_installdirs -pgcc-offload-nvptx
dh_link -pgcc-offload-nvptx \
/usr/share/doc/cpp /usr/share/doc/gcc-offload-nvptx \
/usr/bin/$(DEB_HOST_GNU_TYPE)-accel-nvptx-none-gcc-$(PV_OFFL) \
/usr/bin/$(DEB_HOST_GNU_TYPE)-accel-nvptx-none-gcc \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-accel-nvptx-none-$(PV_OFFL).1.gz \
/usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-accel-nvptx-none.1.gz \
)
endif
ifneq (,$(filter gcc-hppa64-linux-gnu, $(packages)))
: # gcc-hppa64-linux-gnu
dh_installdirs -pgcc-hppa64-linux-gnu
dh_link -pgcc-hppa64-linux-gnu \
/usr/bin/hppa64-linux-gnu-gcc-$(PV_GCC) /usr/bin/hppa64-linux-gnu-gcc \
/usr/bin/hppa64-linux-gnu-gcc-ar-$(PV_GCC) /usr/bin/hppa64-linux-gnu-gcc-ar \
/usr/bin/hppa64-linux-gnu-gcc-nm-$(PV_GCC) /usr/bin/hppa64-linux-gnu-gcc-nm \
/usr/bin/hppa64-linux-gnu-gcc-ranlib-$(PV_GCC) /usr/bin/hppa64-linux-gnu-gcc-ranlib \
/usr/share/man/man1/hppa64-linux-gnu-gcc-ar-$(PV_GCC).1.gz /usr/share/man/man1/hppa64-linux-gnu-gcc-ar.1.gz \
/usr/share/man/man1/hppa64-linux-gnu-gcc-nm-$(PV_GCC).1.gz /usr/share/man/man1/hppa64-linux-gnu-gcc-nm.1.gz \
/usr/share/man/man1/hppa64-linux-gnu-gcc-ranlib-$(PV_GCC).1.gz /usr/share/man/man1/hppa64-linux-gnu-gcc-ranlib.1.gz \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/hppa64-linux-gnu-gcc-$(PV_GCC).1.gz /usr/share/man/man1/hppa64-linux-gnu-gcc.1.gz \
)
endif
ifeq ($(i586_symlinks),yes)
cd debian; \
for x in $$(find $(filter-out $(cross_packages), $(all_packages)) -type l -name 'i686-*'); do \
link=$$(echo $$x | sed 's/i686-/i586-/'); \
tgt=$$(basename $$x); \
echo "Adding symlink: $$link -> $$tgt"; \
rm -f $$link; cp -a $$x $$link; \
done
endif
endif # with_native
install.%: pre-install
for p in $(filter %-$(CROSS_PKG_GNU_TYPE), $(all_packages)); do \
cp -l debian/substvars.$(CROSS_ARCH) debian/$$p.substvars; \
done
: # cpp-$(CROSS_PKG_GNU_TYPE)
dh_installdirs -pcpp-$(CROSS_PKG_GNU_TYPE)
dh_link -pcpp-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-cpp-$(PV_CPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-cpp
$(if $(filter yes, $(with_gfdl_docs)), \
dh_link -pcpp-$(CROSS_PKG_GNU_TYPE) \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-cpp-$(PV_CPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-cpp.1.gz \
)
: # gcc-$(CROSS_PKG_GNU_TYPE)
dh_installdirs -pgcc-$(CROSS_PKG_GNU_TYPE)
dh_link -pgcc-$(CROSS_PKG_GNU_TYPE) \
/usr/share/doc/cpp-$(CROSS_PKG_GNU_TYPE) /usr/share/doc/gcc-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-gcc-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcc \
/usr/bin/$(CROSS_GNU_TYPE)-gcov-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcov \
/usr/share/doc/gcc-$(PV_GCC)-$(CROSS_PKG_GNU_TYPE)-base/README.Bugs /usr/share/doc/cpp-$(CROSS_PKG_GNU_TYPE)/README.Bugs \
$(if $(filter $(CROSS_ARCH), $(gcc49_archs)),, \
/usr/bin/$(CROSS_GNU_TYPE)-gcov-dump-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcov-dump \
/usr/bin/$(CROSS_GNU_TYPE)-gcov-tool-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcov-tool \
)
dh_link -pgcc-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-gcc-ar-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcc-ar \
/usr/bin/$(CROSS_GNU_TYPE)-gcc-nm-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcc-nm \
/usr/bin/$(CROSS_GNU_TYPE)-gcc-ranlib-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcc-ranlib \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-ar-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-ar.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-nm-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-nm.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-ranlib-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-ranlib.1.gz
: # install -m 755 -p c89 debian/gcc/usr/bin/c89-gcc
: # install -m 644 -p c89.1 debian/gcc/usr/share/man/man1/c89-gcc.1
: # install -m 755 -p c99 debian/gcc/usr/bin/c99-gcc
: # install -m 644 -p c99.1 debian/gcc/usr/share/man/man1/c99-gcc.1
: # sed 's/@VER@/$(PV_GCC)/g' c99.1 > debian/gcc/usr/share/man/man1/c99-gcc.1
: # sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \
: # debian/gcc.postinst.in > debian/gcc.postinst
$(if $(filter yes, $(with_gfdl_docs)), \
dh_link -pgcc-$(CROSS_PKG_GNU_TYPE) \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov.1.gz \
$(if $(filter $(CROSS_ARCH), $(gcc49_archs)),, \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-tool-$(PV_GCC_$(CROSS_ARCH)).1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-tool.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-dump-$(PV_GCC_$(CROSS_ARCH)).1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-dump.1.gz) \
)
: # gdc-$(CROSS_PKG_GNU_TYPE)
$(if $(filter gdc-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_installdirs -pgdc-$(CROSS_PKG_GNU_TYPE); \
dh_installdocs -pgdc-$(CROSS_PKG_GNU_TYPE) \
debian/README.Debian; \
dh_link -pgdc-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-gdc-$(PV_GDC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gdc \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gdc-$(PV_GDC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gdc.1.gz; \
)
: # gm2-$(CROSS_PKG_GNU_TYPE)
$(if $(filter gm2-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_installdirs -pgm2-$(CROSS_PKG_GNU_TYPE); \
dh_installdocs -pgm2-$(CROSS_PKG_GNU_TYPE) \
debian/README.Debian; \
dh_link -pgm2-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-gm2-$(PV_GM2_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gm2 \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gm2-$(PV_GM2_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gm2.1.gz; \
)
: # gobjc-$(CROSS_PKG_GNU_TYPE)
$(if $(filter gobjc-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_installdirs -pgobjc-$(CROSS_PKG_GNU_TYPE); \
dh_link -pgobjc-$(CROSS_PKG_GNU_TYPE) \
/usr/share/doc/cpp-$(CROSS_PKG_GNU_TYPE) /usr/share/doc/gobjc-$(CROSS_PKG_GNU_TYPE); \
)
: # gobjc++-$(CROSS_PKG_GNU_TYPE)
$(if $(filter gobjc++-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_installdirs -pgobjc++-$(CROSS_PKG_GNU_TYPE); \
dh_link -pgobjc++-$(CROSS_PKG_GNU_TYPE) \
/usr/share/doc/cpp-$(CROSS_PKG_GNU_TYPE) /usr/share/doc/gobjc++-$(CROSS_PKG_GNU_TYPE); \
)
: # g++-$(CROSS_PKG_GNU_TYPE)
$(if $(filter g++-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_installdirs -pg++-$(CROSS_PKG_GNU_TYPE); \
dh_link -pg++-$(CROSS_PKG_GNU_TYPE) \
/usr/share/doc/cpp-$(CROSS_PKG_GNU_TYPE) /usr/share/doc/g++-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-g++-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-g++ \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-g++-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-g++.1.gz \
); \
: # sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \
: # debian/g++.postinst.in > debian/g++.postinst; \
)
: # gfortran-$(CROSS_PKG_GNU_TYPE)
$(if $(filter gfortran-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_installdirs -pgfortran-$(CROSS_PKG_GNU_TYPE); \
dh_link -pgfortran-$(CROSS_PKG_GNU_TYPE) \
/usr/share/doc/cpp-$(CROSS_PKG_GNU_TYPE) /usr/share/doc/gfortran-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-gfortran-$(PV_GFORT_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gfortran \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gfortran-$(PV_GFORT_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gfortran.1.gz \
); \
: # sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \
: # debian/gfortran.postinst.in > debian/gfortran.postinst; \
)
: # gccgo-$(CROSS_PKG_GNU_TYPE)
$(if $(filter gccgo-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_installdirs -pgccgo-$(CROSS_PKG_GNU_TYPE); \
dh_link -pgccgo-$(CROSS_PKG_GNU_TYPE) \
/usr/share/doc/cpp-$(CROSS_PKG_GNU_TYPE) /usr/share/doc/gccgo-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-gccgo-$(PV_GGO_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gccgo \
$(if $(filter yes, $(with_gfdl_docs)), \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gccgo-$(PV_GGO_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gccgo.1.gz \
); \
)
: # gnat-$(CROSS_PKG_GNU_TYPE)
$(if $(filter gnat-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_installdirs -pgnat-$(CROSS_PKG_GNU_TYPE); \
dh_link -pgnat-$(CROSS_PKG_GNU_TYPE) \
/usr/share/doc/cpp-$(CROSS_PKG_GNU_TYPE) /usr/share/doc/gnat-$(CROSS_PKG_GNU_TYPE) \
/usr/bin/$(CROSS_GNU_TYPE)-gnat-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnat \
/usr/bin/$(CROSS_GNU_TYPE)-gnatbind-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatbind \
/usr/bin/$(CROSS_GNU_TYPE)-gnatchop-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatchop \
/usr/bin/$(CROSS_GNU_TYPE)-gnatclean-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatclean \
/usr/bin/$(CROSS_GNU_TYPE)-gnatfind-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatfind \
/usr/bin/$(CROSS_GNU_TYPE)-gnatkr-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatkr \
/usr/bin/$(CROSS_GNU_TYPE)-gnatlink-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatlink \
/usr/bin/$(CROSS_GNU_TYPE)-gnatls-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatls \
/usr/bin/$(CROSS_GNU_TYPE)-gnatmake-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatmake \
/usr/bin/$(CROSS_GNU_TYPE)-gnatprep-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatprep \
/usr/bin/$(CROSS_GNU_TYPE)-gnatxref-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatxref \
/usr/bin/$(CROSS_GNU_TYPE)-gnathtml-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnathtml \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnat-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnat.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatbind-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatbind.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatchop-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatchop.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatclean-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatclean.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatfind-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatfind.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatkr-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatkr.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatlink-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatlink.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatls-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatls.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatmake-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatmake.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatprep-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatprep.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatxref-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatxref.1.gz \
/usr/share/man/man1/$(CROSS_GNU_TYPE)-gnathtml-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnathtml.1.gz; \
dh_installdirs -pgnat-sjlj-$(CROSS_PKG_GNU_TYPE); \
dh_link -pgnat-sjlj-$(CROSS_PKG_GNU_TYPE) \
/usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gnat-sjlj-$(CROSS_GNU_TYPE); \
)
nopkgs_native := $(foreach p, $(filter $(shell dh_listpackages -a), $(sort $(invalid_packages) $(no_packages) $(cross_packages))),-N$(p))
binary-indep: build-indep install
ifeq ($(with_native),yes)
dh_testdir
dh_testroot
dh_installchangelogs -i
dh_installdocs -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
endif
binary-arch: binary-native $(foreach a,$(CROSS_ARCHS),binary.$(a))
binary-native: build-arch install
ifeq ($(with_native),yes)
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs -pcpp
for p in `dh_listpackages $(nopkgs_native) -Ncpp $(if $(filter yes,$(with_gfdl_docs)),-Ncpp-doc -Ngcc-doc -Ngfortran-doc -Ngccgo-doc) -Ngdc -Nlibgphobos-dev`; do \
case "$$p" in \
*-gnu*|*-kfreebsd*|gcc-hppa64-linux-gnu) continue;; \
*) t=cpp; \
esac; \
echo ln -sf $$t debian/$$p/usr/share/doc/$$p; \
mkdir -p debian/$$p/usr/share/doc; \
rm -rf debian/$$p/usr/share/doc/$$p; \
ln -sf $$t debian/$$p/usr/share/doc/$$p; \
done
dh_installchangelogs -pcpp -pgdc -plibgphobos-dev
for i in cpp gdc libgphobos-dev; do \
mv debian/$$i/usr/share/doc/$$i/changelog \
debian/$$i/usr/share/doc/$$i/changelog.Debian; \
done
ifeq ($(with_gfdl_docs),yes)
dh_installdocs -pcpp-doc -pgcc-doc -pgfortran-doc -pgccgo-doc
dh_installchangelogs -pcpp-doc -pgcc-doc -pgfortran-doc -pgccgo-doc
for i in cpp-doc gcc-doc gfortran-doc gccgo-doc; do \
mv debian/$$i/usr/share/doc/$$i/changelog \
debian/$$i/usr/share/doc/$$i/changelog.Debian; \
done
endif
ifneq (,$(filter gcc-hppa64-linux-gnu, $(packages)))
dh_installdocs -pgcc-hppa64-linux-gnu
dh_installchangelogs -pgcc-hppa64-linux-gnu
mv debian/gcc-hppa64-linux-gnu/usr/share/doc/gcc-hppa64-linux-gnu/changelog \
debian/gcc-hppa64-linux-gnu/usr/share/doc/gcc-hppa64-linux-gnu/changelog.Debian
endif
dh_compress -a $(nopkgs_native) -XREADME.Debian
ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386))
# temporary i486-* symlinks for jessie/sid
ifeq ($(DEB_HOST_GNU_CPU)),i586)
gnutype=$(subst i586,i486,$(DEB_HOST_GNU_TYPE)); \
for i in $$(find debian -name 'i586-*'); do \
cp -a $$i $$(echo $$i | sed "s,$(DEB_HOST_GNU_TYPE),$$gnutype,"); \
done
endif
# for backports to wheezy and squeeze
ifeq ($(DEB_HOST_GNU_CPU)),i486)
gnutype=$(subst i486,i586,$(DEB_HOST_GNU_TYPE)); \
for i in $$(find debian -name 'i486-*'); do \
cp -a $$i $$(echo $$i | sed "s,$(DEB_HOST_GNU_TYPE),$$gnutype,"); \
done
endif
endif
for p in $$(dh_listpackages -a); do \
case $$p in \
cpp|g++|gcc|gccgo|gfortran|gcc-hppa64-linux-gnu) \
[ "$(with_gfdl_docs)" = yes ] && continue; \
mkdir -p -m 755 debian/$$p/usr/share/lintian/overrides; \
echo "$$p binary: binary-without-manpage" \
>> debian/$$p/usr/share/lintian/overrides/$$p;; \
cpp-doc|gcc-doc|gccgo-doc|gfortran-doc) \
mkdir -p -m 755 debian/$$p/usr/share/lintian/overrides; \
echo "$$p binary: documentation-package-not-architecture-independent" \
>> debian/$$p/usr/share/lintian/overrides/$$p;; \
esac; \
done
dh_fixperms -a $(nopkgs_native)
dh_installdeb -a $(nopkgs_native)
dh_gencontrol -pcpp \
$(if $(filter yes, $(with_gfdl_docs)),-pcpp-doc) \
-u-v$(EPOCH):$(CV_CPP)
dh_gencontrol -pgcc \
$(if $(filter yes,$(with_multilib)),-pgcc-multilib) \
$(if $(filter yes, $(with_gfdl_docs)),-pgcc-doc) \
-u-v$(EPOCH):$(CV_GCC)
ifneq (,$(filter gdc, $(packages)))
dh_gencontrol -pgdc $(if $(filter yes,$(with_multilib)),-pgdc-multilib) \
-u-v$(EPOCH):$(CV_GDC)
endif
ifneq (,$(filter libgphobos-dev, $(packages)))
dh_gencontrol -plibgphobos-dev -u-v$(CV_GDC)
endif
ifneq (,$(filter gm2, $(packages)))
dh_gencontrol -pgm2 \
-u-v$(EPOCH):$(CV_GM2)
endif
ifneq (,$(filter g++, $(packages)))
dh_gencontrol -pg++ $(if $(filter yes,$(with_multilib)),-pg++-multilib) \
-u-v$(EPOCH):$(CV_GPP)
endif
ifneq (,$(filter gobjc, $(packages)))
dh_gencontrol -pgobjc $(if $(filter yes,$(with_multilib)),-pgobjc-multilib) \
-u-v$(EPOCH):$(CV_GOBJC)
endif
ifneq (,$(filter gobjc++, $(packages)))
dh_gencontrol -pgobjc++ $(if $(filter yes,$(with_multilib)),-pgobjc++-multilib) \
-u-v$(EPOCH):$(CV_GOBJCXX)
endif
ifneq (,$(filter gfortran, $(packages)))
dh_gencontrol -pgfortran $(if $(filter yes,$(with_multilib)),-pgfortran-multilib) \
$(if $(filter yes, $(with_gfdl_docs)),-pgfortran-doc) \
-u-v$(EPOCH):$(CV_GFORT)
endif
ifneq (,$(filter gccgo, $(packages)))
dh_gencontrol -pgccgo \
$(if $(filter yes,$(with_go_multilib)),-pgccgo-multilib) \
$(if $(filter yes, $(with_gfdl_docs)),-pgccgo-doc) \
-u-v$(EPOCH):$(CV_GGO)
endif
ifneq (,$(filter gccbrig, $(packages)))
dh_gencontrol -pgccbrig \
-u-v$(EPOCH):$(CV_BRIG)
endif
ifneq (,$(filter gcc-offload-nvptx, $(packages)))
dh_gencontrol -pgcc-offload-nvptx \
-u-v$(EPOCH):$(CV_OFFL)
endif
ifneq (,$(filter gcc-hppa64-linux-gnu, $(packages)))
dh_gencontrol -pgcc-hppa64-linux-gnu \
-u-v$(EPOCH):$(CV_GCC)
endif
dh_md5sums -a $(nopkgs_native)
dh_builddeb -a $(nopkgs_native)
endif # with_native
binary.%: build-arch install
dh_testdir
dh_testroot
dh_installdocs -pcpp-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter pkg-config-$(CROSS_PKG_GNU_TYPE), $(packages)),-ppkg-config-$(CROSS_PKG_GNU_TYPE))
for p in $(filter %-$(CROSS_PKG_GNU_TYPE),$(cross_packages)); do \
case "$$p" in \
cpp-*|pkg-config-*) continue;; \
*-gnu*|*-kfreebsd*) t=cpp-$(CROSS_PKG_GNU_TYPE);; \
*) continue;; \
esac; \
echo ln -sf $$t debian/$$p/usr/share/doc/$$p; \
mkdir -p debian/$$p/usr/share/doc; \
rm -rf debian/$$p/usr/share/doc/$$p; \
ln -sf $$t debian/$$p/usr/share/doc/$$p; \
done
dh_installchangelogs -pcpp-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter pkg-config-$(CROSS_PKG_GNU_TYPE), $(packages)),-ppkg-config-$(CROSS_PKG_GNU_TYPE))
for i in cpp-$(CROSS_PKG_GNU_TYPE) $(if $(filter pkg-config-$(CROSS_PKG_GNU_TYPE), $(packages)),pkg-config-$(CROSS_PKG_GNU_TYPE)); do \
mv debian/$$i/usr/share/doc/$$i/changelog \
debian/$$i/usr/share/doc/$$i/changelog.Debian; \
done
dh_compress $(foreach p,$(filter %-$(CROSS_PKG_GNU_TYPE),$(cross_packages)),-p$(p)) \
-XREADME.Debian
$(if $(filter pkg-config-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_link -ppkg-config-$(CROSS_PKG_GNU_TYPE) \
/usr/share/pkg-config-crosswrapper /usr/bin/${CROSS_GNU_TYPE}-pkg-config \
)
for p in $(filter %-$(CROSS_PKG_GNU_TYPE),$(cross_packages)); do \
case $$p in \
cpp-$(CROSS_PKG_GNU_TYPE)|g++-$(CROSS_PKG_GNU_TYPE)|gcc-$(CROSS_PKG_GNU_TYPE)|gccgo-$(CROSS_PKG_GNU_TYPE)|gfortran-$(CROSS_PKG_GNU_TYPE)) \
[ "$(with_gfdl_docs)" = yes ] && continue; \
mkdir -p -m 755 debian/$$p/usr/share/lintian/overrides; \
echo "$$p binary: binary-without-manpage" \
>> debian/$$p/usr/share/lintian/overrides/$$p;; \
esac; \
done
dh_fixperms $(foreach p,$(filter %-$(CROSS_PKG_GNU_TYPE),$(cross_packages)),-p$(p))
dh_installdeb $(foreach p,$(filter %-$(CROSS_PKG_GNU_TYPE),$(cross_packages)),-p$(p))
dh_gencontrol -pcpp-$(CROSS_PKG_GNU_TYPE) '-u-v$(EPOCH):$(CV_CPP_$(CROSS_ARCH))'
dh_gencontrol -pgcc-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pgcc-multilib-$(CROSS_PKG_GNU_TYPE)) \
'-u-v$(EPOCH):$(CV_GCC_$(CROSS_ARCH))'
$(if $(filter gdc-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -pgdc-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter $(CROSS_ARCH),$(d_multilib_archs)),-pgdc-multilib-$(CROSS_PKG_GNU_TYPE)) \
-u-v$(EPOCH):$(CV_GDC_$(CROSS_ARCH)) \
)
$(if $(filter gm2-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -pgm2-$(CROSS_PKG_GNU_TYPE) \
-u-v$(EPOCH):$(CV_GM2_$(CROSS_ARCH)) \
)
$(if $(filter g++-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -pg++-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pg++-multilib-$(CROSS_PKG_GNU_TYPE)) \
-u-v$(EPOCH):$(CV_GPP_$(CROSS_ARCH)) \
)
$(if $(filter gobjc++-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -pgobjc-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pgobjc-multilib-$(CROSS_PKG_GNU_TYPE)) \
-u-v$(EPOCH):$(CV_GOBJC_$(CROSS_ARCH)) \
)
$(if $(filter gobjc++-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -pgobjc++-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pgobjc++-multilib-$(CROSS_PKG_GNU_TYPE)) \
-u-v$(EPOCH):$(CV_GOBJCXX_$(CROSS_ARCH)) \
)
$(if $(filter gfortran-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -pgfortran-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pgfortran-multilib-$(CROSS_PKG_GNU_TYPE)) \
-u-v$(EPOCH):$(CV_GFORT_$(CROSS_ARCH)) \
)
$(if $(filter gccgo-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -pgccgo-$(CROSS_PKG_GNU_TYPE) \
$(if $(filter $(CROSS_ARCH),$(go_multilib_archs)),-pgccgo-multilib-$(CROSS_PKG_GNU_TYPE)) \
-u-v$(EPOCH):$(CV_GGO_$(CROSS_ARCH)) \
)
$(if $(filter gnat-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -pgnat-$(CROSS_PKG_GNU_TYPE) -pgnat-sjlj-$(CROSS_PKG_GNU_TYPE) \
-u-v$(EPOCH):$(CV_GNAT_$(CROSS_ARCH)) \
)
$(if $(filter pkg-config-$(CROSS_PKG_GNU_TYPE), $(packages)), \
dh_gencontrol -ppkg-config-$(CROSS_PKG_GNU_TYPE) \
-u-v$(EPOCH):$(CV_GCC_$(CROSS_ARCH)) \
)
dh_md5sums $(foreach p,$(filter %-$(CROSS_PKG_GNU_TYPE),$(cross_packages)),-p$(p))
dh_builddeb $(foreach p,$(filter %-$(CROSS_PKG_GNU_TYPE),$(cross_packages)),-p$(p))
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install substvars
|