summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2001-07-20 23:02:22 +0000
committerMarc Espie <espie@cvs.openbsd.org>2001-07-20 23:02:22 +0000
commit4e68f58da0d0f68dc5175735361df4aea6790778 (patch)
treeed414a3e038a01bd3493ecf93a35bf11d85c9366 /share
parentb071c2985573490b9ab71582e4176d6b6bea44e1 (diff)
One BINDIR too many, I don't know how I pulled that one.
Diffstat (limited to 'share')
-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, 31 insertions, 57 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 277965b625b..e8bdd2bbefa 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.lib.mk,v 1.32 2001/07/20 19:48:26 mickey Exp $
+# $OpenBSD: bsd.lib.mk,v 1.33 2001/07/20 23:02:21 espie 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,8 +9,7 @@
.endif
.if exists(${.CURDIR}/shlib_version)
-SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major
-SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
+.include "${.CURDIR}/shlib_version"
.endif
.MAIN: all
@@ -134,8 +133,8 @@ _LIBS+=lib${LIB}_p.a
.if (${MACHINE_ARCH} != "mips")
_LIBS+=lib${LIB}_pic.a
.endif
-.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
-_LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
+.if defined(major) && defined(minor)
+_LIBS+=lib${LIB}.so.${major}.${minor}
.endif
.endif
@@ -174,21 +173,12 @@ lib${LIB}_pic.a:: ${SOBJS}
@${AR} cq lib${LIB}_pic.a `${LORDER} ${SOBJS} | tsort -q`
${RANLIB} lib${LIB}_pic.a
-.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}
+lib${LIB}.so.${major}.${minor}: ${SOBJS} ${DPADD}
+ @echo building shared ${LIB} library \(version ${major}.${minor}\)
+ @rm -f lib${LIB}.so.${major}.${minor}
${CC} -shared ${PICFLAG} \
- -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -o lib${LIB}.so.${major}.${minor} \
`${LORDER} ${SOBJS}|tsort -q` ${LDADD}
-.endif
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
# the following looks XXX to me... -- cgd
@@ -262,25 +252,21 @@ realinstall:
.endif
chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
.endif
-.if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
+.if !defined(NOPIC) && defined(major) && defined(minor)
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${DESTDIR}${LIBDIR}
+ lib${LIB}.so.${major}.${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)
- @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
+. for lnk file in ${LINKS}
+ @l=${DESTDIR}${lnk}; \
+ t=${DESTDIR}${file}; \
+ echo $$t -\> $$l; \
+ rm -f $$t; ln $$l $$t
+. endfor
.endif
install: maninstall _SUBDIRUSE
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index 5ec9adb58ae..873c1505126 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.man.mk,v 1.22 2001/07/20 19:48:26 mickey Exp $
+# $OpenBSD: bsd.man.mk,v 1.23 2001/07/20 23:02:21 espie 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,21 +116,13 @@ maninstall:
done
.endif
.if defined(MLINKS) && !empty(MLINKS)
-. 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
+. 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
. endfor
.endif
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 807a442285e..66128580e7c 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.prog.mk,v 1.27 2001/07/20 19:48:26 mickey Exp $
+# $OpenBSD: bsd.prog.mk,v 1.28 2001/07/20 23:02:21 espie 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,16 +141,12 @@ realinstall:
install: maninstall _SUBDIRUSE
.if defined(LINKS) && !empty(LINKS)
- @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
+. for lnk file in ${LINKS}
+ @l=${DESTDIR}${lnk}; \
+ t=${DESTDIR}${file}; \
+ echo $$t -\> $$l; \
+ rm -f $$t; ln $$l $$t
+. endfor
.endif
maninstall: afterinstall