Skip to content
Snippets Groups Projects
Commit ae4ca077 authored by Simon Rose's avatar Simon Rose
Browse files

Merge branch 'check_module_name' into 'master'

Added a regex to check the module name

See merge request !6
parents 842059d2 1b3a760e
No related branches found
No related tags found
No related merge requests found
......@@ -157,6 +157,9 @@ PROJECT=
PRJDIR:=$(subst -,_,$(subst .,_,$(notdir $(patsubst %Lib,%,$(patsubst %/snl,%,$(patsubst %/src,%,${PWD}))))))
PRJDIR := $(shell echo $(PRJDIR) | tr '[:upper:]' '[:lower:]')
PRJ = $(strip $(or ${MODULE},${PROJECT},${PRJDIR}))
# Check to see that PRJ is valid
$(if $(shell [[ "$(strip $(PRJ))" =~ ^[A-Za-z_][A-Za-z0-9_]*$$ ]] && echo good),,$(error Invalid module name: $(PRJ)))
export PRJ
OS_CLASS_LIST = $(BUILDCLASSES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment