# Basic Makefile for (un)installing the files, and creating archives manually.
#
# Supports standard GNU Makefile variables for specifying the paths:
# * prefix
# * datarootdir
# * datadir
# * DESTDIR
#
SHELL = /bin/bash
AUTHOR = adobe
PACKAGE = cmap-resources
NAME = $(AUTHOR)-$(PACKAGE)
# So far there's no versioning in place. If there will be any, then we will
# switch to commented line below...
VERSION =
ARCHIVE_NAME = $(NAME)
#ARCHIVE_NAME = $(NAME)-$(VERSION)
# Other files might be written in $(packagedir), remove only what has been installed:
uninstall:
rm -rf $(DESTDIR)$(packagedir)/$(CMap_CNS1_dest)
rm -rf $(DESTDIR)$(packagedir)/$(CMap_GB1_dest)
rm -rf $(DESTDIR)$(packagedir)/$(CMap_ID_dest)
rm -rf $(DESTDIR)$(packagedir)/$(CMap_Japan1_dest)
rm -rf $(DESTDIR)$(packagedir)/$(CMap_Japan2_dest)
rm -rf $(DESTDIR)$(packagedir)/$(CMap_KR_dest)
rm -rf $(DESTDIR)$(packagedir)/$(CMap_Korea1_dest)
# We are putting the source files into subfolder, same as Github does for its releases:
git-archive:
git archive -v --format=$(GIT_ARCHIVE_TYPE) --prefix=$(ARCHIVE_NAME)/ HEAD -o $(ARCHIVE_NAME).$(GIT_ARCHIVE_TYPE)
# The --transform option is what will put the source files into a $(ARCHIVE_NAME) subdirectory:
tar.bz2:
tar --transform="s|^|$(ARCHIVE_NAME)/|" -cjvf $(ARCHIVE_NAME).tar.bz2 $(CMap_CNS1_source) $(CMap_GB1_source) $(CMap_ID_source) $(CMap_Japan1_source) $(CMap_Japan2_source) $(CMap_KR_source) $(CMap_Korea1_source) $(DISTFILES)