aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-09 23:47:15 +0000
committerRoy Marples <roy@marples.name>2008-01-09 23:47:15 +0000
commit5b30c5154d8f641737d7c669612d06f2b0d7fe49 (patch)
tree05407663de162bab964d65f47a28c26d0a4a66c6
parentddf25cbcb76bccbfe28d15f1e73c637becaa54e7 (diff)
install correctly on NetBSD.
-rw-r--r--default.mk52
-rw-r--r--src/lib.mk2
-rw-r--r--subdir.mk10
3 files changed, 32 insertions, 32 deletions
diff --git a/default.mk b/default.mk
index 51be6859..1dc63a21 100644
--- a/default.mk
+++ b/default.mk
@@ -1,21 +1,21 @@
# Common makefile settings
# We shouldn't use PREFIX as we need to install into /
-_LIBNAME_SH = l=`readlink /lib`; case "$$l" in /lib64|lib64) echo "lib64";; *) echo "lib";; esac
-_LIBNAME != $(_LIB_SH)
-LIBNAME = $(_LIBNAME)$(shell $(_LIBNAME_SH))
-RC_LIB = /$(LIBNAME)/rc
+_LIBNAME_SH= l=`readlink /lib`; case "$$l" in /lib64|lib64) echo "lib64";; *) echo "lib";; esac
+_LIBNAME!= ${_LIBNAME_SH}
+LIBNAME= ${_LIBNAME}$(shell ${_LIBNAME_SH})
+RC_LIB= /${LIBNAME}/rc
-INSTALL ?= install
+INSTALL?= install
-_OS_SH = u=`uname -s`; case "$${u}" in *BSD|DragonFly) echo "BSD";; *) echo "$${u}";; esac
-_OS != $(_OS_SH)
-OS ?= $(_OS)$(shell $(_OS_SH))
+_OS_SH= u=`uname -s`; case "$${u}" in *BSD|DragonFly) echo "BSD";; *) echo "$${u}";; esac
+_OS!= ${_OS_SH}
+OS?= ${_OS}$(shell ${_OS_SH})
# We store the contents of the directory for ease of use in Makefiles
-_CONTENTS_SH = ls -1 | grep -v Makefile | xargs
-_CONTENTS != $(_CONTENTS_SH)
-CONTENTS = $(_CONTENTS)$(shell $(_CONTENTS_SH))
+_CONTENTS_SH= ls -1 | grep -v Makefile | xargs
+_CONTENTS!= ${_CONTENTS_SH}
+CONTENTS= ${_CONTENTS}$(shell ${_CONTENTS_SH})
# Recursive rules
# Adapted from FreeBSDs bsd.subdir.mk
@@ -37,28 +37,28 @@ _SUBDIR = @${_+_}for x in ${SUBDIR}; do \
done
all:
- $(_SUBDIR)
+ ${_SUBDIR}
clean::
- $(_SUBDIR)
+ ${_SUBDIR}
depend::
- $(_SUBDIR)
+ ${_SUBDIR}
install::
- $(_SUBDIR)
+ ${_SUBDIR}
-install:: $(BIN) $(CONF) $(CONF_APPEND)
- if test -n "$(DIR)"; then $(INSTALL) -d $(DESTDIR)$(DIR) || exit $$?; fi
- if test -n "$(BIN)"; then $(INSTALL) $(BIN) $(DESTDIR)$(DIR) || exit $$?; fi
- if test -n "$(INC)"; then $(INSTALL) -m 0644 $(INC) $(DESTDIR)$(DIR) || exit $$?; fi
- for x in $(CONF); do \
- if ! test -e $(DESTDIR)$(DIR)/$$x; then \
- $(INSTALL) -m 0644 $$x $(DESTDIR)$(DIR) || exit $$?; \
+install:: ${BIN} ${CONF} ${CONF_APPEND}
+ if test -n "${DIR}"; then ${INSTALL} -d ${DESTDIR}$(DIR} || exit $$?; fi
+ if test -n "${BIN}"; then ${INSTALL} ${BIN} ${DESTDIR}$(DIR} || exit $$?; fi
+ if test -n "${INC}"; then ${INSTALL} -m 0644 ${INC} ${DESTDIR}${DIR} || exit $$?; fi
+ for x in ${CONF}; do \
+ if ! test -e ${DESTDIR}${DIR}/$$x; then \
+ ${INSTALL} -m 0644 $$x ${DESTDIR}${DIR} || exit $$?; \
fi; \
done
- for x in $(CONF_APPEND); do \
- if test -e $(DESTDIR)$(DIR)/$$x; then \
- cat $$x >> $(DESTDIR)$(DIR)/$$x || exit $$?; \
+ for x in ${CONF_APPEND}; do \
+ if test -e ${DESTDIR}${DIR}/$$x; then \
+ cat $$x >> ${DESTDIR}${DIR}/$$x || exit $$?; \
else \
- $(INSTALL) -m 0644 $$x $(DESTDIR)$(DIR) || exit $$?; \
+ ${INSTALL} -m 0644 $$x ${DESTDIR}${DIR} || exit $$?; \
fi; \
done
diff --git a/src/lib.mk b/src/lib.mk
index 39a9454c..ed1db71d 100644
--- a/src/lib.mk
+++ b/src/lib.mk
@@ -55,7 +55,7 @@ install: all
${INSTALL} -m ${LIBMODE} lib${LIB}.a ${DESTDIR}${LIBDIR}
${INSTALL} -d ${DESTDIR}${SHLIBDIR}
${INSTALL} -m ${LIBMODE} ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
- ln -fs ${SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
+ ln -fs ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIBLINK}
${INSTALL} -d ${DESTDIR}${INCDIR}
for x in ${INCS}; do ${INSTALL} -m ${INCMODE} $$x ${DESTDIR}${INCDIR}; done
diff --git a/subdir.mk b/subdir.mk
index 1933c529..86efca04 100644
--- a/subdir.mk
+++ b/subdir.mk
@@ -1,7 +1,7 @@
# Recursive rules
# Adapted from FreeBSDs bsd.subdir.mk
_+_ ?= +
-ECHODIR ?= true
+ECHODIR ?= echo
_SUBDIR = @${_+_}for x in ${SUBDIR}; do \
if test -d $$x; then \
${ECHODIR} "===> ${DIRPRFX}$$x ($@)"; \
@@ -18,10 +18,10 @@ _SUBDIR = @${_+_}for x in ${SUBDIR}; do \
done
all:
- $(_SUBDIR)
+ ${_SUBDIR}
clean:
- $(_SUBDIR)
+ ${_SUBDIR}
install:
- $(_SUBDIR)
+ ${_SUBDIR}
depend:
- $(_SUBDIR)
+ ${_SUBDIR}