aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2018-04-22 16:45:34 +0100
committerSimon Tatham <anakin@pobox.com>2018-04-22 16:45:34 +0100
commitef6f6427a263627de1d0fed22d8f367b15e2fb1a (patch)
tree8c959bea949f471cd7c99a7aa37a301358b55e0d
parentb7034aeb51a99336fca2e15837c8337481964f6d (diff)
downloadpuzzles-ef6f6427a263627de1d0fed22d8f367b15e2fb1a.zip
puzzles-ef6f6427a263627de1d0fed22d8f367b15e2fb1a.tar.gz
puzzles-ef6f6427a263627de1d0fed22d8f367b15e2fb1a.tar.bz2
puzzles-ef6f6427a263627de1d0fed22d8f367b15e2fb1a.tar.xz
Recipe: centralise dependencies for latin.c.
It's silly to have every puzzle using latin.c separately specify in its .R file the list of additional modules that latin.c depends on, or for that matter to have them all have to separately know how to adjust that for the STANDALONE_SOLVER mode of latin.c. So I've centralised a new pair of definitions into the core Recipe file, called LATIN and LATIN_SOLVER, and now a client of latin.c need only ask for that to get all the necessary dependencies too. Also, while I'm here, I've moved the non-puzzle-specific 'latincheck' test program out of unequal.R into the central Recipe.
-rw-r--r--Recipe8
-rw-r--r--keen.R8
-rw-r--r--singles.R2
-rw-r--r--towers.R8
-rw-r--r--unequal.R10
-rw-r--r--unfinished/group.R8
6 files changed, 25 insertions, 19 deletions
diff --git a/Recipe b/Recipe
index 3b57ef5..a7db32b 100644
--- a/Recipe
+++ b/Recipe
@@ -31,6 +31,10 @@ STANDALONE = nullfe random misc malloc
ALL = list
+LATIN_DEPS = maxflow tree234
+LATIN = latin LATIN_DEPS
+LATIN_SOLVER = latin[STANDALONE_SOLVER] LATIN_DEPS
+
# First half of list.c.
!begin >list.c
/*
@@ -61,6 +65,10 @@ const int gamecount = lenof(gamelist);
# Unix standalone application for special-purpose obfuscation.
obfusc : [U] obfusc STANDALONE
+# Test program built from latin.c.
+latincheck : [U] latin[STANDALONE_LATIN_TEST] LATIN_DEPS STANDALONE
+latincheck : [C] latin[STANDALONE_LATIN_TEST] LATIN_DEPS STANDALONE
+
puzzles : [G] windows[COMBINED] WINDOWS_COMMON COMMON ALL noicon.res
# Mac OS X unified application containing all the puzzles.
diff --git a/keen.R b/keen.R
index 77609bc..46bd09a 100644
--- a/keen.R
+++ b/keen.R
@@ -1,14 +1,14 @@
# -*- makefile -*-
-KEEN_LATIN_EXTRA = tree234 maxflow dsf
-KEEN_EXTRA = latin KEEN_LATIN_EXTRA
+KEEN_EXTRA = dsf LATIN
+KEEN_EXTRA_SOLVER = dsf LATIN_SOLVER
keen : [X] GTK COMMON keen KEEN_EXTRA keen-icon|no-icon
keen : [G] WINDOWS COMMON keen KEEN_EXTRA keen.res|noicon.res
-keensolver : [U] keen[STANDALONE_SOLVER] latin[STANDALONE_SOLVER] KEEN_LATIN_EXTRA STANDALONE
-keensolver : [C] keen[STANDALONE_SOLVER] latin[STANDALONE_SOLVER] KEEN_LATIN_EXTRA STANDALONE
+keensolver : [U] keen[STANDALONE_SOLVER] KEEN_EXTRA_SOLVER STANDALONE
+keensolver : [C] keen[STANDALONE_SOLVER] KEEN_EXTRA_SOLVER STANDALONE
ALL += keen[COMBINED] KEEN_EXTRA
diff --git a/singles.R b/singles.R
index 2d10c4b..a67aed2 100644
--- a/singles.R
+++ b/singles.R
@@ -1,6 +1,6 @@
# -*- makefile -*-
-SINGLES_EXTRA = dsf latin maxflow tree234
+SINGLES_EXTRA = dsf LATIN
singles : [X] GTK COMMON singles SINGLES_EXTRA singles-icon|no-icon
singles : [G] WINDOWS COMMON singles SINGLES_EXTRA singles.res|noicon.res
diff --git a/towers.R b/towers.R
index c060c69..c2bb78a 100644
--- a/towers.R
+++ b/towers.R
@@ -1,14 +1,14 @@
# -*- makefile -*-
-TOWERS_LATIN_EXTRA = tree234 maxflow
-TOWERS_EXTRA = latin TOWERS_LATIN_EXTRA
+TOWERS_EXTRA = LATIN
+TOWERS_EXTRA_SOLVER = LATIN_SOLVER
towers : [X] GTK COMMON towers TOWERS_EXTRA towers-icon|no-icon
towers : [G] WINDOWS COMMON towers TOWERS_EXTRA towers.res|noicon.res
-towerssolver : [U] towers[STANDALONE_SOLVER] latin[STANDALONE_SOLVER] TOWERS_LATIN_EXTRA STANDALONE
-towerssolver : [C] towers[STANDALONE_SOLVER] latin[STANDALONE_SOLVER] TOWERS_LATIN_EXTRA STANDALONE
+towerssolver : [U] towers[STANDALONE_SOLVER] TOWERS_EXTRA_SOLVER STANDALONE
+towerssolver : [C] towers[STANDALONE_SOLVER] TOWERS_EXTRA_SOLVER STANDALONE
ALL += towers[COMBINED] TOWERS_EXTRA
diff --git a/unequal.R b/unequal.R
index a061582..077407f 100644
--- a/unequal.R
+++ b/unequal.R
@@ -1,16 +1,14 @@
# -*- makefile -*-
-UNEQUAL_EXTRA = latin tree234 maxflow
+UNEQUAL_EXTRA = LATIN
+UNEQUAL_EXTRA_SOLVER = LATIN_SOLVER
unequal : [X] GTK COMMON unequal UNEQUAL_EXTRA unequal-icon|no-icon
unequal : [G] WINDOWS COMMON unequal UNEQUAL_EXTRA unequal.res|noicon.res
-unequalsolver : [U] unequal[STANDALONE_SOLVER] latin[STANDALONE_SOLVER] tree234 maxflow STANDALONE
-unequalsolver : [C] unequal[STANDALONE_SOLVER] latin[STANDALONE_SOLVER] tree234 maxflow STANDALONE
-
-latincheck : [U] latin[STANDALONE_LATIN_TEST] tree234 maxflow STANDALONE
-latincheck : [C] latin[STANDALONE_LATIN_TEST] tree234 maxflow STANDALONE
+unequalsolver : [U] unequal[STANDALONE_SOLVER] UNEQUAL_EXTRA_SOLVER STANDALONE
+unequalsolver : [C] unequal[STANDALONE_SOLVER] UNEQUAL_EXTRA_SOLVER STANDALONE
ALL += unequal[COMBINED] UNEQUAL_EXTRA
diff --git a/unfinished/group.R b/unfinished/group.R
index a11d22e..394e364 100644
--- a/unfinished/group.R
+++ b/unfinished/group.R
@@ -1,14 +1,14 @@
# -*- makefile -*-
-GROUP_LATIN_EXTRA = tree234 maxflow
-GROUP_EXTRA = latin GROUP_LATIN_EXTRA
+GROUP_EXTRA = LATIN
+GROUP_EXTRA_SOLVER = LATIN_SOLVER
group : [X] GTK COMMON group GROUP_EXTRA group-icon|no-icon
group : [G] WINDOWS COMMON group GROUP_EXTRA group.res|noicon.res
-groupsolver : [U] group[STANDALONE_SOLVER] latin[STANDALONE_SOLVER] GROUP_LATIN_EXTRA STANDALONE
-groupsolver : [C] group[STANDALONE_SOLVER] latin[STANDALONE_SOLVER] GROUP_LATIN_EXTRA STANDALONE
+groupsolver : [U] group[STANDALONE_SOLVER] GROUP_EXTRA_SOLVER STANDALONE
+groupsolver : [C] group[STANDALONE_SOLVER] GROUP_EXTRA_SOLVER STANDALONE
ALL += group[COMBINED] GROUP_EXTRA