Skip to content

Instantly share code, notes, and snippets.

@rbarzic
Created October 6, 2017 07:46
Show Gist options
  • Save rbarzic/04f2f9bc7d19653a142ba65deb85ad35 to your computer and use it in GitHub Desktop.
Save rbarzic/04f2f9bc7d19653a142ba65deb85ad35 to your computer and use it in GitHub Desktop.
Makefile uppercase/lower case conversion
ORIGINAL_IP=Nrv32Sig
TARGET_IP=ssctrL
ORIGINAL_IP_LOWER = $(shell echo $(ORIGINAL_IP) | tr '[:upper:]' '[:lower:]')
TARGET_IP_LOWER = $(shell echo $(TARGET_IP) | tr '[:upper:]' '[:lower:]')
ORIGINAL_IP_UPPER = $(shell echo $(ORIGINAL_IP) | tr '[:lower:]' '[:upper:]')
TARGET_IP_UPPER = $(shell echo $(TARGET_IP) | tr '[:lower:]' '[:upper:]')
debug:
@echo "ORIGINAL_IP " $(ORIGINAL_IP)
@echo "TARGET_IP " $(TARGET_IP)
@echo "ORIGINAL_IP_LOWER " $(ORIGINAL_IP_LOWER)
@echo "TARGET_IP_LOWER " $(TARGET_IP_LOWER)
@echo "ORIGINAL_IP_UPPER " $(ORIGINAL_IP_UPPER)
@echo "TARGET_IP_UPPER " $(TARGET_IP_UPPER)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment