-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodeplugin.mk
19 lines (14 loc) · 1022 Bytes
/
codeplugin.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#####################################
# Caution: do not rename this file. #
#####################################
# what is the path of the dir we are in?
GERONIMO_PLUGIN_MKFILE := $(abspath $(lastword $(MAKEFILE_LIST)))
GERONIMO_PLUGIN_DIR := $(shell dirname $(GERONIMO_PLUGIN_MKFILE))
GERONIMO_BASENAME_RAW := $(firstword $(subst :, ,$(notdir $(GERONIMO_PLUGIN_DIR))))
GERONIMO_BASENAME_CLEAN_L1 := $(shell echo '$(GERONIMO_BASENAME_RAW)' | sed 's/-/_/g')
GERONIMO_BASENAME_CLEAN_L2 := $(shell echo '$(GERONIMO_BASENAME_CLEAN_L1)' | sed 's/[^a-zA-Z0-9_]/_/g')
GERONIMO_BASENAME := $(shell echo '$(GERONIMO_BASENAME_CLEAN_L2)' | sed 's/\(\<.\)\.*/\u\1/g')
GERONIMO_PLUGIN_MKT := $(GERONIMO_PLUGIN_DIR)/codeplugin.template.mk
GERONIMO_PLUGIN_MKX := $(GERONIMO_PLUGIN_DIR)/codeplugin.local.mk
$(shell echo '$(AA_GERONIMO_BASENAME_RAW)' | sed 's/GERONIMO_/$(GERONIMO_BASENAME)_GERONIMO_/g' $(GERONIMO_PLUGIN_MKT) > $(GERONIMO_PLUGIN_MKX))
include $(GERONIMO_PLUGIN_MKX)