forked from github/abduco
Create leading directories when installing
Note: install(1) is not really specified and the -D option does not seem to be portable. For example the FreeBSD manual page documents a different behavior. We therefore use a somewhat ugly two step process with an installdirs target.
This commit is contained in:
parent
070e34b502
commit
7d0e9d91b6
10
Makefile
10
Makefile
|
|
@ -36,9 +36,13 @@ dist: clean
|
|||
@echo creating dist tarball
|
||||
@git archive --prefix=abduco-${VERSION}/ -o abduco-${VERSION}.tar.gz HEAD
|
||||
|
||||
install: abduco
|
||||
installdirs:
|
||||
@${INSTALL} -d ${DESTDIR}${PREFIX}/bin \
|
||||
${DESTDIR}${MANPREFIX}/man1
|
||||
|
||||
install: abduco installdirs
|
||||
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
|
||||
@${INSTALL} abduco ${DESTDIR}${PREFIX}/bin
|
||||
@${INSTALL} -m 0755 abduco ${DESTDIR}${PREFIX}/bin
|
||||
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
|
||||
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
||||
@sed "s/VERSION/${VERSION}/g" < abduco.1 > ${DESTDIR}${MANPREFIX}/man1/abduco.1
|
||||
|
|
@ -57,4 +61,4 @@ uninstall:
|
|||
@echo removing zsh completion file from ${DESTDIR}/usr/share/zsh/site-functions
|
||||
@rm -f ${DESTDIR}${ZSHPREFIX}/share/zsh/site-functions/_abduco
|
||||
|
||||
.PHONY: all clean dist install install-strip uninstall debug
|
||||
.PHONY: all clean dist install installdirs install-strip uninstall debug
|
||||
|
|
|
|||
Loading…
Reference in New Issue