Commit f1f75d4b authored by jan.koester's avatar jan.koester
Browse files

test

parent 7563b82e
Loading
Loading
Loading
Loading
+3 −3
Changes for executor.cpp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -42,11 +42,11 @@ const Rule* Executor::find_rule(const std::string& target, std::string& stem) {
    static std::vector<Rule> builtins;
    if (builtins.empty()) {
        // %.o: %.c
        builtins.push_back({{"%.o"}, {"%.c"}, {}, {"$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@"}, true});
        builtins.push_back({{"%.o"}, {"%.c"}, {}, {"$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@"}, true, ""});
        // %.o: %.cpp
        builtins.push_back({{"%.o"}, {"%.cpp"}, {}, {"$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@"}, true});
        builtins.push_back({{"%.o"}, {"%.cpp"}, {}, {"$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@"}, true, ""});
        // %.o: %.cc
        builtins.push_back({{"%.o"}, {"%.cc"}, {}, {"$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@"}, true});
        builtins.push_back({{"%.o"}, {"%.cc"}, {}, {"$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@"}, true, ""});
    }

    for (const auto& rule : builtins) {
+1 −1
Changes for parser.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -753,7 +753,7 @@ bool Parser::try_parse_rule(const std::string& line, Makefile& mf, Rule*& curren
        }
    }

    mf.rules.push_back({targets, prereqs, order_only, {}, is_pattern});
    mf.rules.push_back({targets, prereqs, order_only, {}, is_pattern, ""});
    current_rule = &mf.rules.back();

    if (mf.default_target.empty() && !is_pattern && !targets.empty() && targets[0][0] != '.') {