linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Loeliger <jdl@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: dtc: Use a custom name for lexer output
Date: Wed, 26 Sep 2007 14:05:54 +1000	[thread overview]
Message-ID: <20070926040554.GA32097@localhost.localdomain> (raw)

This patch makes dtc use the name dtc-lexer.lex.c for the flex output,
instead of the default lex.yy.c.  If nothing else that makes the
filename more obvious when/if dtc is embedded into other projects.

It also explicitly requests flex as the lexer generator, rather than
using make's default $(LEX).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: dtc/Makefile
===================================================================
--- dtc.orig/Makefile	2007-09-26 13:53:58.000000000 +1000
+++ dtc/Makefile	2007-09-26 13:57:52.000000000 +1000
@@ -49,6 +49,7 @@ CFLAGS = -Wall -g -Os
 LDFLAGS = -Llibfdt
 
 BISON = bison
+LEX = flex
 
 INSTALL = /usr/bin/install
 DESTDIR =
@@ -83,7 +84,7 @@ all: dtc ftdump libfdt tests
 DTC_PROGS = dtc ftdump
 DTC_OBJS = dtc.o flattree.o fstree.o data.o livetree.o \
 		srcpos.o treesource.o \
-		dtc-parser.tab.o lex.yy.o
+		dtc-parser.tab.o dtc-lexer.lex.o
 DTC_DEPFILES = $(DTC_OBJS:%.o=%.d)
 
 BIN += dtc ftdump
@@ -96,9 +97,9 @@ dtc-parser.tab.c dtc-parser.tab.h dtc-pa
 $(VERSION_FILE): Makefile FORCE
 	$(call filechk,version)
 
-lex.yy.c: dtc-lexer.l
+dtc-lexer.lex.c: dtc-lexer.l
 	@$(VECHO) LEX $@
-	$(LEX) $<
+	$(LEX) -o $@ $<
 
 dtc: $(DTC_OBJS)
 
@@ -138,7 +139,7 @@ clean: libfdt_clean tests_clean
 	@$(VECHO) CLEAN
 	rm -f $(STD_CLEANFILES)
 	rm -f $(GEN_CLEANFILES)
-	rm -f *.tab.[ch] lex.yy.c *.output vgcore.*
+	rm -f *.tab.[ch] *.lex.c *.output vgcore.*
 	rm -f $(BIN)
 
 install: all

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

             reply	other threads:[~2007-09-26  4:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26  4:05 David Gibson [this message]
2007-09-26  5:25 ` dtc: Use a custom name for lexer output David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070926040554.GA32097@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=jdl@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).