Hi to all, I'm trying to insert in Makefile a command to import a database's dump, but when execute the line it appears the prompt of sqlite, so I have to insert the .quit command. How can I run sqlite3 in batch mode?
The Makefile is: #-------------------------------------------------------------- CPP = g++ OBJ = main.o calccf.o dlg_db_ch.o struty.o LINKOBJ = main.o calccf.o dlg_db_ch.o struty.o LIBS = -L/usr/X11R6/lib -lXext -lX11 -lm -lfltk -lsqlite3 BIN = codfis DB = codifs.db3 DBTXT = dump_codfis_sql.txt CXXFLAGS = -Wall -static RM = rm -f all: codfis codfis.db3 $(BIN): $(OBJ) $(CPP) $(LINKOBJ) -o codfis $(LIBS) main.o: main.cpp $(CPP) -c main.cpp -o main.o $(CXXFLAGS) calccf.o: calccf.cpp $(CPP) -c calccf.cpp -o calccf.o $(CXXFLAGS) dlg_db_ch.o: dlg_db_ch.cpp $(CPP) -c dlg_db_ch.cpp -o dlg_db_ch.o $(CXXFLAGS) struty.o: struty.cpp $(CPP) -c struty.cpp -o struty.o $(CXXFLAGS) $(DB): $(DBTXT) sqlite3 -init $(DBTXT) codfis.db3 clean: ${RM} $(OBJ) $(BIN) $(DB) #-------------------------------------------------------------- Thanks, Danilo. Home Page: http://www.digitazero.org giovedì 27 aprile 2006, 7.51