summaryrefslogtreecommitdiff
path: root/starts
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-12-31 14:54:00 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-12-31 14:54:00 -0800
commitc78c16870ec27b9129bfa9efbe21333ba662598c (patch)
treecdd1f360a88b420dcb278660b38eb62c78dd3d6a /starts
parent31d3f209e6a4a8ea8ffbce61bf0f587f911d0afe (diff)
downloadstandingwithresilience-c78c16870ec27b9129bfa9efbe21333ba662598c.tar.gz
standingwithresilience-c78c16870ec27b9129bfa9efbe21333ba662598c.zip
although level2 is broken, I'm merging to put friend on trunk, helps me understand i am preserving them
Diffstat (limited to 'starts')
-rw-r--r--starts/meaning-vm/level-2/habits.cpp2
-rw-r--r--starts/meaning-vm/level-2/sugar.hpp4
-rw-r--r--starts/meaning-vm/makefile14
3 files changed, 9 insertions, 11 deletions
diff --git a/starts/meaning-vm/level-2/habits.cpp b/starts/meaning-vm/level-2/habits.cpp
index 520ec5c..49a48a3 100644
--- a/starts/meaning-vm/level-2/habits.cpp
+++ b/starts/meaning-vm/level-2/habits.cpp
@@ -157,7 +157,7 @@ void createhabits()
s.link(t, dst);
});
- ahabit(link-crucial, ((souce, s), (type, t), (target, dst)),
+ ahabit(link-crucial, ((source, s), (type, t), (target, dst)),
{
result = s.crucial(t, dst);
});
diff --git a/starts/meaning-vm/level-2/sugar.hpp b/starts/meaning-vm/level-2/sugar.hpp
index dee42c3..bef669d 100644
--- a/starts/meaning-vm/level-2/sugar.hpp
+++ b/starts/meaning-vm/level-2/sugar.hpp
@@ -48,9 +48,9 @@ namespace sugar {
ref result("nothing"); (void)result; \
std::cerr << self.name(); \
_macro_call(_macro_for_each_parens, _macro_habit_set_posarg, _macro_habit_set_posarg _macro_comma_remove_parens(argnametoklist)); \
- std::cerr << std::endl; \
__VA_ARGS__ \
- if (result != ref("nothing")) { ctx.link(ref("result"), result); } \
+ if (result != ref("nothing")) { ctx.link(ref("result"), result); std::cerr << " result:" << result.name();} \
+ std::cerr << std::endl; \
}); \
{ \
ref _macro_habit_name(#nam); \
diff --git a/starts/meaning-vm/makefile b/starts/meaning-vm/makefile
index 6e03081..143a9b3 100644
--- a/starts/meaning-vm/makefile
+++ b/starts/meaning-vm/makefile
@@ -13,17 +13,15 @@ liblevel2.a: $(patsubst %.cpp,%.o,$(wildcard level-0/*.cpp)) $(patsubst %.cpp,%.
habit-starts/rhythm: habit-starts/rhythm.o liblevel2.a
--include $(patsubst %.cpp,%.d,$(wildcard level-0/*.cpp) $(wildcard level-1/*.cpp) $(wildcrd level-2/*.cpp) $(wildcard level*.cpp))
-
-%.o: %.ii
+%.o: %.ii %.cpp
$(CXX) $(CXXFLAGS) -c $*.ii -o $*.o
-%.ii %.d: %.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MQ $*.ii -E $*.cpp -o $*.ii
+%.d: %.cpp
+ @$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MM -MF $*.d -MT "$*.ii $*.o $*.d" -E $*.cpp
+%.ii: %.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -E $*.cpp -o $*.ii
.INTERMEDIATE: $(patsubst %.cpp,%.ii,$(wildcard */*.cpp) $(wildcard *.cpp))
-level-0/%.ii: $(wildcard level-0/*.hpp)
-level-1/%.ii: $(wildcard level-0/*.hpp) $(wildcard level-1/*.hpp)
-level-2/%.ii: $(wildcard level-0/*.hpp) $(wildcard level-1/*.hpp) $(wildcard level-2/*.hpp)
+-include $(patsubst %.cpp,%.d,$(wildcard level-0/*.cpp) $(wildcard level-1/*.cpp) $(wildcard level-2/*.cpp) $(wildcard level*.cpp))
%.a:
ar cr $@ $^