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
|
%%%begin-myprojects
\documentclass[hyperref={colorlinks=true}]{beamer}
\usepackage{fancyvrb,relsize}
\usepackage{graphicx}
\setbeamertemplate{navigation symbols}{}
%\usetheme{Boadilla}
%\usetheme{CambridgeUS}
%\usetheme{Malmoe}
%\usetheme{Singapore}
%\usetheme{boxes}
%\usecolortheme{crane}
%\usecolortheme{dove}
\usecolortheme{seagull} % very cool with \usetheme{default}
%\usefonttheme{professionalfonts}
%\useinnertheme{rectangles}
\mode<presentation>
\title{MK-CONFIGURE (MK-C) -- lightweight,
easy to use alternative for GNU Autotools}
\author{Aleksey Cheusov \\ \texttt{vle@gmx.net}}
\date{Minsk, Belarus, 2012}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{Code}[1]%
{\Verbatim[label=\bf{#1},frame=single,%
fontsize=\small,%
commandchars=\\\{\}]}%
{\endVerbatim}
%\newenvironment{Code}[1]%
% {\semiverbatim[]}%
% {\endsemiverbatim}
\newenvironment{CodeNoLabel}%
{\Verbatim[frame=single,%
fontsize=\small,%
commandchars=\\\{\}]}%
{\endVerbatim}
\newenvironment{CodeNoLabelSmallest}%
{\Verbatim[frame=single,%
fontsize=\footnotesize,%
commandchars=\\\{\}]}%
{\endVerbatim}
\newenvironment{CodeLarge}%
{\Verbatim[frame=single,%
fontsize=\large,%
commandchars=\\\{\}]}%
{\endVerbatim}
%\newcommand{\prompt}[1]{\textcolor{blue}{#1}}
%\newcommand{\prompt}[1]{\textbf{#1}\textnormal{}}
\newcommand{\prompt}[1]{{\bf{#1}}}
%\newcommand{\h}[1]{\textbf{#1}}
%\newcommand{\h}[1]{\bf{#1}\textnormal{}}
\newcommand{\h}[1]{{\bf{#1}}}
\newcommand{\URL}[1]{\textbf{#1}}
\newcommand{\AutohellFile}[1]{\textcolor{red}{#1}}
\newcommand{\MKCfile}[1]{\textcolor{green}{#1}}
\newcommand{\ModuleName}[1]{\textbf{#1}\textnormal{}}
\newcommand{\ProgName}[1]{\textbf{#1}\textnormal{}}
\newcommand{\ProjectName}[1]{\textbf{#1}\textnormal{}}
\newcommand{\PackageName}[1]{\textbf{#1}\textnormal{}}
\newcommand{\MKC}[1]{\large\textsf{#1}\textnormal{}\normalsize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \begin{frame}
%% \frametitle{qqq}
%% \begin{code}{files in the directory}
%% bla bla bla
%% \end{code}
%% \end{frame}
%%%end-myprojects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\titlepage
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{About this presentation}
\begin{block}{}
\begin{itemize}
\item It is a part of official documentation.
Latest version is available for download from here\\
\URL{http://mova.org/\~{}cheusov/pub/mk-c/mk-c.pdf}
% \item
% \URL{http://sourceforge.net/projects/mk-configure} \\
% \URL{http://freshmeat.net/projects/mk-configure}
\item part 1: Introduction
\item part 2: A number of samples of use
\item part 3: More complete list of features, TODO and more.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Concepts behind mk-configure}
\begin{block}{Design principles and goals}
\begin{itemize}
\item \h{I detest code generation} as in Autotools and CMake!\\
\h{Library approach} is used instead.
\item Written in \h{bmake}, portable version of \h{NetBSD make(1)},
and UNIX tools. \h{No heavy dependencies} like python, ruby and perl.
As a programming language
bmake is not as powerful as RuPyPe, but\\
\h{\mbox{bmake+sh} is good enough} for this task.
\item Basic principles are \h{similar to
traditional \mbox{bsd.*.mk} files}.
Actually mk-c contains heavily reworked Mk files from NetBSD.
\item \h{Portability} to all UNIX-like systems.
\item KISS. Only about 4000 lines of code.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Concepts behind mk-configure}
\begin{block}{Design principles and goals}
\begin{itemize}
\item mk-configure is not only for end-users and packagers
but for developers too.
So, one of the main goals is to provide a convenient \h{tool for
development}.
\item Declarative approach of writing Makefile(s). Build and
installation process is controlled with a help of special
variables and bmake's include files.
\item \h{Cross-compilation}.
\item \h{Extensibility}. Extensions to mk-configure are implemented
using bmake include files and standard UNIX tools, i.e. shell,
awk, sed, grep etc. when needed.
\item MK-C is \h{Easy to use}. Only one command is needed to build
a project --- \h{mkcmake}. \h{Only Makefile(s)} are needed for
specifying build instructions.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Concepts behind mk-configure}
\begin{block}{Negative side-effects}
\begin{itemize}
\item End-users/packagers have to install bmake and
mk-configure to build applications based on mk-configure.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 1: Hello world application}
\begin{block}{Source code}
\begin{Code}{Makefile}
PROG = hello
.include <\h{mkc.prog.mk}>
\end{Code}
\begin{Code}{hello.c}
#include <stdio.h>
int main (int, char **)
\{
puts ("Hello World!");
return 0;
\}
\end{Code}
% \end{columns}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 1: Hello world application}
% \begin{block}
\begin{block}{How it works}
\begin{CodeNoLabel}
\prompt{\$ export PREFIX=/usr SYSCONFDIR=/etc}
\prompt{\$ mkcmake}
checking for compiler type... gcc
checking for program cc... /usr/bin/cc
cc -c hello.c
cc -o hello hello.o
\prompt{\$ ./hello}
Hello World!
\prompt{\$ DESTDIR=/tmp/fakeroot mkcmake install}
for d in \_ /tmp/fakeroot/usr/bin; do test "\$d" = \_ ||
install -d "\$d"; done
install -c -s -o cheusov -g users -m 755
hello /tmp/fakeroot/usr/bin/hello
\prompt{\$}
\end{CodeNoLabel}
\end{block}
Supported targets: all, clean, cleandir, install,
uninstall, installdirs, depend etc.
% \end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 2: Application using non-standard strlcpy(3)}
\begin{block}{Source code}
% files
\begin{Code}{files in the directory}
\prompt{\$ ls -l}
total 12
-rw-r--r-- 1 cheusov users 158 May 2 15:04 Makefile
-rw-r--r-- 1 cheusov users 187 May 2 15:05 main.c
-rw-r--r-- 1 cheusov users 332 May 2 15:09 \h{strlcpy.c}
\prompt{\$}
\end{Code}
% Makefile
\begin{Code}{Makefile}
PROG = strlcpy_test
SRCS = main.c
\h{MKC\_SOURCE\_FUNCLIBS} = strlcpy
\h{MKC\_CHECK\_FUNCS3} = strlcpy:string.h
.include <mkc.prog.mk>
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 2: Application using non-standard strlcpy(3)}
\begin{block}{Source code}
\begin{Code}{main.c}
#include <string.h>
#ifndef \h{HAVE\_FUNC3\_STRLCPY\_STRING\_H}
size_t strlcpy(char *dst, const char *src, size_t siz);
#endif
int main (int argc, char** argv)
\{
/* Use strlcpy(3) here */
return 0;
\}
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 2: Application using non-standard strlcpy(3)}
\begin{block}{How it works on Linux}
\begin{CodeNoLabel}
\prompt{\$ CC=icc mkcmake}
checking for compiler type... \h{icc}
checking for function strlcpy... \h{no}
checking for func strlcpy ( string.h )... \h{no}
checking for program icc... /opt/intel/cc/10.1.008/bin/icc
icc -c main.c
icc -c strlcpy.c
icc -o strlcpy_test main.o \h{strlcpy.o}
\prompt{\$ echo \_mkc\_*}
_mkc_cc_type.err _mkc_cc_type.res
_mkc_func3_strlcpy_string_h.c
_mkc_func3_strlcpy_string_h.err
_mkc_func3_strlcpy_string_h.res
_mkc_funclib_strlcpy.c _mkc_funclib_strlcpy.err
_mkc_funclib_strlcpy.res _mkc_prog_cc.err _mkc_prog_cc.res
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 2: Application using non-standard strlcpy(3)}
\begin{block}{How it works on NetBSD}
\begin{CodeNoLabel}
\prompt{\$ mkcmake}
checking for compiler type... gcc
checking for function strlcpy... \h{yes}
checking for func strlcpy ( string.h )... \h{yes}
checking for program cc... /usr/bin/cc
cc -D\h{HAVE\_FUNC3\_STRLCPY\_STRING\_H}=1 -c main.c
cc -o strlcpy_test main.o
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 3: Application using plugins}
\begin{block}{Source code}
\begin{Code}{Makefile}
PROG = myapp
\h{MKC\_CHECK\_FUNCLIBS} = dlopen:dl
.include <\h{mkc.configure.mk}>
.if $\{\h{HAVE\_FUNCLIB.dlopen}:U0\} || \ {}
$\{\h{HAVE\_FUNCLIB.dlopen.dl}:U0\}
CFLAGS += -DPLUGINS_ENABLED=1
.endif
.include <mkc.prog.mk>
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 3: Application using plugins}
\begin{block}{How it works on QNX}
\begin{CodeNoLabel}
\prompt{\$ mkcmake}
checking for compiler type... gcc
checking for function dlopen ( \h{-ldl} )... \h{yes}
checking for function dlopen... \h{no}
checking for program gcc...
/usr/qnx650/host/qnx6/x86/usr/bin/gcc
gcc \h{-DPLUGINS\_ENABLED=1} -c myapp.c
gcc -o myapp myapp.o \h{-ldl}
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 3: Application using plugins}
\begin{block}{How it works on OpenBSD}
\begin{CodeNoLabel}
\prompt{\$ mkcmake}
checking for compiler type... gcc
checking for function dlopen ( \h{-ldl} )... \h{no}
checking for function dlopen... \h{yes}
checking for program cc... /usr/bin/cc
cc \h{-DPLUGINS\_ENABLED=1} -c myapp.c
cc -o myapp myapp.o
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 4: Support for shared libraries and C++}
\begin{block}{Source code}
\begin{Code}{Makefile}
LIB = foobar
SRCS = foo.\h{cc} bar.\h{cc} baz.\h{cc}
MKPICLIB ?= no
MKSTATICLIB ?= no
\h{SHLIB\_MAJOR} = 1
\h{SHLIB\_MINOR} = 0
.include <\h{mkc.lib.mk}>
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 4: Support for shared libraries}
\begin{block}{How it works on Solaris with SunStudio compiler}
\begin{CodeNoLabel}
\prompt{\$ mkcmake}
checking for compiler type... \h{sunpro}
checking for program CC... /opt/SUNWspro/bin
CC -c \h{-KPIC} foo.cc -o foo.os
CC -c \h{-KPIC} bar.cc -o bar.os
CC -c \h{-KPIC} baz.cc -o baz.os
building shared foobar library (version \h{1.0})
CC \h{-G} \h{-h libfoobar.so.1}
-o libfoobar.so.1.0 foo.os bar.os baz.os
ln -sf libfoobar.so.1.0 libfoobar.so
ln -sf libfoobar.so.1.0 libfoobar.so.1
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 4: Support for shared libraries}
\begin{block}{How it works on Darwin}
\begin{CodeNoLabel}
\prompt{\$ mkcmake}
checking for compiler type... gcc
checking for program c++... /usr/bin/c++
c++ -c \h{-fPIC -DPIC} foo.cc -o foo.os
c++ -c \h{-fPIC -DPIC} bar.cc -o bar.os
c++ -c \h{-fPIC -DPIC} baz.cc -o baz.os
building shared foobar library (version 1.0)
c++ \h{-dynamiclib -install\_name}
/usr/local/lib/libfoobar.1.0.\h{dylib}
\h{-current\_version 2.0 -compatibility\_version 2}
-o libfoobar.1.0.dylib foo.os bar.os baz.os
ln -sf libfoobar.1.0.dylib libfoobar.dylib
ln -sf libfoobar.1.0.dylib libfoobar.1.dylib
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 4: Support for shared libraries (Exported symbols)}
\begin{block}{}
\begin{CodeNoLabel}
\prompt{\$ cat Makefile}
LIB = foo
INCS = foo.h
\h{EXPORT\_SYMBOLS} = foo.sym
SHLIB_MAJOR = 1
MKSTATICLIB = no
.include <mkc.lib.mk>
\prompt{\$ mkcmake}
awk 'BEGIN \{print "\{ global:"\} \{print \$0 ";"\}
END \{print "local: *; \};"\}' foo.sym
> foo.sym.tmp1 && mv foo.sym.tmp1 foo.sym.tmp
cc -I. -c -fPIC -DPIC foo.c -o foo.os
building shared foo library (version 1)
ld -shared -soname libfoo.so.1
\h{--version-script foo.sym.tmp} -o libfoo.so.1 foo.os
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{Dependency graph for all subprojects}
This project consists of several subprojects: dict, dictd, dictfmt,
dictzip, libdz, libmaa and libcommon. libcommon contains common code
for executables and should not be installed.
\begin{figure}
\includegraphics[width=\textwidth, height=0.50\textheight, keepaspectratio=false]{dep_graph.eps}
\end{figure}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{Files and directories}
\begin{CodeNoLabel}
\prompt{\$ ls -l}
total 4
drwxr-xr-x 2 cheusov users 1 Jan 26 12:01 dict
drwxr-xr-x 2 cheusov users 1 Jan 26 12:01 dictd
drwxr-xr-x 2 cheusov users 1 Jan 26 12:01 dictfmt
drwxr-xr-x 2 cheusov users 1 Jan 26 12:01 dictzip
drwxr-xr-x 2 cheusov users 1 Jan 26 12:03 doc
drwxr-xr-x 2 cheusov users 1 Jan 26 12:01 libcommon
drwxr-xr-x 2 cheusov users 1 Jan 26 12:01 libdz
drwxr-xr-x 2 cheusov users 1 Jan 26 12:01 libmaa
-rw-r--r-- 1 cheusov users 306 Jan 26 12:03 \h{Makefile}
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{Source code}
\begin{Code}{Makefile}
SUBPRJ = libcommon:dict # dict depends on libcommon
SUBPRJ += libcommon:dictd
SUBPRJ += libcommon:dictzip
SUBPRJ += libcommon:dictfmt
SUBPRJ += libmaa:dict
SUBPRJ += libmaa:dictd
SUBPRJ += libmaa:dictfmt
SUBPRJ += libmaa:dictzip
SUBPRJ += libdz:dictzip
SUBPRJ += doc
.include <\h{mkc.subprj.mk}>
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{Source code}
\begin{Code}{libcommon/Makefile}
# Internal static library that implements functions
# common for dict, dictd, dictfmt and dictzip applications
LIB = common
SRCS = str.c iswalnum.c # and others
\h{MKINSTALL} = no # Do not install internal library!
.include <mkc.lib.mk>
\end{Code}
\begin{Code}{libcommon/linkme.mk}
PATH.common := \$\{.PARSEDIR\}
CPPFLAGS += -I\$\{PATH.common\}\h{/include}
DPLIBDIRS += \$\{PATH.common\}
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{Source code}
\begin{Code}{libmaa/Makefile}
LIB = maa
SRCS = set.c prime.c log.c # etc.
\h{INCS} = maa.h
SHLIB_MAJOR = 1
SHLIB_MINOR = 2
SHLIB_TEENY = 0
# list of exported symbols
\h{EXPORT\_SYMBOLS} = maa.sym
.include <mkc.lib.mk>
\end{Code}
\begin{Code}{libmaa/linkme.mk}
PATH.maa := \$\{.PARSEDIR\}
CPPFLAGS += -I\$\{PATH.maa\}
DPLIBDIRS += \$\{PATH.maa\}
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{Source code}
\begin{Code}{libmaa/maa.sym}
hsh_create
hsh_destroy
hsh_insert
hsh_delete
hsh_retrieve
...
lst_create
lst_destroy
lst_insert
...
set_create
set_destroy
set_add
set_union
...
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{Source code}
\begin{Code}{libdz/Makefile}
LIB = dz
SRCS = dz.c
INCS = dz.h
\h{MKC\_REQUIRE\_HEADERS} = zlib.h
\h{MKC\_REQUIRE\_FUNCLIBS} = deflate:z
EXPORT_SYMBOLS = dz.sym
SHLIB_MAJOR = 1
SHLIB_MINOR = 0
LDADD = -lz
.include <mkc.lib.mk>
\end{Code}
\begin{Code}{libdz/linkme.mk}
PATH.dz := \$\{.PARSEDIR\}
CPPFLAGS += -I\$\{PATH.dz\}
DPLIBDIRS += \$\{PATH.dz\}
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{Source code}
\begin{Code}{dictzip/Makefile}
PROG = dictzip
MAN = dictzip.1
\h{.include} "../libcommon/linkme.mk"
\h{.include} "../libdz/linkme.mk"
\h{.include} "../libmaa/linkme.mk"
LDADD += -lcommon -ldz -lmaa
.include <mkc.prog.mk>
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{How it fails ;-)}
\begin{CodeNoLabel}
\prompt{\$ mkcmake configure-dictzip}
==================================================
configure ===> \h{libcommon}
...
configure ===> \h{libmaa}
...
==================================================
configure ===> \h{libdz}
checking for header zlib.h... \h{no}
checking for function deflate ( -lz )... \h{no}
checking for function deflate... \h{no}
\h{ERROR: cannot find header zlib.h}
\h{ERROR: cannot find function deflate:z}
...
\prompt{\$ echo \$?}
1
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 5: Big project consisting of several subprojects}
\begin{block}{How it works}
\begin{CodeNoLabel}
\prompt{\$ mkcmake dictzip}
...
==================================================
all ===> \h{libdz}
...
checking for header zlib.h... \h{yes}
checking for function deflate ( -lz )... \h{yes}
...
==================================================
all ===> \h{dictzip}
...
cc \h{-I../libcommon -I../libdz -I../libmaa} -c dictzip.c
cc \h{-L/tmp/hello\_dictd/libcommon -L/tmp/hello\_dictd/libdz}
\h{-L/tmp/hello\_dictd/libmaa} -o dictzip
dictzip.o -lcommon -lmaa -ldz
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 6: Support for Lua programming language}
\begin{block}{Source code}
\begin{Code}{Makefile}
SCRIPTS = foobar # scripts written in Lua
LUA\_LMODULES = foo bar # modules written in Lua
LUA\_CMODULE = baz # Lua module written in C
.include <mkc.lib.mk>
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 6: Support for Lua programming language}
\begin{block}{How it works}
\begin{CodeNoLabel}
\prompt{\$ mkcmake configure}
checking for program pkg-config...
/usr/pkg/bin/pkg-config
checking for [pkg-config] lua... 1 (yes)
checking for [pkg-config] lua --cflags...
-I/usr/pkg/include
checking for [pkg-config] lua --libs...
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -llua -lm
checking for [pkg-config] lua --variable=INSTALL_LMOD...
/usr/pkg/share/lua/5.1
checking for [pkg-config] lua --variable=INSTALL_CMOD...
/usr/pkg/lib/lua/5.1
checking for compiler type... gcc
checking for header lua.h... yes
checking for program cc... /usr/bin/cc
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 6: Support for Lua programming language}
\begin{block}{How it works}
\begin{CodeNoLabel}
\prompt{\$ export PREFIX=/usr/pkg}
\prompt{\$ mkcmake all}
cc -DHAVE_HEADER_LUA_H=1 -I/usr/pkg/include
-c -fPIC -DPIC baz.c -o baz.os
building shared baz library (version 1.0)
cc -shared -Wl,-soname -Wl,libbaz.so.1 -o baz.so baz.os
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -llua -lm
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 6: Support for Lua programming language}
\begin{block}{How it works}
\begin{CodeNoLabel}
\prompt{\$ mkcmake install DESTDIR=/tmp/fakeroot}
...
\prompt{\$ find /tmp/fakeroot -type f}
/tmp/fakeroot/usr/pkg/bin/foobar
/tmp/fakeroot/usr/pkg/lib/lua/5.1/baz.so
/tmp/fakeroot/usr/pkg/share/lua/5.1/foo.lua
/tmp/fakeroot/usr/pkg/share/lua/5.1/bar.lua
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 7: Custom tests and sizeof of system types}
\begin{block}{Source code}
\begin{Code}{Makefile}
MKC\_CUSTOM\_DIR = \h{\$\{.CURDIR\}/checks}
# m4 supports -P flag (GNU, NetBSD)
M4 ?= m4 # overridable (\h{gm4})
MKC\_REQUIRE\_CUSTOM += m4P
MKC\_CUSTOM\_FN.m4P = \h{m4P.sh}
.export: M4
# \_\_attribute ((\{con,de\}structor))
MKC\_REQUIRE\_CUSTOM += \h{constructor destructor}
# sizeof
MKC\_CHECK\_SIZEOF = char short int long void* long-long
LIB = mylib
CFLAGS += -DM4\_CMD='"\$\{M4\}"'
.include <mkc.lib.mk>
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 7: Custom tests and sizeof of system types}
\begin{block}{Source code}
\begin{Code}{Files in checks/ subdirectory}
\prompt{\$ ls checks/}
constructor.c
destructor.c
m4P.sh
\prompt{\$}
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 7: Custom tests and sizeof of system types}
\begin{block}{Source code}
\begin{Code}{checks/m4P.sh}
#!/bin/sh
input ()\{
cat <<'EOF'
m4\_define(fruit, apple)
fruit
EOF
\}
M4=\$\{M4-m4\}
if input | \$\{M4\} -P | grep \^{}apple > /dev/null; then
echo 1
else
echo 0
fi
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 7: Custom tests and sizeof of system types}
\begin{block}{Source code}
\begin{Code}{checks/constructor.c}
void __attribute ((constructor))
dummy (void)
\{
\}
\end{Code}
\begin{Code}{checks/destructor.c}
void __attribute ((destructor))
dummy (void)
\{
\}
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 7: Custom tests and sizeof of system types}
\begin{block}{How it works on FreeBSD}
\begin{CodeNoLabel}
\prompt{\$ mkcmake}
checking for compiler type... gcc
checking for sizeof char... \h{1}
checking for sizeof short... \h{2}
checking for sizeof int... \h{4}
checking for sizeof long... \h{4}
checking for sizeof void*... \h{4}
checking for sizeof long long... \h{8}
checking for custom test \h{m4P... 0 (no)}
checking for custom test \h{constructor}... \h{1 (yes)}
checking for custom test \h{destructor}... \h{1 (yes)}
checking for program cc... /usr/bin/cc
\h{ERROR: custom test m4P failed}
*** Error code 1
...
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 7: Custom tests and sizeof of system types}
\begin{block}{How it works on FreeBSD with GNU m4}
\begin{CodeNoLabel}
\prompt{\$ M4=gm4 mkcmake}
checking for compiler type... gcc
checking for sizeof char... 1
checking for sizeof short... 2
checking for sizeof int... 4
checking for sizeof long... 4
checking for sizeof void*... 4
checking for sizeof long long... 8
checking for custom test \h{m4P... 1 (yes)}
checking for custom test constructor... 1 (yes)
checking for custom test destructor... 1 (yes)
checking for program cc... /usr/bin/cc
...
\prompt{\$}
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 8: Portable version of AWK from NetBSD}
\begin{block}{http://mova.org/\~{}cheusov/pub/mk-configure/nbawk/}
\begin{Code}{Makefile (part 1)}
PROG = awk
SRCS = awkgram.y b.c lex.c lib.c main.c parse.c
proctab.c run.c tran.c
YHEADER = yes
MKC\_COMMON\_DEFINES.Linux = -D\_GNU\_SOURCE
MKC\_COMMON\_HEADERS = ctype.h stdio.h string.h
MKC\_CHECK\_FUNCS1 = \_\_fpurge:stdio\_ext.h fpurge isblank
MKC\_CHECK\_FUNCS3 = strlcat
MKC\_SOURCE\_FUNCLIBS = fpurge strlcat
WARNS= 4
WARNERR= no # do not treat warnings as errors
MKC\_REQD= 0.19.0 # mk-configure>=0.19.0 is required
... # to be continued on the next slide
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 8: Portable version of AWK from NetBSD}
\begin{block}{http://mova.org/\~{}cheusov/pub/mk-configure/nbawk/}
\begin{Code}{Makefile (part 2)}
... # beginning is on the previous slide
\h{.include} <mkc.configure.mk>
\h{.if} \$\{HAVE\_FUNC1.isblank:U0\}
CPPFLAGS += -DHAS\_ISBLANK
\h{.endif}
\h{.if} !\$\{HAVE\_FUNC1.fpurge:U1\} &&
!\$\{HAVE_FUNC1.\_\_fpurge.stdio\_ext\_h:U1\}
MKC\_ERR\_MSG+= "fpurge(3) cannot be found"
\h{.endif}
CPPFLAGS += -I.
LDADD += -lm
\h{.include} <mkc.prog.mk>
\end{Code}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 8: Portable version of AWK from NetBSD}
\begin{block}{run.c}
\begin{CodeNoLabelSmallest}
--- nbawk-20100903/run.c.orig
+++ nbawk-20100903/run.c
@@ -40,6 +40,14 @@
#include "awk.h"
#include "awkgram.h"
+#ifndef HAVE_FUNC1_FPURGE
+int fpurge (FILE *stream);
+#endif
+
+#ifndef HAVE\_FUNC3\_STRLCAT
+size\_t strlcat(char *dst, const char *src, size_t size);
+#endif
+
#define tempfree(x) if (istemp(x)) tfree(x); else
void stdinit(void);
\end{CodeNoLabelSmallest}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 8: Portable version of AWK from NetBSD}
\begin{block}{fpurge.c}
\begin{CodeNoLabelSmallest}
#include <stdio.h>
#if HAVE\_FUNC1\_\_\_FPURGE\_STDIO\_EXT\_H
#include <stdio\_ext.h>
#endif
int fpurge(FILE *stream);
int fpurge(FILE *stream)
\{
#if HAVE\_FUNC1\_\_\_FPURGE\_STDIO\_EXT\_H
\_\_fpurge (stream);
return 0;
#else
#error "cannot find fpurge(3), sorry"
#endif
\}
\end{CodeNoLabelSmallest}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 8: Portable version of AWK from NetBSD}
\begin{block}{strlcpy.c}
\begin{CodeNoLabel}
If you need this code, you know where to get it from! ;-)
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 8: Portable version of AWK from NetBSD}
% \begin{block}
\begin{block}{How it works on Linux}
\begin{CodeNoLabel}
\prompt{\$ mkcmake}
checking for compiler type... gcc
checking for function fpurge... \h{no}
checking for function strlcat... \h{no}
checking for func __fpurge ( stdio_ext.h )... \h{yes}
checking for func fpurge... \h{no}
checking for func isblank... \h{yes}
checking for func strlcat... \h{no}
checking for program yacc... \h{/usr/bin/yacc}
...
cc \h{-Wall -Wstrict-prototypes ...}
-I. \h{-D\_GNU\_SOURCE} -c awkgram.c
...
cc -o awk awkgram.o ... \h{fpurge.o strlcat.o} -lm
\prompt{\$ ./awk}
usage: ./awk [-F fs] [-v var=value] [-f progfile
| 'prog'] [file ...]
\prompt{\$}
\end{CodeNoLabel}
\end{block}
Supported targets: all, clean, cleandir, install,
uninstall, installdirs, depend etc.
% \end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Example 9: Cross-compilation}
\begin{block}{How it works}
\begin{CodeNoLabel}
\prompt{\$ export SYSROOT=/tmp/destdir.sparc64}
\prompt{\$ export TOOLCHAIN\_PREFIX=sparc64--netbsd-}
\prompt{\$ export TOOLCHAIN\_DIR=/tmp/tooldir.sparc64/bin}
\prompt{\$ uname -srm}
NetBSD 5.99.56 amd64
\prompt{\$ mkcmake}
checking for compiler type... gcc
/tmp/tooldir.sparc64/bin/sparc64--netbsd-gcc
--sysroot=/tmp/destdir.sparc64 -c hello.c -o hello.o
/tmp/tooldir.sparc64/bin/sparc64--netbsd-gcc
--sysroot=/tmp/destdir.sparc64 -o hello hello.o
\prompt{\$ file hello}
hello: ELF 64-bit MSB executable, SPARC V9, relaxed
memory ordering, (SYSV), dynamically linked (uses
shared libs), for NetBSD 5.99.56, not stripped
\prompt{\$ }
\end{CodeNoLabel}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{Features}
\begin{block}{}
\begin{enumerate}
\item Automatic detection of OS features
(\ModuleName{mkc.configure.mk})
\begin{itemize}
\item \h{header presence} (MKC\_\{CHECK,REQUIRE\}\_HEADERS)
\item \h{function declaration} (MKC\_\{CHECK,REQUIRE\}\_FUNCS[n])
\item \h{type declaration} (MKC\_\{CHECK,REQUIRE\}\_TYPES)
\item \h{structure member} (MKC\_\{CHECK,REQUIRE\}\_MEMBERS)
\item \h{variable declaration} (MKC\_\{CHECK,REQUIRE\}\_VARS)
\item \h{define declaration} (MKC\_\{CHECK,REQUIRE\}\_DEFINES)
\item \h{type size} (MKC\_CHECK\_SIZEOF)
\item \h{function} implementation \h{in the library}
(MKC\_\{CHECK,REQUIRE\}\_FUNCLIBS and MKC\_SOURCE\_FUNCLIBS)
\item \h{checks for programs} (MKC\_\{CHECK,REQUIRE\}\_PROGS)
\item \h{user's custom checks} (MKC\_\{CHECK,REQUIRE\}\_CUSTOM)
\item \h{built-in checks} (MKC\_CHECK\_BUILTINS), e.g. endianness,
prog\_flex, prog\_bison, prog\_gawk or prog\_gm4)
\end{itemize}
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile,t]
\frametitle{Features}
\begin{block}{}
\begin{enumerate}
\setcounter{enumi}{1}
\item Building, installing, uninstalling, cleaning
etc. Supported targets: \h{all}, \h{install},
\h{uninstall},
\h{clean}, \h{cleandir}, \h{installdirs}, \h{depend}
and others.
\item Building \h{standalone programs} (\ModuleName{mkc.prog.mk}),
\h{static, shared and dynamically loaded libraries}
(\ModuleName{mkc.lib.mk}) using \h{C},
\h{C++} and \h{Objective C} compilers.
Shared libraries
support is provided for numerous OSes: \h{NetBSD}, \h{FreeBSD},
\h{OpenBSD},
\h{DragonFlyBSD}, \h{MirOS BSD}, \h{Linux}, \h{Solaris}, \h{Darwin}
(MacOS-X), \h{Interix}, \h{Tru64},
\h{QNX}, \h{HP-UX}, \h{Cygwin} (no support for shared libraries
and DLLs yet) and
compilers: \h{GCC}, \h{Intel C/C++} compilers, \h{Portable C compiler} AKA
\h{pcc}, \h{DEC C/C++ compiler}, \h{HP C/C++ compiler},
\h{Oracle SunStudio} and others.
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile,t]
\frametitle{Features}
\begin{block}{}
\begin{enumerate}
\setcounter{enumi}{3}
\item Handling \h{man} pages, \h{info} manuals and \h{POD} documents.
\item Handling \h{scripts} as well as \h{plain text files},
i.e. installing, uninstalling and handling \h{.in files}
(replacing, for example, \h{@bindir@}, \h{@sysconfdir@}, \h{@version@}
fragments with real values).
\item \h{Cross-compilation}. mk-configure itself doesn't run
target system
executables, so you can freely use cross-tools (compiler, linker
etc.). You can also override/set any variable initialized by mk-configure.
\item Support for \h{pkg-config}.
\item Support for \h{Lua} programming language.
\item Support for \h{yacc} and \h{lex}.
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile,t]
\frametitle{Features}
\begin{block}{}
\begin{enumerate}
\setcounter{enumi}{10}
\item Support for projects with multiple subprojects
(\ModuleName{mkc.subprj.mk} and \ModuleName{mkc.subdir.mk}).
\item Special targets bin\_tar, bin\_targz, bin\_tarbz2, bin\_zip,
bin\_deb creates .tar, .tar.gz, .tar.bz2, .zip archives and .deb
package (on Debian Linux).
\item Parts of mk-configure functionality is
accesible via individual programs, e.g. \ProgName{mkc\_install},
\ProgName{mkc\_check\_compiler},
\ProgName{mkc\_check\_header}, \ProgName{mkc\_check\_funclib},
\ProgName{mkc\_check\_decl},
\ProgName{mkc\_check\_prog}, \ProgName{mkc\_check\_sizeof} and
\ProgName{mkc\_check\_custom}.
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile,t]
\frametitle{MK-CONFIGURE in real world}
\begin{block}{Packagers are welcome! ;-)}
\small
NetBSD make (bmake) is packaged in the following OSes:
\begin{itemize}
\item FreeBSD, pkgsrc (NetBSD, DragonFlyBSD...) (\h{devel/bmake})
\item Gentoo Linux, Fedora Linux, AltLinux
\item Debian/Ubuntu\\
deb http://mova.org/\~{}cheusov/pub/debian lenny main\\
deb-src http://mova.org/\~{}cheusov/pub/debian lenny main
\end{itemize}
mk-configure is packaged in the following OSes
\begin{itemize}
\item FreeBSD, pkgsrc (NetBSD, DragonFlyBSD...) (\h{devel/mk-configure})
\item Debian/Ubuntu\\
deb http://mova.org/\~{}cheusov/pub/debian lenny main\\
deb-src http://mova.org/\~{}cheusov/pub/debian lenny main
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile,t]
\frametitle{MK-CONFIGURE in real world}
\begin{block}{Real life samples of use}
\begin{itemize}
\item Lightweight modular malloc Debugger.\\
\URL{http://sourceforge.net/projects/lmdbg/}
\URL{http://pkgsrc.se/wip/lmdbg/}\\
\item NetBSD version of AWK programming language, ported
to other Operating Systems.\\
\URL{http://mova.org/\~{}cheusov/pub/mk-configure/nbawk/}
\item Modules support for AWK programming language\\
\URL{http://sourceforge.net/projects/runawk/}
\URL{http://pkgsrc.se/lang/runawk/}\\
\item Tool for distributing tasks over network or CPUs\\
\URL{http://sourceforge.net/projects/paexec/}
\URL{http://pkgsrc.se/wip/paexec/}\\
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile,t]
\frametitle{MK-CONFIGURE in real world}
\begin{block}{Real life samples of use}
\begin{itemize}
\item Distributed fault tolerant bulk build tool for pkgsrc\\
\URL{http://mova.org/\~{}cheusov/pub/distbb/}\\
\URL{http://pkgsrc.se/wip/distbb/}\\
\item Client/server package search system for pkgsrc\\
\URL{http://mova.org/\~{}cheusov/pub/pkg\_online/}
\URL{http://pkgsrc.se/wip/pkg\_online-client/}\\
\URL{http://pkgsrc.se/wip/pkg\_online-server/}\\
\item Any project based on traditional
\ModuleName{bsd.\{prog,lib,subdir\}.mk} can easily be converted
to \MKC{mk-configure}.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%begin-myprojects
\begin{frame}[fragile,t]
\frametitle{MK-CONFIGURE in real world}
\begin{block}{My opensource projects using
mk-configure (filled hexagon), Mk files (box) and others (oval)}
\begin{figure}
\includegraphics[width=\textwidth, height=0.60\textheight, keepaspectratio=false]{my_prjs.eps}
\end{figure}
% \begin{figure}
% \includegraphics[width=0.7\textwidth, height=0.10\textwidth, keepaspectratio=false]{my_prjs2.eps}
% \end{figure}
\end{block}
\end{frame}
%%%end-myprojects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile,t]
\frametitle{MK-C needs your help ;-)}
\begin{block}{}
\begin{itemize}
\item Packagers are welcome (Linux distros, OpenBSD etc.)
\item MK-C distribution contains \h{a lot of regression tests and
samples of use} (samples are used for testing too).\\
\h{Shell accounts} on
"exotic" UNIX-like platforms are needed (AIX, HP-UX, non-ELF BSDs,
IRIX, Solaris, Hurd etc.) for testing and development.
\item Review of the documentation. At the moment only mk-configure(7),
samples/ and this presentation are available.
\item sf.net provides two mailing lists:\\
\h{mk-configure-help} and \h{mk-configure-discuss}.
\item TODO file in the distribution is full of tasks.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
\frametitle{}
\begin{block}{}
\begin{center}
\Huge{The END.}
\end{center}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%begin-myprojects
\end{document}
%%%end-myprojects
|