Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: fix handling of non-existent *.eg.go files #49696

Merged
merged 1 commit into from
May 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ endif
# to the present, because then it will becomes newer
# than all the other produced artifacts downstream and force
# them to rebuild too.
%.eg.go: bin/execgen
$(EXECGEN_TARGETS): bin/execgen
@echo EXECGEN $@
@execgen $@ > $@.tmp || { rm -f $@.tmp; exit 1; }
@cmp $@.tmp $@ 2>/dev/null && rm -f $@.tmp || mv -f $@.tmp $@
Expand All @@ -1570,6 +1570,12 @@ endif
fi; \
touch -r $$target_timestamp_file $@

# Add a catch-all rule for any non-existent execgen generated
# files. This prevents build errors when switching between branches
# that introduce or remove execgen generated files as these files are
# persisted in bin/%.d dependency lists (e.g. in bin/logictest.d).
%.eg.go: ;

optgen-defs := pkg/sql/opt/ops/*.opt
optgen-norm-rules := pkg/sql/opt/norm/rules/*.opt
optgen-xform-rules := pkg/sql/opt/xform/rules/*.opt
Expand Down