changed install to use the install program
authorPatrik Gornicz <Gornicz.P@gmail.com>
Sat, 2 May 2009 18:35:45 +0000 (14:35 -0400)
committerPatrik Gornicz <Gornicz.P@gmail.com>
Sat, 2 May 2009 18:35:45 +0000 (14:35 -0400)
Makefile

index 59420c8..1d4fa02 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,14 +64,17 @@ endif
 .PHONY: all
 all: ${TARGET}
 
-# a quick install and uninstall instructions
+INSTALL := install
+
+# HACK install
 install:
-       mkdir -p /usr/include/pg/
-       cp inc/* /usr/include/pg/
-       cp -d ${WORKINGDIR}${REALNAME} /usr/lib/
-       cp -d ${WORKINGDIR}${LINKERNAME} /usr/lib/
-       cp -d ${WORKINGDIR}${SONAME} /usr/lib/
+       ${INSTALL} -d /usr/include/pg/
+       ${INSTALL} -t /usr/include/pg/ inc/*
+       ${INSTALL} -t /usr/lib ${WORKINGDIR}${REALNAME}
+       ln -sfn ${REALNAME} /usr/lib/${LINKERNAME}
+       ln -sfn ${REALNAME} /usr/lib/${SONAME}
 
+# HACK uninstall
 uninstall:
        rm -rf /usr/include/pg
        rm /usr/lib/${REALNAME}
@@ -90,8 +93,6 @@ ${TARGETTMP}: ${OBJS}
 ${TARGET}: ${TARGETTMP} | ${WORKINGDIR}
        ${Q1}${PRNTFMT} "cp" "$@"
        ${Q2}cp $< $@
-       ${Q2}ln -sfn ${REALNAME} ${WORKINGDIR}/${LINKERNAME}
-       ${Q2}ln -sfn ${REALNAME} ${WORKINGDIR}/${SONAME}
 
 # how to make a directory
 ${BLDDIRS}: