Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga/stand/bootblock/txlt . don't depend on -ll to...
details: https://anonhg.NetBSD.org/src/rev/708f4ed8ba31
branches: trunk
changeset: 335968:708f4ed8ba31
user: aymeric <aymeric%NetBSD.org@localhost>
date: Tue Feb 03 19:58:41 2015 +0000
description:
. don't depend on -ll to provide a main() function. Lex on ArchLinux doesn't
provide a libl
. still depend on -ll for the !HOSTPROG case for yywrap()
. ANSIfy
diffstat:
sys/arch/amiga/stand/bootblock/txlt/Makefile | 8 ++++++--
sys/arch/amiga/stand/bootblock/txlt/txlt.l | 15 +++++++++++----
2 files changed, 17 insertions(+), 6 deletions(-)
diffs (51 lines):
diff -r abe13fba8307 -r 708f4ed8ba31 sys/arch/amiga/stand/bootblock/txlt/Makefile
--- a/sys/arch/amiga/stand/bootblock/txlt/Makefile Tue Feb 03 10:25:53 2015 +0000
+++ b/sys/arch/amiga/stand/bootblock/txlt/Makefile Tue Feb 03 19:58:41 2015 +0000
@@ -1,8 +1,12 @@
-# $NetBSD: Makefile,v 1.8 2005/12/11 12:16:36 christos Exp $
+# $NetBSD: Makefile,v 1.9 2015/02/03 19:58:41 aymeric Exp $
#
PROG=txlt
NOMAN= # defined
-LDADD=-ll
CLEANFILES+= txlt.c
+.ifndef HOSTPROG
+LDADD+= -ll
+DPADD+= ${LIBL}
+.endif
+
.include <bsd.prog.mk>
diff -r abe13fba8307 -r 708f4ed8ba31 sys/arch/amiga/stand/bootblock/txlt/txlt.l
--- a/sys/arch/amiga/stand/bootblock/txlt/txlt.l Tue Feb 03 10:25:53 2015 +0000
+++ b/sys/arch/amiga/stand/bootblock/txlt/txlt.l Tue Feb 03 19:58:41 2015 +0000
@@ -7,14 +7,13 @@
\ [._A-Za-z][A-Za-z0-9_.]*/\, munchit(yytext);
. putchar(*yytext);
%%
-/* $NetBSD: txlt.l,v 1.5 2011/06/20 20:25:47 he Exp $ */
+/* $NetBSD: txlt.l,v 1.6 2015/02/03 19:58:41 aymeric Exp $ */
#include <string.h>
void
-munchit(s)
- char *s;
-{
+munchit(char *s) {
+
putchar(*s++);
if ((!strncmp(s, "fp", 2) ||
!strncmp(s, "sp", 2) ||
@@ -24,3 +23,11 @@
else
printf("%%pc@(%s)",s);
}
+
+int
+main(void) {
+ while (yylex() != 0)
+ ;
+
+ return 0;
+}
Home |
Main Index |
Thread Index |
Old Index