#!/bin/sh cd "$(dirname $0)" #******************************************************************************# # Defaults # #******************************************************************************# # Project variables [ -f Makefile.cfg ] && mv Makefile.cfg Makefile.cfg.tmp name="$(make -s getname)" version="$(make -s getversion)" maintainer="$(make -s getmaintainer)" [ -f Makefile.cfg.tmp ] && mv Makefile.cfg.tmp Makefile.cfg # Platform platform="$(command -v gcc 1>/dev/null && gcc --print-multiarch)" platform="$([ "$platform" ] && echo "/$platform")" # Make options make_full_log= more_warnings= # Build options target= no_file= static= windows= optimize_size= loglevel=none # none, info, warn, error, fatal # Installation directories root='' prefix='${root}/usr' prefix_set= hprefix='${root}/usr' bindir='${prefix}/bin' hbindir='${hprefix}/bin' libdir='${prefix}/lib'"$platform" includedir='${prefix}/include'"$platform" pkgdir='${libdir}/pkgconfig' mandir='${prefix}/share/man' # Installation options install_manpages=yes install_devel=yes # Tweaks cflags= ldflags= #******************************************************************************# # Help message # #******************************************************************************# usage() { cat <&2 <&2 <&2 </dev/null 2>/dev/null # Create the configuration header tools/write-header-config --version=${version} \ --maintainer="$(echo ${maintainer} | sed 's/"/\\"/g')" \ $([ "$no_file" ] && echo --no-file) \ >include/${name}/config.h # Do it! exec 3>&1 1>Makefile.cfg cat <&3 3>&- chmod +x Makefile.cfg # Print the end message. echo "Configuration loaded, you can make now." # End of file.