summaryrefslogtreecommitdiff
path: root/share/mk
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-07-20 19:48:27 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-07-20 19:48:27 +0000
commitf306a2b49207a3896d25e5fbcbe3cbe3313d08a1 (patch)
treee92f16d9ddafd643641fdac10e94164303abb15e /share/mk
parent53a62aec27bf2b212ce013e43261d03e569d10fb (diff)
undo broken changes, i dunno a fix for these; how many times you gonna repeat the same mistake espie@ and millert@ ?
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/bsd.lib.mk46
-rw-r--r--share/mk/bsd.man.mk24
-rw-r--r--share/mk/bsd.prog.mk18
3 files changed, 57 insertions, 31 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 06c7dc8d417..277965b625b 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.lib.mk,v 1.31 2001/07/19 23:16:17 espie Exp $
+# $OpenBSD: bsd.lib.mk,v 1.32 2001/07/20 19:48:26 mickey Exp $
# $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $
# @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
@@ -9,7 +9,8 @@
.endif
.if exists(${.CURDIR}/shlib_version)
-.include "${.CURDIR}/shlib_version"
+SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major
+SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
.endif
.MAIN: all
@@ -133,8 +134,8 @@ _LIBS+=lib${LIB}_p.a
.if (${MACHINE_ARCH} != "mips")
_LIBS+=lib${LIB}_pic.a
.endif
-.if defined(major) && defined(minor)
-_LIBS+=lib${LIB}.so.${major}.${minor}
+.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
+_LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
.endif
.endif
@@ -173,12 +174,21 @@ lib${LIB}_pic.a:: ${SOBJS}
@${AR} cq lib${LIB}_pic.a `${LORDER} ${SOBJS} | tsort -q`
${RANLIB} lib${LIB}_pic.a
-lib${LIB}.so.${major}.${minor}: ${SOBJS} ${DPADD}
- @echo building shared ${LIB} library \(version ${major}.${minor}\)
- @rm -f lib${LIB}.so.${major}.${minor}
+.if (${MACHINE_ARCH} == "mips")
+lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: ${OBJS} ${DPADD}
+ @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
+ @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
+ ${CC} -shared ${PICFLAG} -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR} \
+ -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ `${LORDER} ${OBJS}|tsort -q` ${LDADD}
+.else
+lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: ${SOBJS} ${DPADD}
+ @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
+ @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
${CC} -shared ${PICFLAG} \
- -o lib${LIB}.so.${major}.${minor} \
+ -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
`${LORDER} ${SOBJS}|tsort -q` ${LDADD}
+.endif
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
# the following looks XXX to me... -- cgd
@@ -252,21 +262,25 @@ realinstall:
.endif
chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
.endif
-.if !defined(NOPIC) && defined(major) && defined(minor)
+.if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- lib${LIB}.so.${major}.${minor} ${DESTDIR}${LIBDIR}
+ lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${DESTDIR}${LIBDIR}
.endif
.if !defined(NOLINT)
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR}
.endif
.if defined(LINKS) && !empty(LINKS)
-. for lnk file in ${LINKS}
- @l=${DESTDIR}${lnk}; \
- t=${DESTDIR}${file}; \
- echo $$t -\> $$l; \
- rm -f $$t; ln $$l $$t
-. endfor
+ @set ${LINKS}; \
+ while test $$# -ge 2; do \
+ l=${DESTDIR}$$1; \
+ shift; \
+ t=${DESTDIR}$$1; \
+ shift; \
+ echo $$t -\> $$l; \
+ rm -f $$t; \
+ ln $$l $$t; \
+ done; true
.endif
install: maninstall _SUBDIRUSE
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index 24b78b22e63..5ec9adb58ae 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.man.mk,v 1.21 2001/07/19 23:16:17 espie Exp $
+# $OpenBSD: bsd.man.mk,v 1.22 2001/07/20 19:48:26 mickey Exp $
# $NetBSD: bsd.man.mk,v 1.23 1996/02/10 07:49:33 jtc Exp $
# @(#)bsd.man.mk 5.2 (Berkeley) 5/11/90
@@ -116,13 +116,21 @@ maninstall:
done
.endif
.if defined(MLINKS) && !empty(MLINKS)
-. for sub in ${MANSUBDIR}
-. for lnk file in ${MLINKS}
- @l=${DESTDIR}${MANDIR}${lnk:E}${sub}/${lnk:R}.0${MCOMPRESSSUFFIX}; \
- t=${DESTDIR}${MANDIR}${file:E}${sub}/${file:R}.0${MCOMPRESSSUFFIX}; \
- echo $$t -\> $$l; \
- rm -f $$t; ln $$l $$t;
-. endfor
+. for _subdir in ${MANSUBDIR}
+ @set ${MLINKS}; \
+ while test $$# -ge 2; do \
+ name=$$1; \
+ shift; \
+ dir=${DESTDIR}${MANDIR}$${name##*.}; \
+ l=$${dir}${_subdir}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
+ name=$$1; \
+ shift; \
+ dir=${DESTDIR}${MANDIR}$${name##*.}; \
+ t=$${dir}${_subdir}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
+ echo $$t -\> $$l; \
+ rm -f $$t; \
+ ln $$l $$t; \
+ done
. endfor
.endif
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 435a43296f3..807a442285e 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.prog.mk,v 1.26 2001/07/20 19:15:39 mickey Exp $
+# $OpenBSD: bsd.prog.mk,v 1.27 2001/07/20 19:48:26 mickey Exp $
# $NetBSD: bsd.prog.mk,v 1.55 1996/04/08 21:19:26 jtc Exp $
# @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
@@ -141,12 +141,16 @@ realinstall:
install: maninstall _SUBDIRUSE
.if defined(LINKS) && !empty(LINKS)
-. for lnk file in ${LINKS}
- @l=${DESTDIR}${BINDIR}${lnk}; \
- t=${DESTDIR}${BINDIR}${file}; \
- echo $$t -\> $$l; \
- rm -f $$t; ln $$l $$t
-. endfor
+ @set ${LINKS}; \
+ while test $$# -ge 2; do \
+ l=${DESTDIR}$$1; \
+ shift; \
+ t=${DESTDIR}$$1; \
+ shift; \
+ echo $$t -\> $$l; \
+ rm -f $$t; \
+ ln $$l $$t; \
+ done; true
.endif
maninstall: afterinstall