diff --git a/builds/posix/Makefile.in.embed.qli b/builds/posix/Makefile.in.embed.qli index b43d568874..37d6584e54 100644 --- a/builds/posix/Makefile.in.embed.qli +++ b/builds/posix/Makefile.in.embed.qli @@ -42,9 +42,9 @@ include $(ROOT)/gen/make.shared.variables QLI_Other_Sources = jrd/dsc.cpp gpre/pretty.cpp jrd/path_utils.cpp QLI_Files= all.cpp command.cpp compile.cpp dtr.cpp err.cpp eval.cpp \ - expand.cpp exe.cpp format.cpp gener.cpp help.cpp \ - hsh.cpp lex.cpp meta.cpp mov.cpp parse.cpp picstr.cpp proc.cpp \ - report.cpp show.cpp + expand.cpp exe.cpp format.cpp gener.cpp help.epp \ + hsh.cpp lex.cpp meta.epp mov.cpp parse.cpp picstr.cpp proc.epp \ + report.cpp show.epp QLI_Sources = $(addprefix qli/, $(QLI_Files)) $(QLI_Other_Sources) QLI_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(QLI_Sources)))) diff --git a/builds/posix/Makefile.in.libfbstatic b/builds/posix/Makefile.in.libfbstatic index 5c7f4393c3..3f081a4839 100644 --- a/builds/posix/Makefile.in.libfbstatic +++ b/builds/posix/Makefile.in.libfbstatic @@ -40,6 +40,8 @@ include $(ROOT)/gen/make.shared.variables @SET_MAKE@ +DSQL_GPRE_FLAGS += -lang_internal + AllObjects= $(LIBFBSTATIC_Objects) Dependancies=$(AllObjects:.o=.d) diff --git a/builds/posix/make.rules b/builds/posix/make.rules index 3ef5014b1e..2091ba0fd4 100644 --- a/builds/posix/make.rules +++ b/builds/posix/make.rules @@ -64,7 +64,7 @@ CXXFLAGS:= $(CXXFLAGS) $(CFLAGS) GPRE_FLAGS= -r -m -z -n JRD_GPRE_FLAGS = -n -z -gds_cxx -raw -ids -DSQL_GPRE_FLAGS = -lang_internal -r -m -z -n +DSQL_GPRE_FLAGS = -r -m -z -n .SUFFIXES: .c .e .epp .cpp @@ -73,17 +73,15 @@ DSQL_GPRE_FLAGS = -lang_internal -r -m -z -n $(GPRE_CURRENT) $(GPRE_FLAGS) $< $@ -.epp.cpp: - $(GPRE_CURRENT) $(GPRE_FLAGS) $< $@ +$(OBJ)/jrd/%.cpp: $(SRC_ROOT)/jrd/%.epp + $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $(firstword $<) $@ - -$(SRC_ROOT)/jrd/%.cpp:: $(SRC_ROOT)/jrd/%.epp - $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ - - -$(SRC_ROOT)/dsql/%.cpp:: $(SRC_ROOT)/dsql/%.epp +$(OBJ)/dsql/%.cpp: $(SRC_ROOT)/dsql/%.epp $(GPRE_CURRENT) $(DSQL_GPRE_FLAGS) $< $@ +$(OBJ)/%.cpp: $(SRC_ROOT)/%.epp + $(GPRE_CURRENT) $(GPRE_FLAGS) $(firstword $<) $@ + .SUFFIXES: .lo .o .cpp .c @@ -103,6 +101,9 @@ endif $(OBJ)/%.o: $(SRC_ROOT)/%.c $(CC) $(CFLAGS) -c $(firstword $<) -o $@ +$(OBJ)/%.o: $(OBJ)/%.cpp + $(CXX) $(CXXFLAGS) -c $(firstword $<) -o $@ + $(OBJ)/%.o: $(SRC_ROOT)/%.cpp $(CXX) $(CXXFLAGS) -c $(firstword $<) -o $@ diff --git a/builds/posix/make.shared.targets b/builds/posix/make.shared.targets index 06671fa3d4..b10d57d1c5 100644 --- a/builds/posix/make.shared.targets +++ b/builds/posix/make.shared.targets @@ -67,19 +67,19 @@ help.fdb: # These need to change to $(GEN_SRC) at some stage -$(SRC_ROOT)/dudley/exe.cpp $(SRC_ROOT)/dudley/extract.epp: yachts.lnk +#$(SRC_ROOT)/dudley/exe.cpp $(SRC_ROOT)/dudley/extract.epp: yachts.lnk -$(SRC_ROOT)/qli/meta.cpp $(SRC_ROOT)/qli/proc.cpp $(SRC_ROOT)/qli/show.cpp: yachts.lnk -$(SRC_ROOT)/qli/help.cpp: help.fdb +#$(SRC_ROOT)/qli/meta.cpp $(SRC_ROOT)/qli/proc.cpp $(SRC_ROOT)/qli/show.cpp: yachts.lnk +#$(SRC_ROOT)/qli/help.cpp: help.fdb # Explicit dependence on generated header $(OBJ)/jrd/par.o: $(SRC_ROOT)/include/gen/blrtable.h # Special cases for building cpp from epp -$(SRC_ROOT)/dsql/metd.cpp:: $(SRC_ROOT)/dsql/metd.epp - $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ +$(OBJ)/dsql/metd.cpp: $(SRC_ROOT)/dsql/metd.epp + $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) -cxx $< $@ -$(SRC_ROOT)/dsql/DdlNodes.cpp:: $(SRC_ROOT)/dsql/DdlNodes.epp +$(OBJ)/dsql/DdlNodes.cpp: $(SRC_ROOT)/dsql/DdlNodes.epp $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ # Rebuild blrtable.h diff --git a/builds/win32/preprocess.bat b/builds/win32/preprocess.bat index 79be6d5e21..b03def20d2 100644 --- a/builds/win32/preprocess.bat +++ b/builds/win32/preprocess.bat @@ -28,7 +28,7 @@ :PREPROCESS @echo Processing %1/%2.epp @echo Calling GPRE for %1/%2.epp -@if "%3"=="" (call :GPRE_M %1 %2) else (call :GPRE_GDS %1 %2) +@if "%3"=="" (call :GPRE_M %1 %2) else (call :GPRE_GDS %1 %2 %3 %4) @if not exist %FB_GEN_DIR%\%1\%2.cpp ( @move %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp @@ -47,7 +47,7 @@ ::=========== :GPRE_GDS -@%GPRE% -n -gds -raw -ids %FB_ROOT_PATH%\src\%1\%2.epp %FB_GEN_DIR%\preprocessing.cpp -b %FB_GEN_DB_DIR%/dbs/ +@%GPRE% -n -raw -ids %3 %4 %FB_ROOT_PATH%\src\%1\%2.epp %FB_GEN_DIR%\preprocessing.cpp -b %FB_GEN_DB_DIR%/dbs/ goto :EOF ::=========== @@ -55,7 +55,7 @@ goto :EOF @echo. @set GPRE=%FB_GEN_DIR%\gpre_boot -lang_internal @for %%i in (array, blob) do @call :PREPROCESS dsql %%i -@for %%i in (metd, DdlNodes) do @call :PREPROCESS dsql %%i GDS +@for %%i in (metd, DdlNodes) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i @for %%i in (backup, restore) do @call :PREPROCESS burp %%i @for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i @@ -64,9 +64,9 @@ goto :EOF @set GPRE=%FB_GEN_DIR%\gpre_boot @for %%i in (alice_meta) do @call :PREPROCESS alice %%i @for %%i in (array, blob) do @call :PREPROCESS dsql %%i -@for %%i in (metd, DdlNodes) do @call :PREPROCESS dsql %%i GDS +@for %%i in (metd, DdlNodes) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i -@for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl) do @call :PREPROCESS jrd %%i GDS +@for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl) do @call :PREPROCESS jrd %%i -gds_cxx @for %%i in (stats) do @call :PREPROCESS utilities %%i @goto :EOF @@ -76,10 +76,11 @@ goto :EOF @for %%i in (alice_meta) do @call :PREPROCESS alice %%i @for %%i in (backup, restore) do @call :PREPROCESS burp %%i @for %%i in (array, blob) do @call :PREPROCESS dsql %%i -@for %%i in (metd, DdlNodes) do @call :PREPROCESS dsql %%i GDS +@for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx -cxx +@for %%i in (DdlNodes) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (exe, extract) do @call :PREPROCESS dudley %%i @for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i -@for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl) do @call :PREPROCESS jrd %%i GDS +@for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl) do @call :PREPROCESS jrd %%i -gds_cxx @for %%i in (codes) do @call :PREPROCESS misc %%i @for %%i in (build_file) do @call :PREPROCESS msgs %%i @for %%i in (help, meta, proc, show) do @call :PREPROCESS qli %%i diff --git a/src/dsql/gen.cpp b/src/dsql/gen.cpp index 17be767509..cdea6b27f4 100644 --- a/src/dsql/gen.cpp +++ b/src/dsql/gen.cpp @@ -1962,7 +1962,7 @@ static void gen_field( CompiledStatement* statement, const dsql_ctx* context, else { stuff(statement, blr_field); stuff_context(statement, context); - stuff_string(statement, field->fld_name); + stuff_meta_string(statement, field->fld_name.c_str()); } if (indices) {