diff options
author | peter <peter@FreeBSD.org> | 1996-08-29 10:28:51 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-08-29 10:28:51 +0000 |
commit | df15b999312f93c7d54bb5b2d96f55ee59f850d5 (patch) | |
tree | ef0a456ed775b48ddbefe5283aa05d32b7ca9194 | |
parent | a258811f5d5fee3125fdc76d326a161d6ba61c56 (diff) | |
download | FreeBSD-src-df15b999312f93c7d54bb5b2d96f55ee59f850d5.zip FreeBSD-src-df15b999312f93c7d54bb5b2d96f55ee59f850d5.tar.gz |
More cleanup:
- don't install nroff tcl.macros in /usr/include.... :-]
- set $MAN3 and $MANn in one go rather than a string of MAN3+= ...
- cosmetic tweaks to make it more readable
- no longer copy tcl.macros to the obj dir, install it from source dir
-rw-r--r-- | tools/tools/tcl_bmake/mkMakefile.sh | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/tools/tools/tcl_bmake/mkMakefile.sh b/tools/tools/tcl_bmake/mkMakefile.sh index e34a93d..f1d1eec 100644 --- a/tools/tools/tcl_bmake/mkMakefile.sh +++ b/tools/tools/tcl_bmake/mkMakefile.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: mkMakefile.sh,v 1.4 1996/08/28 07:56:55 peter Exp $ +# $Id: mkMakefile.sh,v 1.5 1996/08/29 09:43:50 peter Exp $ # # This script generates a bmake Makefile for src/lib/libtcl # @@ -34,39 +34,48 @@ echo -n 'Id' >> ${LIBTCL}Makefile echo '$' >> ${LIBTCL}Makefile # Tell 'em ! -echo '# This file is generated automatically, think twice!' >> ${LIBTCL}Makefile -echo '# Please change src/tools/tools/tcl_bmake/mkMakefile.sh instead' >> ${LIBTCL}Makefile -echo '# Generated by src/tools/tools/tcl_bmake/mkMakefile.sh version:' >> ${LIBTCL}Makefile -echo '# $Id: mkMakefile.sh,v 1.4 1996/08/28 07:56:55 peter Exp $' | tr -d '$' >> ${LIBTCL}Makefile -echo >> ${LIBTCL}Makefile +echo '# +# This file is generated automatically, do not edit it here! +# +# Please change src/tools/tools/tcl_bmake/mkMakefile.sh instead +# +# Generated by src/tools/tools/tcl_bmake/mkMakefile.sh version: +# $Id: mkMakefile.sh,v 1.5 1996/08/29 09:43:50 peter Exp $ +# +' | tr -d '$' >> ${LIBTCL}Makefile # Tell make(1) to pick up stuff from here echo 'TCLDIST=${.CURDIR}/../../contrib/tcl' >> ${LIBTCL}Makefile + echo >> ${LIBTCL}Makefile + echo '.PATH: ${TCLDIST}/generic' >> ${LIBTCL}Makefile echo '.PATH: ${TCLDIST}/unix' >> ${LIBTCL}Makefile echo '.PATH: ${TCLDIST}/doc' >> ${LIBTCL}Makefile +echo >> ${LIBTCL}Makefile + # Tell cpp(1) to pick up stuff from here echo 'CFLAGS+= -I${TCLDIST}/generic' >> ${LIBTCL}Makefile echo 'CFLAGS+= -I${TCLDIST}/unix' >> ${LIBTCL}Makefile +echo >> ${LIBTCL}Makefile + # Pick up some more global info echo "TCL_LIBRARY= /usr/libdata/tcl" >> ${LIBTCL}Makefile echo "SHLIB_MAJOR= ${SHLIB_MAJOR}" >> ${LIBTCL}Makefile echo "SHLIB_MINOR= ${SHLIB_MINOR}" >> ${LIBTCL}Makefile # Set the name of the library -echo 'LIB= tcl' >> ${LIBTCL}Makefile - -echo >> ${LIBTCL}Makefile -echo ".if !defined(NOPIC)" >> ${LIBTCL}Makefile -echo "LINKS+= \${SHLIBDIR}/lib\${LIB}.so.\${SHLIB_MINOR}.\${SHLIB_MINOR} \\" >> ${LIBTCL}Makefile -echo " \${SHLIBDIR}/lib\${LIB}\${SHLIB_MINOR}.so.1.0" >> ${LIBTCL}Makefile -echo ".endif" >> ${LIBTCL}Makefile -echo "LINKS+= \${LIBDIR}/lib\${LIB}.a \${LIBDIR}/lib\${LIB}\${SHLIB_MAJOR}.a" >> ${LIBTCL}Makefile +echo ' +LIB= tcl -echo >> ${LIBTCL}Makefile +.if !defined(NOPIC) +LINKS+= ${SHLIBDIR}/lib${LIB}.so.${SHLIB_MINOR}.${SHLIB_MINOR} \ + ${SHLIBDIR}/lib${LIB}${SHLIB_MINOR}.so.1.0 +.endif +LINKS+= ${LIBDIR}/lib${LIB}.a ${LIBDIR}/lib${LIB}${SHLIB_MAJOR}.a +' >> ${LIBTCL}Makefile # some needed CFLAGS echo "CFLAGS+=" `make -f m.x bar` >> ${LIBTCL}Makefile @@ -74,12 +83,10 @@ echo "CFLAGS+=" `make -f m.x bar` >> ${LIBTCL}Makefile # some more needed CFLAGS echo "CFLAGS+= -DTCL_LIBRARY=\\\"\${TCL_LIBRARY}\\\"" >> ${LIBTCL}Makefile -echo >> ${LIBTCL}Makefile - -echo "LDADD+= -lm" >> ${LIBTCL}Makefile -echo "DPADD+= \${LIBM}" >> ${LIBTCL}Makefile - -echo >> ${LIBTCL}Makefile +echo ' +LDADD+= -lm +DPADD+= ${LIBM} +' >> ${LIBTCL}Makefile # The sources make -f m.x foo | fmt 60 65 | sed ' @@ -90,45 +97,42 @@ s/\.o/.c/g $s/ \\$// ' >> ${LIBTCL}Makefile -echo >> ${LIBTCL}Makefile - echo ' -beforeinstall: ${TCLDIST}/generic/tcl.h tcl.macros - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $> \ - ${DESTDIR}/usr/include +beforeinstall: + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${TCLDIST}/generic/tcl.h ${DESTDIR}/usr/include ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ ${TCLDIST}/library/[a-z]* ${DESTDIR}/${TCL_LIBRARY} ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ ${TCLDIST}/unix/tclAppInit.c ${DESTDIR}/${TCL_LIBRARY} ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ - tcl.macros ${DESTDIR}/usr/share/tmac/tcl.macros + ${TCLDIST}/doc/man.macros ${DESTDIR}/usr/share/tmac/tcl.macros ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ ${.CURDIR}/tclConfig.sh ${DESTDIR}/${TCL_LIBRARY} -tcl.macros: ${TCLDIST}/doc/man.macros - cp ${.ALLSRC} ${.TARGET} - -' >> ${LIBTCL}Makefile - -echo ' MANFILTER=sed "/\.so *man.macros/s;.*;.so /usr/share/tmac/tcl.macros;" ' >> ${LIBTCL}Makefile # The (n) manpages -for i in ${SRCDIR}/doc/*.n -do - basename $i | awk '{print "MANn+= " $1}' >> ${LIBTCL}Makefile -done +(cd ${SRCDIR}/doc; echo *.n) | fmt 60 65 | sed ' +s/^/ / +s/$/ \\/ +1s/ /MANn+= / +$s/ \\$// +' >> ${LIBTCL}Makefile echo >> ${LIBTCL}Makefile # The (3) manpages -for i in ${SRCDIR}/doc/*.3 -do - basename $i | awk '{print "MAN3+= " $1 }' >> ${LIBTCL}Makefile -done +(cd ${SRCDIR}/doc; echo *.3) | fmt 60 65 | sed ' +s/^/ / +s/$/ \\/ +1s/ /MAN3+= / +$s/ \\$// +' >> ${LIBTCL}Makefile echo >> ${LIBTCL}Makefile + for i in ${SRCDIR}/doc/*.3 do sed ' @@ -142,13 +146,11 @@ do for (i = 2 ; i <= NF ; i++) print "MLINKS+= " $1 ".3 " $i ".3 " } - ' B=`basename $i .3` >> ${LIBTCL}Makefile + ' >> ${LIBTCL}Makefile done echo ' -CLEANFILES= tcl.macros - .include <bsd.lib.mk> ' >> ${LIBTCL}Makefile |