1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

- Convert USE_GMAKE, drop currently no-op MAKE_JOBS_SAFE

- Utilize new options framework for DOCS and EXAMPLES
- Undo the damage done in r310483 (per ports/174183): restore the patch
  instead of hard-to-read in-place editing of Makefile; switch back to
  atomic, $cwd-agnostic INSTALL_* statements

Pointyhat to:	Kato's ports sweatshop lemmings
This commit is contained in:
Alexey Dokuchaev 2013-08-06 15:44:38 +00:00
parent 52438ab709
commit 19c1fddd65
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=324319
2 changed files with 40 additions and 18 deletions

View File

@ -13,33 +13,26 @@ COMMENT= Cross-assembler for variety of microprocessors and controllers
LICENSE= GPLv2
USE_GMAKE= yes
MAKE_JOBS_SAFE= yes
USES= gmake
PORTDOCS= *
PORTDOCS= CONVERSION_C166.TXT MANUAL.TXT README*.TXT
PORTEXAMPLES= *
post-patch:
@${REINPLACE_CMD} -e \
's|-O2|| ; \
s|CFLAGS=|CFLAGS+=| ; \
s|$$(CC) -O|$$(CXX) $$(LDFLAGS)| ; \
s|-lstdc++||' ${WRKSRC}/Makefile
OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.options.mk>
do-install:
(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} ${PREFIX}/bin)
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
@${MKDIR} ${PREFIX}/libdata/${PORTNAME}
(cd ${WRKSRC}/include \
&& ${INSTALL_DATA} * ${PREFIX}/libdata/${PORTNAME})
.if !defined(NOPORTDOCS)
${INSTALL_DATA} ${WRKSRC}/include/* ${PREFIX}/libdata/${PORTNAME}
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
.for i in CONVERSION_C166.TXT MANUAL.TXT README*.TXT
(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR})
.endfor
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
.endif
.if !defined(NOPORTEXAMPLES)
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${EXAMPLESDIR}
(cd ${WRKSRC}/samples && ${INSTALL_DATA} * ${EXAMPLESDIR})
${INSTALL_DATA} ${WRKSRC}/samples/* ${EXAMPLESDIR}
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,29 @@
--- Makefile.orig Thu Feb 13 19:58:06 2003
+++ Makefile Thu Feb 13 19:58:18 2003
@@ -17,8 +17,8 @@
# new gnu compilers have a really annoying default behavior of wrapping
# error message lines. The default should be NO-WRAPPING.
-OPTIONS=-O2 -Wall -x c++ -fmessage-length=0 -fno-exceptions
-CFLAGS=$(INCLUDES) $(OPTIONS)
+OPTIONS=-fmessage-length=0 -fno-exceptions
+CXXFLAGS+=$(INCLUDES) $(OPTIONS)
OBJECTS = \
globals.o \
@@ -44,7 +44,7 @@
all : tpasm
tpasm : $(OBJECTS)
- $(CC) -O $(OBJECTS) -lstdc++ -o tpasm
+ $(CXX) $(OBJECTS) -o $@
clean :
rm -f *.o
@@ -58,5 +58,5 @@
# suffix rules (this makes sure that the ".o" files
# end up in their respective directories on all systems)
.c.o:
- ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ -c $<
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -o $@ -c $<