Created
April 5, 2021 07:35
-
-
Save amir734jj/645a94412475dfb700f6116dd1c7e1bc to your computer and use it in GitHub Desktop.
make: *** No rule to make target 'grammar.aps'. Stop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SPECS=First Follow | |
EXAMPLES_PATH=../.. | |
ROOT_PATH=../${EXAMPLES_PATH} | |
SCALAV=2.12 | |
APSLIB=${ROOT_PATH}/lib/aps-library-${SCALAV}.jar | |
SCALA_FLAGS=.:${APSLIB} | |
APS2SCALA=${ROOT_PATH}/bin/aps2scala | |
.PHONY: | |
all: $(addsuffix Spec.compile, $(SPECS)) $(addsuffix Spec.run, $(SPECS)) | |
%.class: %.scala | |
scalac -cp ${SCALA_FLAGS} $< | |
%.generate: | |
${APS2SCALA} -DCOT -p ${EXAMPLES_PATH}:${ROOT_PATH}/base $* | |
%.aps: %.generate %.class | |
%.run: | |
@scala -cp ${SCALA_FLAGS} $(basename $*) | |
GrammarUtil.compile: grammar.aps GrammarUtil.class | |
FirstSpec.compile: Spec.class GrammarUtil.compile first.aps FirstSpec.class | |
FollowSpec.compile: Spec.class GrammarUtil.compile follow.aps FollowSpec.class | |
.PHONY: | |
clean: | |
rm -f *.class grammar.scala first.scala follow.scala |
The .PHONY:
dependencies are wrong - you want .PHONY: all
and .PHONY: clean
(or you can combine them).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are no commands in the rule to create
%.aps
from%.generate
and%.class
- that's the likely cause of your problem.