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.
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 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
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.
Update to 0.17.0
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.
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.
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.
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".
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 MirOS-2.4.1/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.
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 whil
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: endianess,
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.
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.
Major changes:
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 COPYRIGHT
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.
MAJOR CHANGES:
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.
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
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 1, 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