Remove bin2c
This commit is contained in:
parent
a562d544d8
commit
7586095504
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -69,9 +69,6 @@ Makefile.in
|
|||
/scripts/nix-reduce-build
|
||||
/scripts/nix-http-export.cgi
|
||||
|
||||
# /src/bin2c/
|
||||
/src/bin2c/bin2c
|
||||
|
||||
# /src/bsdiff-4.3/
|
||||
/src/bsdiff-4.3/bsdiff
|
||||
/src/bsdiff-4.3/bspatch
|
||||
|
|
|
@ -354,7 +354,6 @@ AC_SUBST(tarFlags)
|
|||
AM_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_FILES([Makefile
|
||||
src/Makefile
|
||||
src/bin2c/Makefile
|
||||
src/boost/Makefile
|
||||
src/boost/format/Makefile
|
||||
src/libutil/Makefile
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
SUBDIRS = bin2c boost libutil libstore libmain nix-store nix-hash \
|
||||
SUBDIRS = boost libutil libstore libmain nix-store nix-hash \
|
||||
libexpr nix-instantiate nix-env nix-worker nix-setuid-helper \
|
||||
nix-log2xml bsdiff-4.3
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
noinst_PROGRAMS = bin2c
|
||||
|
||||
bin2c_SOURCES = bin2c.c
|
||||
|
||||
bin2c$(EXEEXT): bin2c.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o bin2c bin2c.c
|
|
@ -1,23 +0,0 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
void print(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
if (vprintf(format, ap) < 0) abort();
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
int main(int argc, char * * argv)
|
||||
{
|
||||
int c;
|
||||
if (argc != 2) abort();
|
||||
print("static unsigned char %s[] = { ", argv[1]);
|
||||
while ((c = getchar()) != EOF) {
|
||||
print("0x%02x, ", (unsigned char) c);
|
||||
}
|
||||
print("0 };\n");
|
||||
return 0;
|
||||
}
|
|
@ -29,4 +29,4 @@ AM_CXXFLAGS = -Wall \
|
|||
local-store.lo: schema.sql.hh
|
||||
|
||||
%.sql.hh: %.sql
|
||||
../bin2c/bin2c schema < $< > $@ || (rm $@ && exit 1)
|
||||
sed -e 's/"/\\"/g' -e 's/.*/"\0\\n"/' < $< > $@ || (rm $@ && exit 1)
|
||||
|
|
|
@ -374,7 +374,9 @@ void LocalStore::openDB(bool create)
|
|||
|
||||
/* Initialise the database schema, if necessary. */
|
||||
if (create) {
|
||||
const char * schema =
|
||||
#include "schema.sql.hh"
|
||||
;
|
||||
if (sqlite3_exec(db, (const char *) schema, 0, 0, 0) != SQLITE_OK)
|
||||
throwSQLiteError(db, "initialising database schema");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue