1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00

lang/bf2c: (upstream) Makefile cleanups

- use DESTDIR in upstream Makefile and drop MAKE_ARGS
- define install-strip target in upstream Makefile and use it
- replace pkg-plist by PORTDOCS and PLIST_FILES
This commit is contained in:
Rene Ladan 2014-02-21 11:31:12 +00:00
parent 1ffeb794cc
commit 89411770dc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=345375
3 changed files with 41 additions and 9 deletions

View File

@ -11,19 +11,24 @@ COMMENT= Optimizing BrainF*ck to C compiler
LICENSE= BSD2CLAUSE
PATCH_STRIP= -p1
USE_GITHUB= yes
GH_ACCOUNT= rene0
GH_COMMIT= 4761081
USE_XZ= yes
MAKE_ARGS= PREFIX="${STAGEDIR}${PREFIX}"
OPTIONS_DEFINE= DOCS
INSTALL_TARGET= install-strip
PORTDOCS= README.md
PLIST_FILES= bin/bf2c bin/gen_bf
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/bf2c
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gen_bf
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>

View File

@ -0,0 +1,31 @@
commit 186730742519bfa9cb7f9668fb508a78e65d26cc
Author: René Ladan <r.c.ladan@gmail.com>
Date: Fri Feb 21 12:20:57 2014 +0100
Add DESTDIR support and add install-strip and uninstall targets.
diff --git a/Makefile b/Makefile
index d527b55..2ddbb8b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
-.PHONY: all clean install
+.PHONY: all clean install install-strip uninstall
+
+INSTALL_PROGRAM?=install
all: bf2c gen_bf
@@ -17,4 +19,11 @@ clean:
rm bf2c gen_bf $(obj)
install:
- install bf2c gen_bf $(PREFIX)/bin
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL_PROGRAM) bf2c gen_bf $(DESTDIR)$(PREFIX)/bin
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='install -s' install
+
+uninstall:
+ rm -rf $(DESTDIR)$(PREFIX)/bin

View File

@ -1,4 +0,0 @@
bin/bf2c
bin/gen_bf
%%PORTDOCS%%%%DOCSDIR%%/README.md
%%PORTDOCS%%@dirrm %%DOCSDIR%%