Skip to content

Commit

Permalink
use join-with that works in GNU Make 4.3
Browse files Browse the repository at this point in the history
no substitution was occurring for the HPP_FILES list, causing the
merge-headers to panic and fail because the command arguments were not
split properly when executing the command from DependencyGraph.new

```
thread 'main' panicked at 'clang++-11 ["-MT", "alloc.hpp api.hpp bytes.hpp comment.hpp decoded_input.hpp decoder.hpp diagnostic.hpp loc.hpp magic_comment.hpp messages.hpp nodes.hpp parser_options.hpp parser_result.hpp shared_byte_list.hpp source_line.hpp string.hpp token_rewriter.hpp token.hpp token_ids.hpp", "-MM", "alloc.hpp api.hpp bytes.hpp comment.hpp decoded_input.hpp decoder.hpp diagnostic.hpp loc.hpp magic_comment.hpp messages.hpp nodes.hpp parser_options.hpp parser_result.hpp shared_byte_list.hpp source_line.hpp string.hpp token_rewriter.hpp token.hpp token_ids.hpp"] returns incompatible output:
', src/dependency_graph.rs:28:9
```
  • Loading branch information
jbielick committed Oct 6, 2022
1 parent 8d36d39 commit 7f91673
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ SOURCES = \
token_rewriter \
token

CPP_FILES = $(foreach source,$(SOURCES),$(source).cpp)
HPP_FILES = $(foreach source,$(SOURCES),$(source).hpp)
CPP_FILES = $(addsuffix .cpp,$(SOURCES))
HPP_FILES = $(addsuffix .hpp,$(SOURCES))
HPP_FILES += token_ids.hpp
O_FILES = $(foreach source,$(SOURCES),$(source).$(O))
O_FILES = $(addsuffix .$(O),$(SOURCES))
STATIC_LIB = libruby_parser_cpp.$(A)

# Codegen
Expand Down
5 changes: 2 additions & 3 deletions codegen/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ codegen/merge-headers:
chmod +x codegen/merge-headers
CLEAN += codegen/merge-headers

# A literal space.
space :=
space +=
empty :=
space := $(empty) $(empty)

# Joins elements of the list in arg 2 with the given separator.
# 1. Element separator.
Expand Down

0 comments on commit 7f91673

Please sign in to comment.