Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (22 sloc)
916 Bytes
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
MD_FILE := InCommon-metadata.xml | |
MD_URL := https://mdq.incommon.org/entities/all | |
OUTPUT_FILES := all-entities.out inc-entities.out inc-unique-public-emails.out inc-unique-saml-https-hosts-ports.out inc-unique-ui-urls.out | |
define newline | |
endef | |
.PHONY: all | |
all: $(OUTPUT_FILES) | |
$(foreach output_file,$^,@wc -l $(output_file)$(newline)) | |
.PHONY: clean | |
clean: | |
rm -f $(OUTPUT_FILES) | |
rm -f $(MD_FILE) | |
$(MD_FILE): | |
curl -o $(MD_FILE) $(MD_URL) | |
all-entities.out inc-entities.out: $(@:.out=.xsl) $(MD_FILE) | |
xsltproc $(@:.out=.xsl) $(MD_FILE) > $@ | |
inc-unique-public-emails.out: inc-email-urls.xsl $(MD_FILE) | |
xsltproc $< $(MD_FILE) | sed -e 's/^mailto://' | sort -u > $@ | |
inc-unique-saml-https-hosts-ports.out: inc-saml-urls.xsl $(MD_FILE) | |
xsltproc $< $(MD_FILE) | grep '^https://' | awk -F'/' '{print $$3}' | sort -u > $@ | |
inc-unique-ui-urls.out: inc-ui-urls.xsl $(MD_FILE) | |
xsltproc $< $(MD_FILE) | sort -u > $@ |