Create a local copy of the scripts directory.
The idea is to move the build system out of the project tree as much as possible. This has two benefits: - it does not add any baggage to somebody who just wants to compile the project, and doesn't want to create any new modules, - it means that project trees don't have to be updated every time a change is made to the module instantiation stuff.
This commit is contained in:
parent
201586b051
commit
87272247fb
65 changed files with 1561 additions and 0 deletions
36
scripts/build.c.lib/build.install-lib
Normal file
36
scripts/build.c.lib/build.install-lib
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
build_target @NAME@
|
||||
|
||||
# make paths (this is for Gentoo in particular)
|
||||
build_dir_tree "${LIBDIR}" || return 1
|
||||
build_dir_tree "${PKGCONFDIR}" || return 1
|
||||
build_dir_tree "${INCLUDEDIR}" || return 1
|
||||
|
||||
# install library
|
||||
echo "Installing libraries into '${LIBDIR}'"
|
||||
install_file ${@CNAME@} ${LIBDIR} 0755 || return 1
|
||||
BASE="${@CNAME@_BASE}.so"
|
||||
MAJOR="${BASE}.${SOMAJOR}"
|
||||
MINOR="${MAJOR}.${SOMINOR}"
|
||||
MICRO="${MINOR}.${SOMICRO}"
|
||||
install_symlink "${MINOR}" "${MICRO}" "${LIBDIR}"
|
||||
install_symlink "${MAJOR}" "${MINOR}" "${LIBDIR}"
|
||||
install_symlink "${BASE}" "${MAJOR}" "${LIBDIR}"
|
||||
|
||||
# install header
|
||||
echo "Installing header file '${@CNAME@_HEADER}' into ${INCLUDEDIR}"
|
||||
install_header ${@CNAME@_HEADER} ${INCLUDEDIR} 0644 || return 1
|
||||
|
||||
# install pkgconfig file
|
||||
echo "Installing package config file into ${PKGCONFDIR}"
|
||||
PKGCONFFILE=${PKGCONFDIR}/@CNAME@.pc
|
||||
do_cmd rm -f ${PKGCONFFILE}
|
||||
do_cmd_redir ${PKGCONFFILE} sed \
|
||||
-e "s,@VERSION@,${VERSION}," \
|
||||
-e "s,@LIBDIR@,${FINALLIBDIR}," \
|
||||
-e "s,@INCLUDEDIR@,${FINALINCLUDEDIR}," \
|
||||
src/@NAME@/pkgconf.in
|
||||
do_cmd chmod 0644 ${PKGCONFFILE}
|
||||
print_success "Done"
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
# vim: expandtab:ts=4:sw=4
|
||||
Loading…
Add table
Add a link
Reference in a new issue