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 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643
|
======================================================================
Version 0.37.0, by Aleksey Cheusov, Thu, 8 Apr 2021 09:07:48 +0300
Features:
* new feature "strtoi" for NetBSD function with the same name
* new feature "strtou" for NetBSD function with the same name
* new feature "reallocarr" for NetBSD function with the same name
* new feature "macro". It provides NetBSD-style macro __dead, __pure,
__UNCONST, __printflike, __constfunc, __always_inline, __aligned,
__arraycount, MAX and MIN
* "efun": add support for ereallocarr(3), estrtoi(3) and estrtou(3)
Fixes:
* imp.foreign_autotools.mk: add MAKE=${AT_MAKE} to environment
This fixes ./configure when "make" executable is not available
* CXXSTD: appropriate option is passed to the linker. This fixes
failures with Sun C++ compiler.
* examples/shquote/prog.c: fix segfault seen on Solaris-10
(incorrect use of getline(3))
mk-configure.7:
* add missing documentation for features "reallocarray", "fparseln"
and "vis"
* minor fixes
* CXXSTD: fix incorrect description
Exit with error if generated config under ~/.mkcmake is older than
system mk files. This situation potentially means that generated
configs do not contain all required information about compiler.
System-wide mk file for compiler settings has higher priority
than files under ~/.mkcmake
EXPORT_SYMBOLS: empty lines and comments started with '#' are ignored
mkc_install: do not remove "$dst" before renaming "$dsttmp" to
"$dst", it is just useless.
Simplify the target "installdirs".
======================================================================
Version 0.36.0, by Aleksey Cheusov, Tue, 5 Jan 2021 19:29:08 +0300
Introduce new variables:
* CFLAGS_<source>, CXXFLAGS_<source> and CPPFLAGS_<source>.
Now one can add some C/C++ compilation flags on per source file
basis.
* CCSTD and CXXSTD.
Now projects based on mk-configure may require
standard-compliant compiler, for example, C99.
* CFLAGS0 and CXXFLAGS0.
* MKCOMPILERSETTINGS.
See README.for_packagers file for details
Internal mk files are included only if it is really necessary. For
example, mkc_imp.incs.mk is included only if variable INCS is not
empty. In theory, this should speed-up mkcmake.
New features: humanize_number, shquote and pwdgrp.
Deprecate some things:
* implicit MAN page, that is when MAN variable is not set,
but man file exists
* ~/.mk-c directory and @sysconfdir@/mk-c.conf file.
Please rename them to ~/.mkcmake and
@sysconfdir@/mkcmake.conf respectively.
Add preliminary support for ARMCC compiler.
Optimize installation of directories, run "install -d" once for all
created directories.
mkc.lib.mk: after building libraries ${.CURDIR:T}.done file is
created. This file is used later for handling inter-project
dependencies specified by LIBDEPS variable.
mk-configure.7: document all variables in alphabetic order.
I hope this makes navigation in the documentation easier.
Fixes:
* tests/failed_requirements: fix failure on freebsd
(strict printf(1))
* examples/require_tools/fake: make it a real script
======================================================================
Version 0.35.0, by Aleksey Cheusov, Wed, 25 Nov 2020 16:01:23 +0300
Add the following new features: arc4random, bswap, dprintf, efun,
errc, fparseln, fts, posix_getopt, raise_default_signals,
reallocarray, strsep and vis.
See mk-configure.7 for details.
Fixes:
* mkc_check_decl: fix "prototype" mode. Extraction of function name
was incorrect. Add one more regression test for this case in
tests/os_NetBSD.
* Avoid multiple repetition of MKC_COMMON_DEFINES in CPPFLAGS
* Fix target "depend" that failed if SRCS contains full path to
source code.
Move -Wreturn-type from CFLAGS.warns.{clang,gcc}.2 to
CFLAGS.warns.{clang,gcc}.1 and make it an error for C++
CC_TYPE and CXX_TYPE are correctly set if MKC_CHECK_CUSTOM is set.
Use .error bmake command for checking MKC_REQD. Also, move
appropriate check to mkc_imp.preinit.mk, so it is checked in the
very beginning. Documentation and error message are slightly
updated.
Rename variable DISTCLEANFILES to CLEANDIRFILES, DISTCLEANFILES is
considered deprecated.
Rename variable DISTCLEANDIRS to CLEANDIRDIRS, DISTCLEANDIRS is
considered deprecated.
Add support for latest Intel C/C++ compiler. We have to always add
-we10006 option to it in order it fail when invalid option is used.
Adapt some features for using functions implementation from
libnbcompat and libbsd libraries.
Use .depend_${.CURDIR:T} instead .depend to support MAKEOBJDIR.
New tests and examples.
======================================================================
Version 0.34.2, by Aleksey Cheusov, Thu, 14 May 2020 18:42:58 +0300
Do not pass *all* CFLAGS flags to CXXFLAGS. This fixes builds
where, for example, clang is used as a C compile and gcc is used as
a C++ compiler. Also, MKC_CHECK_* variables update MKC_CPPFLAGS
instead of MKC_CFLAGS.
Avoid "install -d /" if there is nothing to install. This fixes
some failures on some systems/conditions and improves support for
foreign install(1) programs, e.g., (UCB install on Solaris)
Fixes for CFLAGS containing -O2 and -D_FORTIFY_SOURCE=n
main.mk: clean-ups for target "cleandir" and "clean"
======================================================================
Version 0.34.1, by Aleksey Cheusov, Mon, 30 Mar 2020 02:35:15 +0300
Fixes in mk-configure:
- broken builtins prog_* (broken since 0.29.2)
- MKC_REQUIRE_BUILTINS also sets BUILTIN.<builtin> variable
(broken -- always)
- mk/ also installs mkc_imp.foreign_autotools.mk (broken -- always)
- mkc_compiler_settings(1): unexpected loading of ../Makefile.inc
(broken -- 0.34.0)
- mk-configure.7:
* clang also supports WARNERR
* add documentation for MKC_REQUIRE_BUILTINS
* other minor clean-ups and fixes
- mkc_imp.foreign_autotools.mk: do not change .OBJDIR!
Fixes and improvements in tests/, examples/ and build infrastructure:
- examples/hello_calc2: build failure with gcc-10 (multiple
definition of `calc_lval'). Thanks to Sergei Trofimovich.
- examples/hello_autoconf: out-of-tree build failure
- examples/check_compiler_opts: run "cleandir" at the end of "test"
- examples/hello_require_tools: run "cleandir" at the end of "test"
- examples/subprojects/test.mk: better ignore nroff
warning "cannot adjust line"
- tests/dltest: run "cleandir" at the end of "test"
- tests/mkc_check_custom: run "cleandir" at the end of "test"
- tests/os_OpenBSD: run "cleandir" at the end of "test"
- tests/os_Linux: run "cleandir" at the end of "test"
- tests/require_prototype: run "cleandir" at the end of "test"
- tests/os_NetBSD: run "cleandir" at the end of "test"
- examples/hello_autoconf: use MKC_REQUIRE_BUILTINS
instead of MKC_CHECK_BUILTINS
- main.mk: clean -> clean-examples; cleandir -> cleandir-examples
Add example/Makefile for running tests after installing mk-configure
======================================================================
Version 0.34.0, by Aleksey Cheusov, Wed, 19 Feb 2020 22:46:40 +0300
This release introduces some incompatibilities with older releases:
- mkc_install -l is changed
- Target "distclean" is considered deprecated.
Use target "configure" instead!
- Remove support for Pascal, Fortran and ObjC.
Only C and C++ are supported.
- Do not add ${LEXLIB} to LDADD if SRCS contains .l files.
You have to add it manually when needed or use new feature "libl".
- mkc_check_custom: remove options -p and -n
- LDREAL is either C or C++ compiler, not the linker
- mkc_check_custom: do not use CARGS anymore
- Introduce CXXOPTS and CXXOPTS_<prj> variables and
do not pass COPTS to C++ compiler. COPTS is only for C!
mk-configure build system changes:
- Introduce new targets "help", "help_subprj" and "help_use" and
appropriate framework for documenting the software project. See
mkc_imp.help.mk makefile. mk-configure itself uses this
framework, so, you can run "bmake help" before build. Also
introduce the following configuring variables for mk-configure:
USE_AWK, USE_ID, USE_INSTALL, USE_NM, USE_SH, USE_CC_COMPILERS,
USE_CXX_COMPILERS. See updated doc/INSTALL.md
- Add virtual targets "examples" in addition to "tests".
- Move helpers/* scripts to examples/helpers/ subdirectory. They
are for testing mk-configure only.
Mk files:
* C{,XX}FLAGS.{warns,ssp,pie,pic}, LDFLAGS.pie etc...:
Defaults for these values are determined at build time by
checking whether compiler/linker accepts the corresponding
option. Load compiler specific options from ~/.mk-c and
MKFILESDIR directories, and exit with error if they do not
exist. For generating such settings for compiler absent at build
time, use newly introduced script "mkc_compiler_settings".
* C{,XX}FLAGS:
Pass these flags to the compiler after C{,XX}FLAGS.warns
for overriding bad warnings/errors
* MKC_CHECK_{CC,CXX}_OPTS:
double underline symbols in the option is considered
as a single space
* MKC_CHECK_CUSTOM:
- pass MKC_CUSTOM_{CPPFLAGS,CFLAGS,CXXFLAGS,LDFLAGS,LDADD}.<check_name>
flags to the compiler
- introduce variable MKC_CUSTOM_NOAUTO.<checkname>
- introduce variable MKC_CUSTOM_CACHE.<checkname>
- introduce variable MKC_CHECK_CCLD_OPTS and MKC_CHECK_CXXLD_OPTS
* Introduce new variables CC_VERSION and CXX_VERSION determined
by mkc_check_compiler(1)
* Introduce INSTALL_FLAGS variables and remove undocumented
COPY, PRESERVE, INSTPRIV and RENAME
* Keep initial settings for mk-configure in sys.mk
instead of mkc_imp.vars.mk
* Introduce MKC_CUSTOM_LINK.<custom_check_name> variable for link testing
* Introduce CFLAGS.check and CXXFLAGS.check variables
* Set CFLAGS.dflt.sunpro to -errtags
* mkc.conf.mk: undefine MKC_CHECK_CC_OPTS, MKC_CHECK_CXX_OPTS after use
* Introduce new checks MKC_CHECK_CCLD_OPTS and MKC_CHECK_CXXLD_OPTS
* Introduce new "help" framework, see mkc_imp.help.mk section in man page
* mkc.minitest.mk: minor fix in target "cleandir"
Features:
- add support for C++ (extern "C") to all feature header files
- add new feature "libl" for libl.a or libfl.a
Utilities:
* mkc_install:
- "move" semantic is disabled forever, so flag -c is silently ignored
- add manual page
- flag -l is changed and becomes compatible with NetBSD install(1)
- actually it is almost completely reimplemented
* mkc_check_compiler:
- add man page
- exit status is 2, if bad option is specified
- CC defaults to "cc" as the documentation says
- detects not only compiler type, but also a version
- cache file name for C compiler type is _mkc_cc_type.*
* mkc_check_custom:
- switch to getopts
- add option -l and support for LDFLAGS and LDADD
- add new option -t and remove options -p and -n
- do not use CARGS anymore, use CFLAGS and CPPFLAGS instead
* mkc_which:
- add man page
* mkc_check_version:
- add man page
* mkc_get_deps:
- installed to libexec/ instead of bin/
Documentation update
Code clean-ups and minor fixes
======================================================================
Version 0.33.1, by Aleksey Cheusov, Wed, 22 Jan 2020 19:13:55 +0300
Clarify problems with MAKE_VERSION variable.
mkc_imp.foreign_autotools.mk: fix for incorrect make invocation for
generated Makefile.
Remove -Wabi from GNU c++ warnings.
mkc_check_decl: use autodetected AWK.
======================================================================
Version 0.33.0, by Aleksey Cheusov, Fri, 17 Jan 2020 21:56:16 +0300
Add new features "getdelim" and "strndup".
Fix MKC_CHECK_FUNCS<n> when MKC_FUNC_OR_DEFINE.<x> is "yes".
Fix awk in mkc_check_compiler. AWK is supposed to be replaced as
seen in Makefile.inc. This makes awk work correctly on solaris etc.
Thanks to Niclas Rosenvik!
Change the order of options passed to the C and C++ compiler. It
is: CPPFLAGS0, CPPFLAGS, CPPFLAGS_<project>, C{,XX}FLAGS,
C{,XX}FLAGS.ssp, C{,XX}FLAGS.pie, C{,XX}FLAGS.warns,
C{,XX}FLAGS_<project>, C{,XX}FLAGS.pic (for shared objects), COPTS,
COPTS_<project>.
scripts/mkc_check_custom: switch to /usr/xpg4/bin/sh on SunOS-5.10
Fixes in regression tests for Solaris 10 and 11.
examples/hello_libdeps: fix regression test on
Linux/mips64/eglibc-2.13.
======================================================================
Version 0.32.1, by Aleksey Cheusov, Mon, 6 Jan 2020 01:11:46 +0300
Fix MKC_CHECK_SIZEOF when having slashes in the header part.
Thanks to Niclas Rosenvik for the fix!
Fix support for .cxx c++ files in profiled and shared libraries.
Thanks to Niclas Rosenvik for the fix!
Fix in presentation/Makefile
Fix in mk-configure.7 man page
Fix at_do_* target
Remove $(COPTS) from $(CFLAGS) and change COMPILE.{c,cc}
Fix regression test examples/hello_errwarn on musl-based Linuxes (Alpine Linux)
======================================================================
Version 0.32.0, by Aleksey Cheusov, Wed, 1 May 2019 14:18:30 +0300
Calculate WARNERR and {CC,CXX}FLAGS.warnerr lazily. This makes some
interesting scenaria possible, for example, setting WARNS in
Makefile.common or Makefile.inc top-level files.
Feature "prog_gmake": fix fork-bomb seen on FreeBSD 12.0-RELEASE-p3
due to features of native make(1).
Fixes for builtins prog_gm4, prog_gmake, prog_gawk and prog_flex
(multiline output)
MKC_BUILTINS_*: fix find_n_match function in mkc_check_common.sh
Minor fixes in examples/hello_{yaxx,calc2}
Always apply -Werror=implicit-function-declaration for clang.
This fixes MKC_CHECK_FUNCS on clang-5.0.1 and earlier versions.
mkc_imp.foreign_autotools.mk: if AT_MAKE is empty set it to "false"
Get rid of builtin "endianess" (with single N)
mkc_check_common.sh: always use mkc_which(1) instead of which(1)
Updates for Lua code in examples/
BMAKE_REQD check: workaround for broken bmake (seen on Darwin) that
defines empty MAKE_VERSION
examples/hello_dictd/test.mk: avoid double-slash in dirs
======================================================================
Version 0.31.0, by Aleksey Cheusov, Sun, 7 Apr 2019 23:39:47 +0300
Fix in MKC_CHECK_PROTOTYPES. The problem was it says "found" for
undeclared prototypes.
All FEATURES now check for _MKC_CHECK_<xxx> define. A check for
this define guarantees that #include <mkc_XXX.h> are not used
without appropriate MKC_FEATURES += <xxx> in Makefile.
New publicly available mkc.conf.mk header was introduced. With a
help of it one can implement custom "FEATURES".
MKC_CHECK_HEADERS, MKC_CHECK_HEADER_FILES, MKC_CHECK_DEFINES,
MKC_CHECK_TYPES, MKC_CHECK_VARS, MKC_CHECK_MEMBERS,
MKC_CHECK_FUNCS<n>, MKC_CHECK_PROTOTYPES, MKC_CHECK_SIZEOF and
MKC_PROTOTYPE_HEADERS.<name> now accepts a list of comma-separated
headers for checking at once.
For example, on NetBSD sys/fts.h requires preceding sys/types.h and
sys/stat.h. So, now we can write
MKC_CHECK_HEADERS = sys/types.h,sys/stat.h,fts.h
MKC_CHECK_FUNCS<n>: new variable MKC_FUNC_OR_DEFINE.<func> was introduced.
With a help of it one can check for
function declaration of equivalent define.
mkc_imp.conf-final.mk: duplicated entries are not added to CPPFLAGS,
CFLAGS, LDADD and SRCS.
Man page for mkc_check_decl, mkc_check_sizeof and mkc_check_headers
were updated.
mkc.minitest.mk: new variable MKC_DIFF was introduced for diff(1)
command.
mkc_check_decl: new check type funcordefine was introduced.
Improvements and minor fixes in regression tests and examples.
This release was sucessfully tested on FreeBSD-11.1, diverse
glibc-based Linuxes, NetBSD-8.99, OpenBSD-6.4 and SunOS-5.11.
Deprecated features were removed: DPLIBS and PKG_CONFIG_DEPS variables,
builtin "endianess".
======================================================================
Version 0.30.0, by Aleksey Cheusov, Tue, 6 Mar 2018 21:49:02 +0300
Variables MKC_{CHECK,REQUIRE}_HEADER_FILES were introduced.
Improvements and addons to regression tests.
Improvements and minor fixes in mkc_check_{header,decl,funclib,sizeof}
This may fix checking failure if -Werror=strict-prototyping
is passed to CFLAGS.
OBJDIR_<project> is now set correctly if MAKEOBJDIRPREFIX is set.
======================================================================
Version 0.29.3, by Aleksey Cheusov, Wed, 22 Nov 2017 20:38:18 +0300
Fix build failure (mkc_check_prog not found).
Thanks a lot to Mykola Golub for pointing out!
======================================================================
Version 0.29.2, by Aleksey Cheusov, Sun, 19 Nov 2017 15:51:45 +0300
Fix MKC_FEATURES "fgenln"
mkc_check_common.sh is installed to libexec directory
======================================================================
Version 0.29.1, by Aleksey Cheusov, Wed, 11 Nov 2015 00:35:49 +0300
FIX: features "progname", "warn", "err" and "fgetln" as well as
_mkcfake.c file were added to the list of installed ones.
======================================================================
Version 0.29.0, by Aleksey Cheusov, Sun, 30 Nov 2014 15:35:42 +0300
mkc.configure.mk:
- New variables MKC_CHECK_CC_OPTS and MKC_CHECK_CXX_OPTS were
introduced for checking C/C++ compiler's options
Makefile.inc and Makefile.common are included after system variables
are set, in particular CC and CXX.
CC_TYPE is now set in mk.init.mk
Fixes for "err" and "warn" features. Now verr(3), verrx(3),
vwarn(3) and vwarnx(3) functions are detected correctly (the problem
was seen on gcc-4.9/armv7).
Fix support for COMPATLIB. Objects for "features" should not be
generated outside compatibility library.
A number of fixes in regression tests: support for latest GCC,
lib64 and lib/tri-ple-ts Linuxes.
mkc_check_custom:
- new option -e was introduced for checking stderr for emptyness
- new option -b was introduced for printing yes/no instead of 1/0
- additional options to compiler are passed via CARGS env. variable.
======================================================================
Version 0.28.0, by Aleksey Cheusov, Sun, 14 Sep 2014 14:52:34 +0300
LIBDEPS, STATICLIBS, DPLDADD, DPLIBDIRS and DPINCDIRS variables were
introduced. With their help one can specify library dependencies in
the top-level Makefile. Users are also able to build some libraries
statically even if they were designed to be a dynamic libraries.
New variable FOREIGN was introduced. With its help one can embed
autotools-based projects (as a subproject) to mk-configure-based once.
See mkc_imp.foreign_autotools.mk section in man page for details.
Support for Darwin was fixed. Nowadays it uses clang.
New features were introduced:
- "progname" for setprogname(3) and getprogname(3) BSDisms;
- "err" for err(3), errx(3), verr(3) and verrx(3) BSDisms;
- "warn" for warn(3), warnx(3), vwarn(3) and vwarnx(3) BSD-isms;
- "fgetln" for fgetln(3) BSD-ism;
Support for Haiku was fixed. It does not support hard links
and uses LIBRARY_PATH.
LDCOMPILER variable was removed.
Compiler is always used for linking.
New builtin "prog_gmake" was introduced which search GNU make.
INTERNALLIBS variable was introduced. With its help one can
implement libraries common for several subprojects.
COMPATLIB variable was introduced. It is ideal solution for
portability code.
MKC_FEATURES: all objects are removed by target "clean"
Target "errorcheck" was added to ALLTARGETS. Therefore it also have
pre_, do_, post_ counterparts.
VARDIR, SHAREDSTATEDIR, SUBPRJSRCTOP, CPPFLAGS0 variables were introduced.
MKC_SOURCE_FUNCSLIBS: .o{s,p} objects are also removed by target "clean"
Hardcoded /etc/mk.conf is not included anymore. New mk-configure
specific configuration file @sysconfdir@/mk-c.conf was introduced.
Additions to doc/NOTES
.depends is added to DISTCLEANDIRS only for non-empty SRCS
mkc_imp.intexts.mk: new error type for odd tokens in INTEXTS_REPLS
MKDEP_CC is shquoted when passed to mkdep(1) as CC.
Code clean-ups, more regression tests.
This release was sucessfully tested on the following platforms.
NetBSD-6.1/x86_64/gcc-4.5, FreeBSD-9.0/i386/gcc-4.2,
OpenBSD-4.9/i386/gcc-4.2, DragonFlyBSD-3.4/x86_64/gcc-4.7,
Darwin-14.0/x86_64/clang-600.0.53, SunOS-5.11/i86pc/gcc-4.7,
SunOS-5.10/sparc/{gcc-4.8,SunStudio-12.3}, diverse
Linux-es/{gcc,icc-12.1,SunStudio-12.3}, Haiku/gcc-4.8.
======================================================================
Version 0.27.0, by Aleksey Cheusov, Sun, 13 Jul 2014 17:03:12 +0300
Fix pkg-config support (github issue #8).
Thanks to Andrew Shadura for the report.
Fix support for mixed C/C++ projects.
Fixes for Interix and Cygwin where users and groups may have spaces.
Thanks to Michael Crogan for the report.
Fix in mkc_imp.f_SLIST.mk (we have to restore original MKC_NOAUTO)
mkc.lib.mk:
- MKPIE=yes also turns on PIC
pre_*, do_* and post_* targets were introduced. ALLTARGETS was
introduced which lists all targets with pre_/do_/post_
counterparts.
examples/hello_superfs:
- new interesting feature proposed by Michael Crogan
As makedepend(1) is broken on Linux, {b}mkdep(1) is used for
generating .depend by default.
mkc_install:
- new option -l for symlinking
- fixes for files and directories with spaces
======================================================================
Version 0.26.0, by Aleksey Cheusov, Mon, 3 Feb 2014 00:32:51 +0300
"Features" framework was implemented (variable MKC_FEATURES). In
general, a feature is something that has problems with
portability. This may be a function name or header missing on some
platforms, for example. What developer needs to do is to add
FEATURENAME to MKC_FEATURES variable and add #include
<mkc_FEATURENAME.h> where it is needed. Internally, system
requiremets are checked in the automatically included
mkc_imp.f_FEATURENAME.mk file and all required actions (includes,
define checks etc.) are made in mkc_FEATURENAME.h header file.
Currently the following features are provided: strlcat, strlcpy,
getline, libm, libdl, RB, SPLAY, SLIST, SIMPLEQ, STAILQ, LIST, TAILQ
and CIRCLEQ. Original idea was stolen from pkgsrc.
mkc_imp.pkg-config.mk:
- New variables MKC_CHECK_PKGCONFIG and MKC_REQUIRE_PKGCONFIG were
introduced. They work just like other MKC_{CHECK,REQUIRE}_*
variables from mkc.configure.mk. Thanks to Andrew Shadura for
pushing me to this direction.
mkc.configure.mk:
- MKC_{CHECK,REQUIRE}_PROTOTYPES were introduced. With their help
mk-configure is able to check C function prototypes. This
feature was proposed by Andrew Shadura.
If ${MKC_CACHEDIR} does not exit, it is automatically created.
${SRCTOP}/Makefile.common is included by all subprojects if it
exists. It can be used as a replacement or addition for
../Makefile.inc.
Valiables SRCDIR_<dir>, SRC_PATHADD, MKC_SOURCE_DIR, LDFLAGS0 and
LDADD0 were introduced.
Wrongly named builtin 'endianess' was renamed to 'endianness'.
Thanks to Andew Shadura for the report and fix!
mk-configure itself is now 2-level project.
This allows me to run an arbitrary regression test like the following
bmake test-examples/hello_world
Hurray! :-)
mkc.subprj.mk:
- Now it works correctly if NOSUBDIR is not empty.
Also, NOSUBDIR affects NODEPS and therefore the dependency graph.
- New target "print-deps" that outputs the dependency graph was
introduced.
-O is added to CFLAGS if USE_FORT==yes, seen on Linux/ppc64/gcc
Documentation: clean-ups, grammar fixes, minor improvements.
Fix. Some @@ patterns in mk-configure.7 should not be replaced with
directories. Thanks to Andrew Shadura for the report!
This release was successfully tested on the following platforms:
NetBSD-6.1/amd64, FreeBSD-8.3/amd64, OpenBSD-{4.9,5.3}/x86,
DragonFlyBSD-3.4/x86, Linux/{x86,amd64}, SunOS-5.10/sparc,
SunOS-5.11/x86.
======================================================================
Version 0.25.0, by Aleksey Cheusov, Wed, 1 Jan 2014 19:28:55 +0300
Build infrastructure for mk-c itself was completely reimplemented.
Now it looks much better and is more flexible for further extensions.
NetBSD version of mkdep(1), traditional BSD mkdep(1) or
makedepend(1) is needed at build time.
LDCOMPILER defaults to "yes".
Variable TARGETS is now visible to users and is documented. It
contains all recursive targets and may be used for adding user's
functionality to mk-c.
FIX: Parallel installation ("mkcmake install -jN") now works
correctly. "installdirs" is activated before "install". Report by
Michael Crogan.
During build object directories are created automatically by default
when MAKEOBJDIR or MAKEOBJDIRPREFIX are set. New recursive target
"obj" and variable MKOBJDIRS were introduced.
Report by Michael Crogan.
New variable MKRELOBJDIR was introduced. With its help one can
create object directories relative to top-level object directory
(like MAKEOBJDIRPREFIX but without top-level ${.CURDIR} in paths).
Thanks to Michael Crogan.
target "depend":
- FIX. Original implementation relied on NetBSD version of
mkdep(1). So, it didn't work on Linux, FreeBSD and others with
original BSD mkdep(1). Type of mkdep(1) is detected at
mk-configure build time. Report by Michael Crogan.
New variables LN, LN_S, MKDIR, RM, CLEANFILES_CMD, CLEANDIRS_CMD,
UNINSTALL, MAKEDEPEND, OBJTOP, CC_PREFIX, CXX_PREFIX were
introduced.
New variable NODEPS was introduced. With its help one can cut off
the dependency graph for particular targets.
New variable BMAKE_REQD was introduced.
New variable SRCTOP was introduced. With its help
"mkcmake -C subdir target" may work just like "mkcmake target-subdir".
New variables CFLAGS.dflt.${CC_TYPE} and CXXFLAGS.dflt.${CXX_TYPE}
were introduced. They default to -Qunused-arguments
for clang and clang++.
mkc.init.mk can be invoked by users directly for setting all
required variables and further checks (CC_TYPE, LD_TYPE, OPSYS etc.).
mkc_imp.links.mk:
- This module was reimplemented from scratch.
Bug with parallel installation (LINKS and MLINKS) was fixed.
mkc.minitest.mk:
- new variable TEST_PREREQS was introduced.
mkc_imp.inc.mk: fix for ${INCS} installation problem happened when
headers are built in ${.OBJDIR}. Report by Jan Smydke.
mkc_imp.info.mk:
- fix for MKINSTALL=no. "installdirs" unexpectedly created target
directories.
mkc.configure.mk:
- fix issue with MKC_CHECK_CUSTOM when ${.OBJDIR} != ${.CURDIR}
- MKC_CHECK_PROGS: PROG.<prog> is set even if full path was
specified. In addition existence and executability of the
specified file is always checked.
- fix for MKC_SOURCE_FUNCLIBS. Not all objects were cleaned
correctly by target "clean". Now objects are added to CLEANFILES
unconditionally.
- negative results for MKC_REQUIRE_* are not cached. This gives
users ability to fix the problem by changing the environment
and try again.
- MKC_CHECK_BUILTINS. Additional builtin checks were added:
"prog_mkdep" and "prog_nbmkdep" for original BSD mkdep(1) and
NetBSD version of mkdep(1) respectively.
mkc_imp.intexts.mk fixes:
- Targets "clean" and "cleandir" do not fail anymore if INTEXTS_REPLS
contains empty variables.
- Target "all" works correctly if INFILES or INSCRIPTS contain
files with directories.
mkc.sub{dir,prj}.mk:
- ${MAKEFLAGS} is passed to recursive ${MAKE}s.
- {nodeps-,subdir-,}dir:T are also targets, that is, one can also
use the last component of subdirectory as_a_part_of/as_a_whole
target. If you want to disable this, set SHORTPRJNAME to "no".
mkc_imp.subdir.mk was reimplemented using mkc_imp.subprj.mk
mkc_imp.dep.mk:
- documentation for this module was added.
- support for SHRTOUT=yes
- new variable DPSRCS was introduced
- MKDEP_SUFFIXES also contains .os and .op. Report by Michael Crogan.
- Target "clean" does not remove .depend and .d files.
Target "cleandir" does. NetBSD mk files work the same way.
Report by Michael Crogan.
MKPIE/SHLIB_*:
- s/-KPIC/-xcode=pic32/ for SunStudio compilers
MKSSP=yes:
- Support for IBM XL Compiler was added (not tested due to lack of such iron)
- Support for Intel C/C++ Compiler was added
Documentation fixes, updates and improvements. A lot of new
examples/. A lot of new regression tests.
Tools:
Long option --help was removed from all utilities
- mkc_install:
- fix for problem with parallel "installdirs" (race condition).
- Options -t and -b were removed.
- mkc_check_prog: option -i is documented in man page
- mkc_check_compiler: workarounds for buggy SunStudio C++
compiler ("CC -E -" exits with error).
All test are run with MKCATPAGES=no by default.
myprojects.pdf: pipestatus also uses mk-configure.
======================================================================
Version 0.24.0, by Aleksey Cheusov, Fri, 8 Mar 2013 13:18:00 +0300
mkc.sub{dir,prj}.mk:
- support for subprojects containing / symbol was added. In
OBJDIR_<dir> variable slashes are replaced with underlines.
In addition OBJDIR_<dir:T> variable is set.
- now also run the target "errorcheck"
- now work correctly with non-empty MAKEOBJDIR
and MAKEOBJDIRPREFIX.
Minor improvements in examples/*/linkme.mk
DPLIBS is deprecated, use LDADD instead.
${MKC_SOURCE_FUNCLIBS}.o is added to CLEANFILES if it is set.
Minor fixes in mkc_imp.lua.mk (LUA_MODULES vs. LUA_LMODULES).
Some improvements and fixes in man page and FAQ.
Thanks to Jeremy Reed, Min Sik Kim and Jan Smydke.
======================================================================
Version 0.23.0, by Aleksey Cheusov, Sun, 22 Jul 2012 14:06:06 +0300
mkc.subprj.mk:
- Support for "virtual" subproject was added. Subprojects listed
in SUBPRJ and SUBPRJS_DFLT are not necessarily associated with
a subdirectory. See examples/hello_superfs for example.
Virtual subproject is a way to group several subprojects into
new one.
New variables were introduced: COPTS_<proj> OBJCOPTS_<proj>
LDADD_<proj> LDFLAGS_<proj> CPPFLAGS_<proj> CXXFLAGS_<proj>.
See the manual page for details.
Fix: OBJDIR_<subdir> variables now always contain full paths.
Fix in mkc_which(1). Now it differs directories and regular files.
Minor fixes in regression tests for EXPORT_SYMBOLS.
mkc.lib.mk:
- SHLIB_MINOR unconditionally defaults to 0
More slides in .pdf presentation:
- cross-compilation
- EXPORT_SYMBOLS
Fixes for Pascal support
Minor fixes in the man page
======================================================================
Version 0.22.0, by Aleksey Cheusov, Fri, 9 Mar 2012 20:26:34 +0300
Improvements in cross-compilation. The following variables were
introduced: TOOLDIR, SYSROOT, TOOLCHAIN_PREFIX and
MACHINE_GNU_PLATFORM.
PROGS variable was introduced (sf.net bug #3445658).
Support for Lua submodules was added (e.g. net.socket.lua ->
net/socket.lua). New variable LUA_MODULES was introduced for this
purpose.
MKPIE (Position Independent Executables), USE_SSP (Stack Smashing
Protection), USE_FORT and USE_RELRO variables were introduced for
security reasons.
Variable OBJDIR_<dir> was introduced.
mkc.subdir.mk and mkc.subprj.mk: Commands associated with targets
"all", "install", "clean", "cleandir", "depend", "test",
"installdirs", "uninstall", "errorcheck" and "filelist" in Makefile
override the standard behaviour.
MKC_REQUIRE_HEADERS, MKC_REQUIRE_DEFINES, MKC_REQUIRE_TYPES,
MKC_REQUIRE_VARS, MKC_REQUIRE_MEMBERS, MKC_REQUIRE_FUNCS<n> and
MKC_REQUIRE_CUSTOM do not change CFLAGS.
mkc.subdir.mk and mkc.subprj.mk: "cleandir" target takes into
account CLEANFILES, CLEANDIRS, DISTCLEANFILES and DISTCLEANDIRS
variables (removes files).
PCNAME.<lib> variable was introduced in mkc_imp.pkg-config.mk, this
is a map from library name to pcname (.pc).
Improvements for SHRTOUT.
New variable OBJCOPY was introduced.
Update of the presentation.
Fix in manual page (sf.net bug #3441610).
New regression tests (examples).
======================================================================
Version 0.21.2, by Aleksey Cheusov, Sat, 22 Oct 2011 01:50:05 +0300
mkc_check_compiler has been reimplemented. This fixes problems
on system with /bin/sh == bash (affected versions: 0.21.1)
and makes it drammatically faster.
======================================================================
Version 0.21.1, by Aleksey Cheusov, Tue, 13 Sep 2011 11:28:26 +0300
Target "errorcheck" ("configure") cannot work in parallel.
Fix bug appeared in parallel builds (make -j).
Thanks to Alexander Nasonov.
Support for IRIX64 and Haiku was implemented.
PDF presentation update
Minor clean-ups
======================================================================
Version 0.21.0, by Aleksey Cheusov, Sun, 24 Oct 2010 17:47:19 +0300
Support for clang compiler was implemented.
Documentation and presentation were updated. There are new projects
using mk-configure.
mkc_install is always used for installing mk-configure.
This simplifies an installation process on non-BSD platforms.
WARNS variable: support for icc was added.
New variable LEXLIB library responsible for -ll/-lfl was introduced.
See examples/hello_calc2.
mkc_check_compiler: in order to differentiate icc from gcc, a check
for Intel C/C++ compiler is run first.
New target "filelist" that outputs a list of files for the whole
project was introduced.
Makefile: mk-configure's mk files are unconditionally installed to
its own directory in order to avoid potential conflicts with
system-wide sys.mk on BSD platforms.
mkc.configure.mk: HAVE_FUNCLIB.main is always set to 1.
mkc_check_funclibs is not run for checking presense of function
"main" in libc.
New variable MKCHECKS was introduced.
Useless rule ".sh:" was removed.
======================================================================
Version 0.20.0, by Aleksey Cheusov, Sun, 19 Sep 2010 21:46:25 +0300
New variable PROJECTNAME, see the manual page.
New variable EXPORT_DYNAMIC for making all symbols in executable
visible to linked or dlopen'ed libraries. It is supported on *BSD,
Linux, SunOS, QNX, Interix, OSF1, HP-UX.
New variable CFLAGS.pic. See the manual page.
EXPORT_SYMBOLS: On systems using GNU ld, i.e. *BSD, Linux, QNX
etc. 'ld --version-script' is used in order to specify a list of
exported symbols instead of --retain-symbols-file
Lua support:
- Lua support didn't work properly if only one of LUA_LMODULES or
LUA_CMODULE were specified. Now it is fixed.
- New regression test examples/hello_lua2.
- Force building Lua modules with .so extension.
Darwin:
- support for EXPORT_SYMBOLS was added
- DLLs (MKDLL=yes) are built as bundles and have .bundle extension
/usr/bin/install is used as INSTALL only on *BSD platforms. On all
others mkc_install is used.
Interix:
- 775:664 permissions are used only for +Administrator user.
- "installdirs" target creates directories with 775 permission if
needed.
OSF1:
- better handling the so_location files.
mkc_imp.arch.mk:
- PROJECTNAME variable is used for creating archives and .deb
package.
======================================================================
Version 0.19.0, by Aleksey Cheusov, Fri, 3 Sep 2010 23:19:44 +0300
FIX: LPREFIX, YPREFIX and YHEADER now works as
documented. Regression test for them is added.
As of this release target "install" creates target directories by
default, i.e. it envokes target "installdirs" before installing
files. For disabling this behaviour, you may set MKINSTALLDIRS
variable to "no".
mkc.lib.mk:
- New variable EXPORT_SYMBOLS for exporting (in shared object
library) only specified symbols. At the moment the following
platforms support this: Solaris and those using GNU ld,
that is *BSD and Linux.
- "ld -h" is enabled on Solaris.
mkc.subdir.mk and mkc.subprj.mk:
- Two new variables: EXPORT_VARNAMES and NOEXPORT_VARNAMES for
exporting variables before building subprojects. By default
MKC_CACHEDIR is exported. As a result _mkc_* cache files will
be placed in one directory for all subprojects.
- New variable NOSUBDIR for excluding specified subprojects from
build. Useful side effect: by using this variable you may
disable some regression tests while running "bmake test".
- Makefile.rec file if present is included by ALL subprojects
recursively. See tests/rec_makefiles.
mkc.subprj.mk:
- New target subdir-<trg>-<subdir>, synonym for
nodeps-<trg>-<subdir>.
mkc.configure.mk:
- MKC_CHECK_PROGS: mkc_check_progs is not called if path to
program is absolute.
mk-configure.7 shows in <> typical place where variables shall be used.
On Solaris LD=/usr/ccs/bin/ld by default.
On OSF1 LD=/usr/bin/ld by default.
On QNX mkc_install is used as install program by default.
mkc_check_custom:
- FIXED: ambiguous arguments of command "test" (seen on QNX)
regression tests:
- New test examples/hello_plugins replacing
examples/hello_dlopen and examples/hello_dll
- New test examples/hello_calc
======================================================================
Version 0.18.0, by Aleksey Cheusov, Tue, 27 Jul 2010 21:06:56 +0300
Several new variables are introduced:
- LUA_LMODDIR and LUA_CMODDIR - installation directories
for Lua modules written in Lua and C.
- MKC_VERSION is now documented.
- MLINKS now works just like in NetBSD.
- CFLAGS.warns.<cctype>.<warn-level> and
CXXFLAGS.warns.<cctype>.<warn-level> are now documented.
Feel free to set them in sys.mk before installation.
- WARNERR for forcing warnings to be reported as errors.
New targets are introduced: bin_tar, bin_targz, bin_tarbz2,
bin_zip and bin_deb for creating archive files or .deb
package containing an installation image (Ex:
examples/hello_files). This also introduces new variables: TAR,
GZIP, BZIP2 and ZIP.
Documentation:
- Just a few notes about cross-compilation in mk-configure.7
- New slides, fixes and improvements in doc/presentation.pdf
- README: feel free to edit sys.mk before installation
- README: a few notes about tools used for development.
Support for POD (Plain Old Documentation) is added
(.pod.1, ..., .pod.9 and .pod.html suffix rules).
New variables for this: POD2MAN, POD2MAN_FLAGS, POD2HTML
and POD2HTML_FLAGS. Ex: examples/hello_xxzip
../Makefile.inc is included automatically if exists just like
in NetBSD. Ex: hello_superfs.
.ORDER: installdirs install. This should fix -j<N> problem.
Thanks to FreeBSD buys,
swell.k at gmail.com and Mikolaj Golub
WARNS: add support for HP-UX C/C++
all:${FILES} ${MAN} etc. for the case when FILES are generated.
Thanks to Jan Smydke.
New examples (regression tests): hello_superfs, hello_xxzip.
======================================================================
Version 0.17.0, by Aleksey Cheusov, Tue, 22 Jun 2010 23:44:08 +0300
mkc_imp.pkg-config.mk:
- FIXED: double applying -L, -l and -I options got from pkg-config.
Solution: .unset PKG_CONFIG_DEPS
- Additional checks for INSTALL_{C,L}MOD pkg-config variables,
they must be defined.
CC_TYPE, CXX_TYPE and LD_TYPE variables are a part of mk-c's API,
now they are documented.
mkcmake:
- MKC_BMAKE environment variable is introduced. See mkcmake.1
Documentation for /etc/mk.conf, @sysconfdir@/mk.conf and MAKECONF.
doc/presentation.pdf: New slides and updates
FAQ: updates
mkc_imp.lua.mk:
- Check for lua.h header if other checks succeeded.
mkc_imp.lib.mk:
- MKDLL is also case-insensitive.
Makefile:
- make shipped with NetBSD-5 does not have option -C,
so I remove it.
======================================================================
Version 0.16.0, by Aleksey Cheusov, Sat, 12 Jun 2010 15:06:10 +0300
Support for Lua programming language. See documentation for
mkc_imp.lua.mk in mk-configure(7).
mkc.pkg-config.mk:
- Significant improvements! For details see
mk-configure(7) manual page and examples/hello_glib2 example.
New supported variables: PKG_CONFIG.exists.<lib>, PKG_CONFIG_VARS.<lib>
and PKG_CONFIG.var.<lib>.<var>.
- becomes internal include file and therefore
renamed to mkc_imp.pkg-config.mk. Symlink mkc.pkg-config.mk is
provided for backward compatibility. mkc_imp.pkg-config.mk is
included by mkc.prog.mk and mkc.lib.mk.
mkc.intexts.mk:
- becomes internal include file and therefore
renamed to mkc_imp.intexts.mk.
Symlink mkc.intexts.mk is provided for backward compatibility.
It is included from mkc.prog.mk, mkc.lib.mk and mkc.files.mk.
- New variable INTEXTS_REPLS. See mk-configure(7).
mkc.lib.mk:
- includes mkc_imp.intexts.mk
- supports SCRIPTS* variables (includes newly created mkc_imp.scripts.mk)
- New variable MKDLL for creating dinamically loaded libraries (<lib>.so).
mkc_imp.subprj.mk:
- New variable SUBPRJ_DFLT. See mk-configure(7).
mkc.*.mk try to open ${MAKECONF}, @sysconfdir@/mk.conf and /etc/mk.conf.
This is now documented.
mk-configure.7 is reorganized. Several internal include files
document their own variables. Further improvements of man page are
needed.
All boolean variables becomes case-insensitive.
That is "no", "No", "NO" and "nO" are equal.
The same for "yes", "Yes"...
mkc_check_custom(1):
- New options: -p, -n, -m and -s.
Minor fixes and clean-ups in .mk files, tools and regression tests.
New regression tests and examples.
======================================================================
Version 0.15.1, by Aleksey Cheusov, Fri, 28 May 2010 22:39:36 +0300
FIX: in version 0.15.0 mkc.subprjs.mk was added, but it was not
installed because I forgot to add it to Makefile. Now it is
installed just like all other *.mk files.
FIX: 'all : errorcheck' is not for bsd.subdir.mk and bsd.subprj.mk
mkc.subprjs.mk has been renamed to mkc.subprj.mk.
mkc.subprjs.mk is installed as a symlink.
======================================================================
Version 0.15.0, by Aleksey Cheusov, Tue, 25 May 2010 22:52:28 +0300
New presentation for mk-configure is in doc/ subdirectory.
New top-level include file "mkc.subprjs.mk", more powerful
replacement for mkc.subdir.mk. It handles subprojects organized as a
dependency graph.
New variables are added: MKPICLIB, MKSHLIB, MKSTATICLIB and
MKPROFILELIB for building PIC, shared, static and profile libraries.
See mk-configure.7 for details.
MKPIC, MKPROFILE and MKPICINSTALL variables are removed. Use
MKPICLIB, MKSHLIB, MKPROFILELIB and MKINSTALL variables instead.
Implementation for variable "WARNS" (currently only for gcc).
New variable "SHRTOUT". If it is not "no", shortened formatted
messages are output about compiling, linking etc.
Manual page for mkcmake(1).
Target "depend" is added for generating .depend file.
Minor fixes in mkc_check_funclib.
Support for Cygwin is added (no support for shared libraries yet).
Clean-ups in target "clean".
More regression tests and examples.
Minor fix in mkc_imp.subdir.mk: do not run "installdirs" if MKINSTALL=no.
Internal target "error-check" is renamed to "errorcheck".
======================================================================
Version 0.14.0, by Aleksey Cheusov, Sun, 31 Jan 2010 16:37:21 +0200
Support for OSF1. Tested on Tru64-5.1/alpha with gcc and DEC C
compiler.
Support for HP-UX. Tested on HP-UX-11.0/hppa with gcc.
Support for DragonFlyBSD. Tested on DragonFlyBSD-2.4.1/x86 with gcc.
Support for MirOS BSD. Tested on MirBSD-10/x86 with gcc.
SHLIBMODE variable is introduced which sets a shared library mode.
FIX: mkc.subdir.mk now takes into account MKINSTALL variable.
Thanks to Mikolaj Golub for pointing out.
FIX: targets "installdirs" and "uninstall" now takes into account
MKINSTALL variable.
fix in mkc.minitest.mk: HP-UX's diff doesn't have -u flag, so I
remove it.
fix in mkc_imp.platform.sys.mk: CC/CXX type should be detected AFTER
setting CC/CXX variables.
mkc_check_compiler:
- support for DEC C compiler (OSF1/Tru64)
- minor fixes.
More regression tests.
======================================================================
Version 0.13.0, by Aleksey Cheusov, Sun, 27 Dec 2009 17:06:06 +0200
CC, CXX and LD types are automatically detected and options passed
to them (e.g. options for generating a position independent code or
options for building a shared library) depend on this type.
At the moment the following systems and compilers are supported:
- NetBSD. Tested under NetBSD-5.0/x86 and NetBSD-2.0/alpha with
gcc and pcc (Portable C compiler).
- FreeBSD. Tested under FreeBSD-6.2/x86, 7.1/spark64 and 7.1/x86
with gcc.
- OpenBSD. Tested under OpenBSD-3.8/x86 and 4.5/x86 with gcc.
- Solaris. Tested under Solaris-10/x86 and Solaris-10/spark64
with sunpro-11, sunpro-12 and gcc.
- Darwin (MacOS-X). Tested under Darwin-8.11.0/ppc (MacOS-X
Tiger) with native gcc.
- Interix. Tested under Interix-3.5/x86 with gcc.
- QNX. Tested under QNX-6.3/x86 with gcc.
- Partial support for AIX, HP-UX and Tru64 and their native
compilers and linkers. Support is not complete because I have
no access to "big iron". Any help? ;-)
If you don't see your favourite system/compiler here and want to
help me to improve mk-configure, feel free to contact
me. mk-configure needs your help! ;-)
The default directory for mk-files is ${PREFIX}/share/mkc-mk, where
an empty sys.mk is installed unless NOSYSMK is defined while
installation. See an explanation about this in README.
So called built-in checks are implemented. See MKC_CHECK_BUILTINS
variable. Built-in checks are checks provided by mk-configure. At
the moment the following checks are implemented: endianness,
prog_flex, prog_bison, prog_gawk, prog_gm4. See mk-configure.7 for
the documentation.
mkc.configure.mk:
- At the end of this file MKC_{REQUIRE,CHECK}_XXX variables as
well as MKC_{CFLAGS,LDADD,SRCS} are .undef-ed. This allows one
to .include mkc.configure.mk several times.
- This include file is activated automatically from mkc.prog.mk
and mkc.lib.mk. You need to .include mkc.configure.mk
explicitely only if postcheck actions are needed.
SCRIPTS variable can contain subdir/<script>s, they are installed
just as <script>s, i.e. subdir/ is silently stripped.
SCRIPTSDIR_subdir_<script> and SCRIPTSNAME_subdir_<script> can be
used for specifying an alternative destination path and filename.
If .l or .y source files are listed in SRCS variable, mk-configure
automatically checks weather ${LEX} and ${YACC} are available or
not. The same for .c/${CC}, .cpp|.cc|.cxx|.C/${CXX}, .f/${FC} and
.p/${PC}. In case of absense of appropriate tool bmake exits with
error on early stage.
MKC_CHECK_CUSTOM, MKC_REQUIRE_CUSTOM:
- HAVE_CUSTOM.xxx bmake's variables and HAVE_CUSTOM_xxx #defines
have been renamed to CUSTOM.xxx and CUSTOM_xxx respectively.
Formally speaking this breaks backward compatibility with
earlier mk-c releases.
- Support for checks written in C++ (.cc, .cxx, .C and .cpp) and
Fortran (.f) is added.
- Support for checks implemented as an executable program/script is added.
FIXES:
- mkc_imp.man.mk: useless TMACDIR and dependencies on tmac files
under /usr/share are removed
- mkc_check_decl:
void function() cannot 'return 0' (thanks to SunPro compiler!)
- If C++ source files are listed in SRCS, ${CXX} is used as a
linker both for executables and shared libraries.
- Linux, SunOS and lots of others have no "wheel" group. They use
"root".
- "make installdirs" should not create man/htmlN directories
unless MKHTML is set to "yes"
- mkc_imp.lib.mk: .so build rule must use ${LDFLAGS}
ADDED: mkcmake utility (trivial wrapper over bmake) which should be
used for building a software instead of bmake.
.c:, .f:, .l: and similar useless rules are removed. It is enough to
have .c.o:, .f.o:, .l.c etc.
Improvements for cross-compilation.
Lots of new regression tests:
mkc_check_common.sh:
if MKC_NOCACHE=1, tmp.c, tmp.o, tmp.exe and tmp.err are
removed.
Support for lex:
-ll is added to linker if needed.
mkc_check_compiler:
- Added support for the following compilers: IBM Visual Age, HP
cc/aCC, SunPro C/C++, Watcom, Borland, DEC C/C++ and Comeau C/C++
- New option '-x' for checking C++ compiler type.
mkc_which:
Accepts full paths. /path/to/program -> /path/to/program
In order to avoid confusion, position independent object files (.so)
have been renamed to .os. Also, .po has been renamed to .op.
mkc_imp.lib.mk:
- suffix rules for .cpp, widely used extension for C++ sources, are
added.
- LDCOMPILER variable is introduced, if "yes", compiler is used
for linking a shared library.
INCSSRCDIR variable is introduced, see the documentation.
mkc_install: New utility for platforms having no BSD compatible
install(1). INSTALL variable is set to mkc_install if needed.
mkc.intexts.mk is included from mkc.prog.mk and mkc.lib.mk
automatically just like mkc_imp.*.mk includes.
======================================================================
Version 0.12.0, by Aleksey Cheusov, Thu, 12 Nov 2009 17:58:09 +0200
mk-configure doesn't depend on external pkgsrc-mk-files anymore!
The only required thing is bmake itself. Everything else is inside
mk-configure tarball now (yes, I've forked mk-files. Lots of fixes,
clean-ups, reorganizations, additions, improvements, removals of
useless code...). Some interesting things were stolen from NetBSD
base system's mk-files. Do not rely on things you found in
NetBSD/pkgsrc/sjg mk-files or even mk-c sources! Only features
documented in mk-configure.7 will be supported.
A target "install-dirs" has been renamed to "installdirs".
Ask mkc.subdir.mk why ;-)
mkc.lib.mk:
- Commands for building a .so/.dylib shared library
is overridable by user (using bmake's "commands").
Shared libraries
- support for Darwin (.dylib and Apple's ld)
- support for Solaris (gcc + Solaris' ld)
- support for shared libraries is still terrible, more flexibility
is needed.
Variables:
- New variables CLEANDIRS and DISTCLEANDIRS.
- As of this release MKC_SHOW_CACHED defaults to 0.
- New variable MKINSTALL. You can use it for internal static libraries.
- New variable MKC_REQD. Minimal mk-configure version required. If
this check fails, an entire build fails.
- New variable USETBL. NOTE: It is "yes"/"no" variable.
- New variable MANZ. NOTE: It is "yes"/"no" variable.
- New variable SCRIPTSBIN that defaults to ${BINDIR}.
- HTMLDIR is introduced containing directry for .html pages
generated from manual pages. html pages are automatically
installed if MKHTML=yes.
- LDLIBS is not used anymore. Use LDADD for libraries.
- DISTCLEANFILES modifyable by user contains a list of files
removed by targets "cleandir" and "distdir"
- New variable NROFF_MAN2DOC.
Fixes:
- A target "uninstall" now works correctly with .cat files.
- configure.mk
Workaround for buggy 20081111 < bmake < 20090909.
See NetBSD BTS bin/41998:
/usr/bin/make: .for loop + ":" inside iter_var = bug
mk-configure:
- "make distclean" run at the root mk-c's directory really removes
all garbage.
- TONS OF NEW REGRESSION TESTS. If you are running an exotic platform,
run "bmake test" and send me results ;-)
mkc_check_prog (MKC_CHECK_PROG):
- Path to a found program is output instead of just "found" message.
mkc_check_compiler - new utility, not used in mkc.*.mk yet.
======================================================================
Version 0.11.1, by Aleksey Cheusov, Sat, 5 Sep 2009 17:25:18 +0300
fixed: path to awk in mkc_check_version script
======================================================================
Version 0.11.0, by Aleksey Cheusov, Sat, 5 Sep 2009 15:26:01 +0300
mk-configure(7)
Simon Gerrary's mk-files is not supported anymore.
Use pkgsrc mk-files!
Regression tests have been reorganized and significantly improved.
All examples become regression tests. Lots of new tests.
Run 'bmake test' to run them.
mk-configure uses its own mkc.*.mk scripts to build and install
itself. As a result Free/OpenBSD make cannot be used anymore for
building and installations. Use bmake!
ADDED: FAQ document to answer frequently asked questions.
Thanks to Michael Shigorin for corrections.
New simple module for regression tests: mkc.minitest.mk. Besides
its simplicity it is quite useful. mk-configure uses it for testing
itself.
Initial version of mkc.pkg-config.mk module
See examples/hello_glib2 for the sample of use.
Note that it is not complete yet.
mkc.configure.mk and configure.mk:
- checks are not run if appropriate HAVE_xxx.yyy variable is
already defined. This makes possible to effectively build
software in a well defined stable environment.
Ex: bmake -f predefined_settings.mk -f Makefile all
- ADDED: MKC_CHECK_TYPES for checking for types.
See the documentation in configure.mk.in and examples/.
- ADDED: MKC_CHECK_CUSTOM for custom user's checks.
Custom check is a user's code.
Check itself -- is this code compilable or not.
See the documentation in configure.mk.in and examples/.
- Behaviour of MKC_CHECK_MEMBERS changed: Now "struct " prefix
is not hardcoded. This gives an ability to check members in
struct-s, enum-s and typedef-s.
- NEW: MKC_REQUIRE_HEADERS, MKC_REQUIRE_FUNCLIBS,
MKC_REQUIRE_DEFINES, MKC_REQUIRE_TYPES, MKC_REQUIRE_VARS,
MKC_REQUIRE_MEMBERS, MKC_REQUIRE_CUSTOM and
MKC_REQUIRE_FUNCS<N>. If these checks failure, bmake exits
with error and prints an error message. See configure.mk.in
for the documentation and examples/ for the samples of use.
- NEW: MKC_CHECK_PROGS and MKC_REQUIRE_PROGS.
See configure.mk.in for the documentation and
examples/ for the samples of use.
- NEW: targets "distclean" and "cleandir" removes _mkc_* cache files.
- NEW: target "configure" runs all checks
and creates _mkc_ cache files.
- all checks are disabled for targets "clean", "cleandir" and
"distclean".
- Cache file names changed. Now they are:
_mkc_type_<type>, _mkc_sizeof_<type>, _mkc_header_<header>,
_mkc_funclib_<funclib>, _mkc_funcN_<func>,
_mkc_variable_<variable>, _mkc_custom_<custom-check>,
_mkc_prog_<progname>, _mkc_define_<define>, _mkc_member_<member>
mkc.info.mk and mkc.man.mk are removed. They are included automatically
from mkc.prog.mk, mkc.lib.mk and mkc.files.mk if needed.
mkc.prog.mk, mkc.lib.mk, mkc.files.mk and mkc.subdir.mk:
- NEW: target "uninstall" is supported.
- performance improvements. "Hard" sections of mkc.common.mk are
activated if and only if appropriate target is in action.
- FIX: target "install-dirs" now works correctly with MAN
containing .N pages where N is not 1.
- FIX: target "install-dirs" now takes into account LINKS and
SYMLINKS.
- Better support for TEXINFO:
- "uninstall" target takes TEXINFO into account.
- "clean" target removes generated .info files.
- mkc.{prog,lib,files}.mk supports a target "test". By default
it does nothing. The target "test" of mkc.subdir.mk runs
'bmake test' for each SUBDIR. If you want to define your own
"test" target overriding the default one, define it in your
project's Makefile before any .include <mkc.*.mk> directive.
- MKC_REQD variable
Makefile of mk-configure: README, NEWS, TODO, FAQ and LICENSE
files are also installed unless EXTRAFILES is set to an empty string.
"mkc_check_sizeof" and "mkc_check_decl type" don't create cache
files with spaces in its name anymore. Space inside a filename is
replaced with symbol ~ (tilde).
FIXED: mkc_check_custom, mkc_check_decl, mkc_check_funclib,
mkc_check_header and mkc_check_sizeof failed if CC contains space.
Thanks to Vitaly Lipatov for the report.
mkc_check_sizeof now works drammatically faster.
MKHTML defaults to "no".
mkc_check_sizeof, mkc_check_custom:
- fixes for problems with Solaris' /bin/sh
Other fixes and improvements.
======================================================================
Version 0.10.0, by Aleksey Cheusov, Sun, 31 May 2009 14:54:10 +0300
mkc.configure.mk:
New: MKC_CHECK_MEMBERS, mechanism for checking for structure
members. Regression tests for this new feature. Man page update
for mkc_check_decl. See the documentation for MKC_CHECK_MEMBERS
in configure.mk file.
Fix: HAVE_FUNCN.funcname.dir.header_h ->
HAVE_FUNCN.funcname.dir_header_h
New: Support for HAVE_VAR.varname.dir_header_h (dir/header.h!)
New: Support for HAVE_DEFINE.defname.dir_header.h (dir/header.h!)
New: MKC_COMMON_DEFINES.`uname -s`, e.g. MKC_COMMON_DEFINES.NetBSD,
MKC_COMMON_DEFINES.Linux etc.
"install-dirs" now work fully correctly, i.e. creates
all required directories.
New variable DPLIBS for listing -llibs for linking. Use DPLIBS
instead of LDADD for linking with local libraries.
See examples/8/hello/Makefile.
mkc_check_decl:
workaround for buggy ksh and FreeBSD /bin/sh.
======================================================================
Version 0.9.0, by Aleksey Cheusov, Sun, 29 Mar 2009 16:53:57 +0300
Huge amount of changes were made since previous release. Now
mk-configure provides a number of mkc.*.mk scripts working on top of
pkgsrc's mk files or Simon Gerraty's mk-files and therefore provides
a replacement not only for GNU autoconf but for GNU automake too.
It makes sense to reread README file.
Lots of new information is there.
Lots of examples (yes, hello_worlds applications :-) ) were created
in examples/ subdirectory.
Lots of new mkc.*.mk files were added. They work on top of bsd.*.mk
files and provide new functions. See README.
Regression tests were added. Thanks to them a number of bugs were
detected and fixed.
Fixes in configure.mk:
- s/return/exit/ in ${.OBJDIR}/.error-check section.
This bug is seen under Linux/bash.
- bmake's variable SIZEOF.long_long was not set correctly
(long-long din't work)
- MKC_CHECK_SIZEOF+=type:header.h
bmake's variable SIZEOF.<type>.<header_h> is set
instead of plain SIZEOF.<type>
- MKC_CHECK_HEADERS += dir/hdr.h
bmake's variable: s/HAVE_HEADER.dir.hdr_h/HAVE_HEADER.dir_hdr_h/
(`.' vs. `_')
I hope this is a last change in configure.mk's API.
My own mkc.intexts.mk bmake module (mk file).
configure.mk:
If CHECK_SIZEOF_xxx check fails, MKC_CFLAGS is not changed. Only
sucessful data type sizes are registered in MKC_CFLAGS and CFLAGS.
mkc_check_decl, mkc_check_sizeof: they don't use MKC_COMMON_DEFINES
environment enymore, everything should be passed through CFLAGS and
CPPFLAGS.
MKC_SHELL is currently disabled
======================================================================
Version 0.7.0, by Aleksey Cheusov, Sun, 15 Mar 2009 11:02:29 +0200
No CFLAGS+=-DHAVE_XXXX=0 anymore, if XXX is not found
it is not defined at all. autoconf works the same way.
mkc_check_xxx scripts:
- installed to bin/ directory just like normal scripts.
- if MKC_VERBOSE variable is equal to '1', verbose messages
are output to stderr.
- -h|--help options printing usage information.
- manual pages are created.
new variable MKC_NOCACHE, if it is set to not empty string,
caching is disabled.
fix in mkc_check_decl: long-long is treated as 'long long'.
MKC_SHOW_CACHED, MKC_VERBOSE, MKC_DELETE_TMPFILES, MKC_NOCACHE
variables: 1 - true, other values - false.
minor clean-ups in Makefile
======================================================================
Version 0.6.0, by Aleksey Cheusov, Sun, 8 Mar 2009 19:35:13 +0200
MKC_FUNCLIBS_NOAUTO.ftime.compat is replaced
with MKC_NOAUTO_FUNCLIBS list.
Ex.:
MKC_NOAUTO_FUNCLIBS += ftime:compat crypt:crypt
MKC_NOAUTO_FUNCLIBS = 1 # for disabling
# all potential LDADD += ...
fix: "checking for..." messages is now sent to stderr
before result is calculated, not after.
Support for heirloom-sh and ancient Solaris-10 /bin/sh
added: MKC_SHELL variable defaulting to /bin/sh, mkc_check_XXX
scripts are run with with this shell. This is variable is mainly for
testing purposes but who knows.
======================================================================
Version 0.5.0, by Aleksey Cheusov, Tue, 3 Mar 2009 00:04:52 +0200
Huge amount of changes. 0.5.0 is completely incompatible with 0.4.0
because 0.4.0 was proof-of-concept only ;-) Everything was
inspired by discussion in fido7.ru.unix.prog.
Changing in API is also possible in the future until
I stabilize it.
======================================================================
Version 0.4.0, by Aleksey Cheusov, Sat, 21 Feb 2009 22:47:20 +0200
First publicly available release. Happy birth day! :-)
|