On Fri, Nov 14, 2008 at 10:44:08AM -0500, Tom Lane wrote: > preproc.y should be removed by make maintainer-clean. For consistency > it probably ought to be listed in the distprep target too, even though > it would be indirectly updated by the preproc.c target. I suspect it > would be a good idea to list preproc.c's antecedent as > $(srcdir)/preproc.y not just preproc.y. Also, you'll need to add > preproc.y to .cvsignore.
Added. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED] Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!
diff --exclude CVS -ruN pgsql/src/interfaces/ecpg/preproc/.cvsignore pgsql/src.mm/interfaces/ecpg/preproc/.cvsignore --- pgsql/src/interfaces/ecpg/preproc/.cvsignore 2008-05-20 17:41:12.000000000 +0200 +++ pgsql/src.mm/interfaces/ecpg/preproc/.cvsignore 2008-11-14 17:35:09.000000000 +0100 @@ -1,3 +1,4 @@ +preproc.y preproc.c preproc.h pgc.c diff --exclude CVS -ruN pgsql/src/interfaces/ecpg/preproc/Makefile pgsql/src.mm/interfaces/ecpg/preproc/Makefile --- pgsql/src/interfaces/ecpg/preproc/Makefile 2008-11-14 11:01:55.000000000 +0100 +++ pgsql/src.mm/interfaces/ecpg/preproc/Makefile 2008-11-14 17:34:38.000000000 +0100 @@ -38,27 +38,30 @@ $(srcdir)/preproc.h: $(srcdir)/preproc.c ; -$(srcdir)/preproc.c: preproc.y +$(srcdir)/preproc.c: $(srcdir)/preproc.y ifdef BISON $(BISON) -d $(BISONFLAGS) -o $@ $< else @$(missing) bison $< $@ endif -$(srcdir)/pgc.c: pgc.l +$(srcdir)/pgc.c: $(srcdir)/pgc.l ifdef FLEX $(FLEX) $(FLEXFLAGS) -o'$@' $< else @$(missing) flex $< $@ endif +$(srcdir)/preproc.y: $(top_srcdir)/src/backend/parser/gram.y + $(PERL) $(srcdir)/parse.pl $(srcdir) < $< > $@ + ecpg_keywords.o c_keywords.o keywords.o preproc.o parser.o: preproc.h # instead of maintaining our own list, take the one from the backend keywords.c: % : $(top_srcdir)/src/backend/parser/% rm -f $@ && $(LN_S) $< . -distprep: $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c +distprep: $(srcdir)/preproc.y $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c install: all installdirs $(INSTALL_PROGRAM) ecpg$(X) '$(DESTDIR)$(bindir)' @@ -78,4 +81,4 @@ # want to ship those files in the distribution for people with # inadequate tools. maintainer-clean: distclean - rm -f $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c + rm -f $(srcdir)/preproc.y $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c diff --exclude CVS -ruN pgsql/src/tools/msvc/Solution.pm pgsql/src.mm/tools/msvc/Solution.pm --- pgsql/src/tools/msvc/Solution.pm 2008-08-17 09:09:16.000000000 +0200 +++ pgsql/src.mm/tools/msvc/Solution.pm 2008-11-13 15:15:50.000000000 +0100 @@ -239,6 +239,19 @@ if ( IsNewer( + 'src\interfaces\ecpg\preproc\preproc.y', + 'src\backend\parser\gram.y' + ) + ) + { + print "Generating preproc.y...\n"; + chdir('src\interfaces\ecpg\preproc'); + system('perl parse.pl < ..\..\..\backend\parser\gram.y > preproc.y'); + chdir('..\..\..\..'); + } + + if ( + IsNewer( 'src\interfaces\ecpg\include\ecpg_config.h', 'src\interfaces\ecpg\include\ecpg_config.h.in' )
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers