From 2d83fb3073c0780c57c9797df440e1a288a9539c Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Sun, 13 Oct 2013 16:37:08 +0200 Subject: [PATCH] Move the fixup tool from the parser to the generator folder The parser will be going away at some point in the future, but we will still need the fixup step. And the fixup step is really more of a preliminary step for the generator anyway. --- Makefile.include | 6 +++--- configure.ac | 2 +- generator/Makefile.am | 19 +++++++++++++------ {parser => generator}/gapi-fixup.cs | 0 {parser => generator}/gapi3-fixup.in | 0 parser/Makefile.am | 12 ++++-------- sample/opaquetest/Makefile.am | 2 +- 7 files changed, 22 insertions(+), 19 deletions(-) rename {parser => generator}/gapi-fixup.cs (100%) rename {parser => generator}/gapi3-fixup.in (100%) diff --git a/Makefile.include b/Makefile.include index b884b96e9..9d316caeb 100644 --- a/Makefile.include +++ b/Makefile.include @@ -23,12 +23,12 @@ EXTRA_DIST = $(RAW_API) $(SYMBOLS) $(ASSEMBLY).config.in $(METADATA) $(sources) build_symbols = $(addprefix --symbols=$(srcdir)/, $(SYMBOLS)) -$(API): $(METADATA) $(RAW_API) $(SYMBOLS) $(top_builddir)/parser/gapi-fixup.exe +$(API): $(METADATA) $(RAW_API) $(SYMBOLS) $(top_builddir)/generator/gapi-fixup.exe cp $(srcdir)/$(RAW_API) $(API) chmod u+w $(API) @if test -n '$(METADATA)'; then \ - echo "$(RUNTIME) $(top_builddir)/parser/gapi-fixup.exe --api=$(API) --metadata=$(srcdir)/$(METADATA) $(build_symbols)"; \ - $(RUNTIME) $(top_builddir)/parser/gapi-fixup.exe --api=$(API) --metadata=$(srcdir)/$(METADATA) $(build_symbols); \ + echo "$(RUNTIME) $(top_builddir)/generator/gapi-fixup.exe --api=$(API) --metadata=$(srcdir)/$(METADATA) $(build_symbols)"; \ + $(RUNTIME) $(top_builddir)/generator/gapi-fixup.exe --api=$(API) --metadata=$(srcdir)/$(METADATA) $(build_symbols); \ fi api_includes = $(addprefix -I:, $(INCLUDE_API)) diff --git a/configure.ac b/configure.ac index ac97c9b5b..9bcfc2a5c 100644 --- a/configure.ac +++ b/configure.ac @@ -217,10 +217,10 @@ policy.config sources/Makefile parser/Makefile parser/gapi-3.0.pc -parser/gapi3-fixup parser/gapi3-parser generator/Makefile generator/gapi3-codegen +generator/gapi3-fixup glib/Makefile glib/glib-sharp-3.0.pc glib/glib-sharp.dll.config diff --git a/generator/Makefile.am b/generator/Makefile.am index ffea9f0a0..bdfae896c 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -1,11 +1,14 @@ assemblydir = $(prefix)/lib/gapi-3.0 -assembly_DATA = gapi_codegen.exe -bin_SCRIPTS = gapi3-codegen -CLEANFILES = gapi_codegen.exe -DISTCLEANFILES = gapi3-codegen +assembly_DATA = gapi-fixup.exe gapi_codegen.exe +bin_SCRIPTS = gapi3-fixup gapi3-codegen +CLEANFILES = gapi-fixup.exe gapi_codegen.exe +DISTCLEANFILES = gapi3-fixup gapi3-codegen references = +fixup_sources = \ + gapi-fixup.cs + sources = \ AliasGen.cs \ ArrayParameter.cs \ @@ -71,10 +74,14 @@ sources = \ XmlElementExtensions.cs build_sources = $(addprefix $(srcdir)/, $(sources)) -dist_sources = $(sources) +build_fixup_sources = $(addprefix $(srcdir)/, $(fixup_sources)) EXTRA_DIST = \ - $(dist_sources) + $(sources) \ + $(fixup_sources) + +gapi-fixup.exe: $(build_fixup_sources) + $(CSC) $(CSFLAGS) -out:gapi-fixup.exe $(srcdir)/gapi-fixup.cs gapi_codegen.exe: $(build_sources) $(CSC) $(CSFLAGS) -out:gapi_codegen.exe $(OFF_T_FLAGS) $(references) $(build_sources) diff --git a/parser/gapi-fixup.cs b/generator/gapi-fixup.cs similarity index 100% rename from parser/gapi-fixup.cs rename to generator/gapi-fixup.cs diff --git a/parser/gapi3-fixup.in b/generator/gapi3-fixup.in similarity index 100% rename from parser/gapi3-fixup.in rename to generator/gapi3-fixup.in diff --git a/parser/Makefile.am b/parser/Makefile.am index 9e2e27a97..a07a41011 100644 --- a/parser/Makefile.am +++ b/parser/Makefile.am @@ -1,14 +1,13 @@ assemblydir = $(prefix)/lib/gapi-3.0 pkgconfigdir = $(libdir)/pkgconfig -assembly_DATA = gapi-fixup.exe gapi-parser.exe +assembly_DATA = gapi-parser.exe pkgconfig_DATA = gapi-3.0.pc -bin_SCRIPTS = gapi3-fixup gapi3-parser +bin_SCRIPTS = gapi3-parser assembly_SCRIPTS = gapi_pp.pl gapi2xml.pl -CLEANFILES = gapi-fixup.exe gapi-parser.exe -DISTCLEANFILES = gapi3-fixup gapi3-parser gapi-3.0.pc +CLEANFILES = gapi-parser.exe +DISTCLEANFILES = gapi3-parser gapi-3.0.pc sources = \ - gapi-fixup.cs \ gapi-parser.cs EXTRA_DIST = \ @@ -18,9 +17,6 @@ EXTRA_DIST = \ gapi2xml.pl \ gapi-3.0.pc.in -gapi-fixup.exe: $(srcdir)/gapi-fixup.cs - $(CSC) $(CSFLAGS) -out:gapi-fixup.exe $(srcdir)/gapi-fixup.cs - gapi-parser.exe: $(srcdir)/gapi-parser.cs $(CSC) $(CSFLAGS) -out:gapi-parser.exe $(srcdir)/gapi-parser.cs diff --git a/sample/opaquetest/Makefile.am b/sample/opaquetest/Makefile.am index 4d3237709..edf552b2c 100644 --- a/sample/opaquetest/Makefile.am +++ b/sample/opaquetest/Makefile.am @@ -25,7 +25,7 @@ generated/*.cs: opaque-api.xml api: PATH=../../parser:$(PATH) $(RUNTIME) ../../parser/gapi-parser.exe opaque-sources.xml - $(RUNTIME) ../../parser/gapi-fixup.exe --metadata=Opaque.metadata --api=opaque-api.xml + $(RUNTIME) ../../generator/gapi-fixup.exe --metadata=Opaque.metadata --api=opaque-api.xml install: