Skip to content

re2c output is not atomic #245

@terpstra

Description

@terpstra

When I run this command and then interrupt it:
re2c -8 --no-generation-date src/symbol.re -o src/symbol.cpp

It will create an empty symbol.cpp file. This is problematic for make because the output now exists and so the job does not get rerun. To work around it, I must do this:

%.cpp: %.re
re2c -8 --no-generation-date $< > $@.tmp
mv $@.tmp $@

However, it would be nicer if '-o' did this internally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions