This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Looking at the end of PR10996 [3/4] (treelang changes)


Treelang is still using placing parse.c, parse.h and lex.c in the source
directory.

This changes those to honor parsedir.  It also does a
's/$(srcdir)\/doc/$(docdir)/' to match the other Make-lang.in

Bootstrapped i686-pc-cygwin.

OK to install?

FWIW, treelangs's make install does not work on targets that like cygwin
that define $(exeext).  It attempts to install a program named
tree1.exe.exe.  From what I can tell, this never did work, since that
section of the makefile is unchanged since revision 1.1.

I'll file a PR for this a bit later.

Kelley Cook






2003-10-21  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (parse.o): Honor $(parsedir).
	(lex.o): Likewise.
	(lex.c): Likewise
	(parse.c, parse.h): Likewise.
	($(docobjdir)/treelang.info): Replace $(srcdir)/doc with $(docdir).
	(dvi): Likewise.

*** Make-lang.in.orig	Tue Oct 21 14:27:23 2003
--- Make-lang.in	Tue Oct 21 14:37:31 2003
*************** GCC_EXTRAS = -B./ -B$(build_tooldir)/bin
*** 57,65 ****
  
  # GCC_FOR_TREELANG = ./xgcc $(GCC_EXTRAS)
  
! TREE_GENERATED = $(srcdir)/treelang/lex.c $(srcdir)/treelang/parse.c \
!   $(srcdir)/treelang/parse.h $(srcdir)/treelang/parse.output \
!   $(srcdir)/treelang/TAGS
  
  TREE_EXES = tree1$(exeext)
  
--- 57,65 ----
  
  # GCC_FOR_TREELANG = ./xgcc $(GCC_EXTRAS)
  
! TREE_GENERATED = $(parsedir)/treelang/lex.c $(parsedir)/treelang/parse.c \
!   $(parsedir)/treelang/parse.h $(parsedir)/treelang/parse.output \
!   $(parsedir)/treelang/TAGS
  
  TREE_EXES = tree1$(exeext)
  
*************** treelang/treetree.o: treelang/treetree.c
*** 109,130 ****
  treelang/tree-convert.o: treelang/tree-convert.c $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h diagnostic.h $(TREE_H) flags.h toplev.h langhooks.h $(TM_H)
  
! treelang/parse.o: treelang/parse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
!   $(TM_H) diagnostic.h treelang/treelang.h input.h treelang/treetree.h
  
! treelang/lex.o: treelang/lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) diagnostic.h $(TREE_H) treelang/treelang.h input.h treelang/parse.h
  
  # generated files the files from lex and yacc are put into the source
  # directory in case someone wants to build but does not have
  # lex/yacc
  
! $(srcdir)/treelang/lex.c: $(srcdir)/treelang/lex.l
! 	$(LEX) $(LEXFLAGS) -o$(srcdir)/treelang/lex.c $(srcdir)/treelang/lex.l
  
! $(srcdir)/treelang/parse.c $(srcdir)/treelang/parse.h: $(srcdir)/treelang/parse.y
  	$(BISON) $(BISONFLAGS) -v --defines \
! 	--output=$(srcdir)/treelang/parse.c $(srcdir)/treelang/parse.y
  
  # -v
  
--- 109,135 ----
  treelang/tree-convert.o: treelang/tree-convert.c $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h diagnostic.h $(TREE_H) flags.h toplev.h langhooks.h $(TM_H)
  
! treelang/parse.o: $(parsedir)/treelang/parse.h $(parsedir)/treelang/parse.c \
!   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) diagnostic.h treelang/treelang.h \
!   input.h 
! 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
! 	$(parsedir)/treelang/parse.c $(OUTPUT_OPTION)
  
! treelang/lex.o: $(parsedir)/treelang/lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) diagnostic.h $(TREE_H) treelang/treelang.h input.h treelang/parse.h
+ 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ 	$(parsedir)/treelang/lex.c $(OUTPUT_OPTION)
  
  # generated files the files from lex and yacc are put into the source
  # directory in case someone wants to build but does not have
  # lex/yacc
  
! $(parsedir)/treelang/lex.c: $(srcdir)/treelang/lex.l
! 	$(LEX) $(LEXFLAGS) -o$(parsedir)/treelang/lex.c $(srcdir)/treelang/lex.l
  
! $(parsedir)/treelang/parse.c $(parsedir)/treelang/parse.h: $(srcdir)/treelang/parse.y
  	$(BISON) $(BISONFLAGS) -v --defines \
! 	--output=$(parsedir)/treelang/parse.c $(srcdir)/treelang/parse.y
  
  # -v
  
*************** treelang.tags: force
*** 147,165 ****
  info:: $(docobjdir)/treelang.info
  
  $(docobjdir)/treelang.info: $(srcdir)/treelang/treelang.texi \
! 	 $(srcdir)/doc/include/gcc-common.texi \
! 	 $(srcdir)/doc/include/gpl.texi \
! 	 $(srcdir)/doc/include/fdl.texi \
! 	 $(srcdir)/doc/include/funding.texi \
  	 stmp-docobjdir
  	cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -Idoc/include \
  	  -o $@ treelang/treelang.texi
  
  dvi:: $(srcdir)/treelang/treelang.texi \
! 	 $(srcdir)/doc/include/gcc-common.texi \
! 	 $(srcdir)/doc/include/gpl.texi \
! 	 $(srcdir)/doc/include/fdl.texi \
! 	 $(srcdir)/doc/include/funding.texi
  	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  	cd treelang && $(TEXI2DVI) -I $$s/doc/include $$s/treelang/treelang.texi
  
--- 152,170 ----
  info:: $(docobjdir)/treelang.info
  
  $(docobjdir)/treelang.info: $(srcdir)/treelang/treelang.texi \
! 	 $(docdir)/include/gcc-common.texi \
! 	 $(docdir)/include/gpl.texi \
! 	 $(docdir)/include/fdl.texi \
! 	 $(docdir)/include/funding.texi \
  	 stmp-docobjdir
  	cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -Idoc/include \
  	  -o $@ treelang/treelang.texi
  
  dvi:: $(srcdir)/treelang/treelang.texi \
! 	 $(docdir)/include/gcc-common.texi \
! 	 $(docdir)/include/gpl.texi \
! 	 $(docdir)/include/fdl.texi \
! 	 $(docdir)/include/funding.texi
  	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  	cd treelang && $(TEXI2DVI) -I $$s/doc/include $$s/treelang/treelang.texi
  



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]