浏览代码

Merge pull request #25 from kawaiiamber/DESTDIR

Simplify DESTDIR
master
phillbush GitHub 4 年前
父节点
当前提交
b2a9340acb
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 9 次插入6 次删除
  1. +9
    -6
      Makefile

+ 9
- 6
Makefile 查看文件

@@ -1,5 +1,8 @@
include config.mk

bindir = ${DESTDIR}${PREFIX}
mandir = ${DESTDIR}${MANPREFIX}

SRCS = ${PROG}.c
OBJS = ${SRCS:.c=.o}

@@ -17,13 +20,13 @@ clean:
-rm ${OBJS} ${PROG}

install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
install -m 755 ${PROG} ${DESTDIR}${PREFIX}/bin/${PROG}
mkdir -p ${DESTDIR}${MANPREFIX}/man1
install -m 644 ${PROG}.1 ${DESTDIR}${MANPREFIX}/man1/${PROG}.1
mkdir -p ${bindir}/bin
install -m 755 ${PROG} ${bindir}/bin/${PROG}
mkdir -p ${mandir}/man1
install -m 644 ${PROG}.1 ${mandir}/man1/${PROG}.1

uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/${PROG}
rm -f ${DESTDIR}${MANPREFIX}/man1/${PROG}.1
rm -f ${bindir}/bin/${PROG}
rm -f ${mandir}/man1/${PROG}.1

.PHONY: all clean install uninstall

正在加载...
取消
保存