as suggested by Oliver:

- only output messages if MAKELEVEL is 0
- indent nested ifeq
- use if (,) syntax
This commit is contained in:
mrdudz
2021-05-16 22:24:35 +02:00
parent 1450f146a5
commit ce487651b0
4 changed files with 22 additions and 11 deletions

View File

@@ -344,7 +344,9 @@ samples: $(EXELIST_$(SYS))
# empty target used to skip systems that will not work with any program in this dir # empty target used to skip systems that will not work with any program in this dir
notavailable: notavailable:
@echo "warning: generic samples not available for" $(SYS) ifeq ($(MAKELEVEL),0)
@echo "info: generic samples not available for" $(SYS)
endif
disk: $(DISK_$(SYS)) disk: $(DISK_$(SYS))

View File

@@ -5,13 +5,15 @@ SYS ?= geos-cbm
# If SYS was given on the commandline, redirect "c64" to "geos-cbm" and # If SYS was given on the commandline, redirect "c64" to "geos-cbm" and
# "apple2enh" to "geos-apple" # "apple2enh" to "geos-apple"
ifeq "$(origin SYS)" "command line" ifeq ($(origin SYS),command line)
ifeq "$(SYS)" "c64" ifeq ($(SYS),c64)
override SYS = geos-cbm override SYS = geos-cbm
endif $(info GEOS: c64 -> geos-cbm)
ifeq "$(SYS)" "apple2enh" endif
override SYS = geos-apple ifeq ($(SYS),apple2enh)
endif override SYS = geos-apple
$(info GEOS: apple2enh -> geos-apple)
endif
endif endif
# Just the usual way to find out if we're # Just the usual way to find out if we're
@@ -80,7 +82,9 @@ samples: $(EXELIST_$(SYS))
$(foreach dir,$(DIRLIST),$(SUBDIR_recipe)) $(foreach dir,$(DIRLIST),$(SUBDIR_recipe))
else else
samples: samples:
@echo "warning: geos samples not available for" $(SYS) ifeq ($(MAKELEVEL),0)
@echo "info: geos samples not available for" $(SYS)
endif
endif endif

View File

@@ -41,7 +41,9 @@ ifneq ($(EXELIST_$(SYS)),)
samples: $(EXELIST_$(SYS)) samples: $(EXELIST_$(SYS))
else else
samples: samples:
@echo "warning: grc sample not available for" $(SYS) ifeq ($(MAKELEVEL),0)
@echo "info: grc sample not available for" $(SYS)
endif
endif endif
test.s: test.grc test.s: test.grc

View File

@@ -81,6 +81,9 @@ hello: hello.c text.s
# empty target used to skip systems that will not work with any program in this dir # empty target used to skip systems that will not work with any program in this dir
notavailable: notavailable:
@echo "warning: tutorial sample not available for" $(SYS) ifeq ($(MAKELEVEL),0)
@echo "info: tutorial sample not available for" $(SYS)
endif
clean: clean:
@$(DEL) hello 2>$(NULLDEV) @$(DEL) hello 2>$(NULLDEV)