#! /usr/bin/make -f # # debian/rules # Part of Debian ‘jquery-throttle-debounce’ package. # # This is free software, and you are welcome to redistribute it under # certain conditions; see the end of this file for copyright # information, grant of license, and disclaimer of warranty. JAVASCRIPT_NAMES = \ jquery.ba-throttle-debounce SOURCE_DIR = $(CURDIR) JAVASCRIPT_SUFFIX = .js COMPILED_JAVASCRIPT_SUFFIX = .min${JAVASCRIPT_SUFFIX} javascript_files = $(addsuffix ${JAVASCRIPT_SUFFIX},${javascript_names}) compiled_javascript_files = $(addsuffix ${COMPILED_JAVASCRIPT_SUFFIX},\ ${JAVASCRIPT_NAMES}) compiled_javascript_paths = $(addprefix ${SOURCE_DIR}/,\ ${compiled_javascript_files}) GENERATED_FILES += ${compiled_javascript_files} MINIFY = uglifyjs %: dh $@ .PHONY: override_dh_auto_build override_dh_auto_build: minify-javascript .PHONY: minify-javascript minify-javascript: ${compiled_javascript_paths} %${COMPILED_JAVASCRIPT_SUFFIX}: %${JAVASCRIPT_SUFFIX} $(MINIFY) -o "$@" "$<" .PHONY: override_dh_clean override_dh_clean: dh_clean $(RM) -r ${GENERATED_FILES} # Copyright © 2016–2022 Ben Finney # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. # No warranty expressed or implied. # Local variables: # coding: utf-8 # mode: makefile # End: # vim: fileencoding=utf-8 filetype=make :