Skip to content

Commit

Permalink
Add generate phony target, update OP2-APPS pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
bozbez committed Jan 21, 2025
1 parent 19d8fb2 commit d72f0b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-op2-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Translate apps
run: |
FILES=$(find OP2-Common/apps -name Makefile | xargs grep -l 'include.*[cf]_app.mk')
for file in $FILES; do make -C $(dirname $file) .generated; done
for file in $FILES; do make -C $(dirname $file) generate; done
- name: Update OP2-APPS
run: |
Expand Down
4 changes: 3 additions & 1 deletion makefiles/c_app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ifneq ($(MAKECMDGOALS),clean)
$(info )
endif

.PHONY: all clean
.PHONY: all clean generate

define ALL_template =
all: $(foreach variant,$(BUILDABLE_VARIANTS),$(APP_NAME)_$(variant))
Expand All @@ -80,6 +80,8 @@ define GENERATED_template =
generated/$(APP_NAME): $(APP_SRC)
@mkdir -p $$@
$(TRANSLATOR) $(APP_INC) $$^ -o $$@

generate: generated/$(APP_NAME)
endef

$(eval $(call GENERATED_template))
Expand Down
4 changes: 3 additions & 1 deletion makefiles/f_app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ifneq ($(MAKECMDGOALS),clean)
$(info )
endif

.PHONY: all clean
.PHONY: all clean generate

define ALL_template =
all: $(foreach variant,$(BUILDABLE_VARIANTS),$(APP_NAME)_$(variant))
Expand All @@ -74,6 +74,8 @@ define GENERATED_template =
generated/$(APP_NAME): $(APP_SRC)
@mkdir -p $$@
$(TRANSLATOR) $(APP_EXTRA_FLAGS) $$^ -o $$@

generate: generated/$(APP_NAME)
endef

$(eval $(call GENERATED_template))
Expand Down

0 comments on commit d72f0b2

Please sign in to comment.