hydra: use autoconf/-make

This commit is contained in:
Rob Vermaas
2010-09-30 14:29:15 +00:00
parent 673ef76020
commit c37b90ee3e
28 changed files with 533 additions and 20 deletions

15
src/sql/Makefile.am Normal file
View File

@@ -0,0 +1,15 @@
EXTRA_DIST = hydra.sql hydra-postgresql.sql hydra-sqlite.sql
sqldir = $(datadir)/hydra/sql
nobase_sql_DATA = $(EXTRA_DIST)
hydra-postgresql.sql: hydra.sql
cpp -P -E -traditional-cpp -DPOSTGRESQL hydra.sql > $@ || rm -f $@
hydra-sqlite.sql: hydra.sql
cpp -P -E -traditional-cpp -DSQLITE hydra.sql > $@ || rm -f $@
update-dbix: hydra-sqlite.sql
rm -f tmp.sqlite
sqlite3 tmp.sqlite < hydra-sqlite.sql
perl -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:../lib -e 'make_schema_at("Hydra::Schema", { relationships => 1, moniker_map => sub {return $$_;} }, ["dbi:SQLite:tmp.sqlite"])'