don't hardcode lahman dir in makefile

This commit is contained in:
filifa 2024-05-04 21:46:47 -05:00
parent 90b6da3fd9
commit 8bea00f378
1 changed files with 27 additions and 29 deletions

View File

@ -1,7 +1,5 @@
.PHONY: db
bbdb = lahman_1871-2023_csv
db: baseball.db
baseball.db: baseball-raw.db sql/awards.sql sql/franchises.sql sql/teamseasons.sql sql/seasons.sql sql/parks.sql sql/collegeplaying.sql sql/schools.sql sql/people.sql sql/salaries.sql sql/batting.sql sql/pitching.sql sql/fielding.sql sql/appearances.sql sql/homegames.sql sql/seriespost.sql sql/fieldingofsplit.sql sql/teams.sql sql/leagues.sql sql/managers.sql sql/awardsmanagers.sql sql/battingpost.sql sql/fieldingpost.sql sql/pitchingpost.sql sql/appearancespost.sql sql/awardsshareplayers.sql sql/yearlyawards.sql sql/halloffame.sql sql/awardsplayers.sql sql/parkaliases.sql sql/teamseasonshalf.sql sql/managershalf.sql sql/allstarstartingpos.sql sql/allstars.sql sql/allstargames.sql sql/playerstints.sql
@ -48,30 +46,30 @@ baseball.db: baseball-raw.db sql/awards.sql sql/franchises.sql sql/teamseasons.s
baseball-raw.db:
rm -f baseball-raw.db
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AllstarFull.csv allstarfull"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Appearances.csv appearances"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Batting.csv batting"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/BattingPost.csv battingpost"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Fielding.csv fielding"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/FieldingOF.csv fieldingof"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/FieldingOFsplit.csv fieldingofsplit"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/FieldingPost.csv fieldingpost"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/HomeGames.csv homegames"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Managers.csv managers"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/ManagersHalf.csv managershalf"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Parks.csv parks"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/People.csv people"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Pitching.csv pitching"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/PitchingPost.csv pitchingpost"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/SeriesPost.csv seriespost"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Teams.csv teams"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/TeamsFranchises.csv teamsfranchises"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/TeamsHalf.csv teamshalf"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AwardsManagers.csv awardsmanagers"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AwardsPlayers.csv awardsplayers"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AwardsShareManagers.csv awardssharemanagers"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AwardsSharePlayers.csv awardsshareplayers"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/CollegePlaying.csv collegeplaying"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/HallOfFame.csv halloffame"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Salaries.csv salaries"
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Schools.csv schools"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AllstarFull.csv allstarfull"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Appearances.csv appearances"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Batting.csv batting"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/BattingPost.csv battingpost"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Fielding.csv fielding"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingOF.csv fieldingof"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingOFsplit.csv fieldingofsplit"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingPost.csv fieldingpost"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/HomeGames.csv homegames"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Managers.csv managers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/ManagersHalf.csv managershalf"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Parks.csv parks"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/People.csv people"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Pitching.csv pitching"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/PitchingPost.csv pitchingpost"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/SeriesPost.csv seriespost"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Teams.csv teams"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/TeamsFranchises.csv teamsfranchises"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/TeamsHalf.csv teamshalf"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsManagers.csv awardsmanagers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsPlayers.csv awardsplayers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsShareManagers.csv awardssharemanagers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsSharePlayers.csv awardsshareplayers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/CollegePlaying.csv collegeplaying"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/HallOfFame.csv halloffame"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Salaries.csv salaries"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Schools.csv schools"