# Copyright (C) 2025 Michael Becker  <alcexhim@gmail.com>
# 
# This file is part of mocha-docker.
# 
# mocha-docker is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# mocha-docker is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with mocha-docker.  If not, see <https://www.gnu.org/licenses/>.

root = .
builddir = build
bash = bash

rule rm
  command = rm $in

rule cssc
  command = $bash cssc.sh $out $in
  description = compile LESS stylesheets for $out

rule jsc
  command = $bash jsc.sh $out $in
  description = compile and minify JavaScript for $out
  
build $root/output/common.css: cssc src/uwt-web/common/uwt-actionpreviewbutton.less src/uwt-web/common/uwt-alert.less src/uwt-web/common/uwt-applicationmenu.less src/uwt-web/common/uwt-badge.less src/uwt-web/common/uwt-binaryswitch.less src/uwt-web/common/uwt-button-group.less src/uwt-web/common/uwt-button.less src/uwt-web/common/uwt-calendar.less src/uwt-web/common/uwt-checkbox.less src/uwt-web/common/uwt-column.less src/uwt-web/common/uwt-combobox.less src/uwt-web/common/uwt-dialog.less src/uwt-web/common/uwt-disclosure.less src/uwt-web/common/uwt-expand.less src/uwt-web/common/uwt-footer.less src/uwt-web/common/uwt-formview.less src/uwt-web/common/uwt-gripper.less src/uwt-web/common/uwt-header.less src/uwt-web/common/uwt-image.less src/uwt-web/common/uwt-label.less src/uwt-web/common/uwt-layout-box.less src/uwt-web/common/uwt.less src/uwt-web/common/uwt-listbox.less src/uwt-web/common/uwt-listview.less src/uwt-web/common/uwt-megamenu.less src/uwt-web/common/uwt-menu.less src/uwt-web/common/uwt-meter.less src/uwt-web/common/uwt-page-footer.less src/uwt-web/common/uwt-page-header.less src/uwt-web/common/uwt-page.less src/uwt-web/common/uwt-panel.less src/uwt-web/common/uwt-popup.less src/uwt-web/common/uwt-progressbar.less src/uwt-web/common/uwt-ribbon.less src/uwt-web/common/uwt-ribbon-listview.less src/uwt-web/common/uwt-rotaryswitch.less src/uwt-web/common/uwt-searchbar.less src/uwt-web/common/uwt-sidebar.less src/uwt-web/common/uwt-sidebar-profile.less src/uwt-web/common/uwt-slider.less src/uwt-web/common/uwt-spinbutton.less src/uwt-web/common/uwt-spinner.less src/uwt-web/common/uwt-splashscreen.less src/uwt-web/common/uwt-stack.less src/uwt-web/common/uwt-switch.less src/uwt-web/common/uwt-tabcontainer.less src/uwt-web/common/uwt-textbox.less src/uwt-web/common/uwt-tile.less src/uwt-web/common/uwt-toolbar.less src/uwt-web/common/uwt-tooltip.less src/uwt-web/common/uwt-treeview.less src/uwt-web/common/uwt-uml-diagram.less src/uwt-web/common/uwt-window.less src/uwt-web/common/uwt-wunderbar.less
build $root/output/themes/avondale.css: cssc src/uwt-web/themes/avondale/uwt-actionpreviewbutton.less src/uwt-web/themes/avondale/uwt-alert.less src/uwt-web/themes/avondale/uwt-applicationmenu.less src/uwt-web/themes/avondale/uwt-badge.less src/uwt-web/themes/avondale/uwt-binaryswitch.less src/uwt-web/themes/avondale/uwt-blockquote.less src/uwt-web/themes/avondale/uwt-branding.less src/uwt-web/themes/avondale/uwt-button.less src/uwt-web/themes/avondale/uwt-checkbox.less src/uwt-web/themes/avondale/uwt-colors.less src/uwt-web/themes/avondale/uwt-countdown.less src/uwt-web/themes/avondale/uwt-footer.less src/uwt-web/themes/avondale/uwt-formview.less src/uwt-web/themes/avondale/uwt-header.less src/uwt-web/themes/avondale/uwt-htmlheading.less src/uwt-web/themes/avondale/uwt.less src/uwt-web/themes/avondale/uwt-linkbutton.less src/uwt-web/themes/avondale/uwt-listbox.less src/uwt-web/themes/avondale/uwt-listview.less src/uwt-web/themes/avondale/uwt-mainpage.less src/uwt-web/themes/avondale/uwt-megamenu.less src/uwt-web/themes/avondale/uwt-menu.less src/uwt-web/themes/avondale/uwt-page.less src/uwt-web/themes/avondale/uwt-panel.less src/uwt-web/themes/avondale/uwt-popup.less src/uwt-web/themes/avondale/uwt-richtextbox.less src/uwt-web/themes/avondale/uwt-rotaryswitch.less src/uwt-web/themes/avondale/uwt-sidebar.less src/uwt-web/themes/avondale/uwt-slider.less src/uwt-web/themes/avondale/uwt-spinner.less src/uwt-web/themes/avondale/uwt-tabcontainer.less src/uwt-web/themes/avondale/uwt-textbox.less src/uwt-web/themes/avondale/uwt-tile.less src/uwt-web/themes/avondale/uwt-toggle.less src/uwt-web/themes/avondale/uwt-toolbar.less src/uwt-web/themes/avondale/uwt-trackbar.less src/uwt-web/themes/avondale/uwt-window.less src/uwt-web/themes/avondale/uwt-wizard.less
build $root/output/uwt.min.js: jsc src/uwt-web/scripts/Base64.js src/uwt-web/scripts/datetime.1-1.js src/uwt-web/scripts/json2.min.js src/uwt-web/scripts/MousePosition.js src/uwt-web/scripts/PrependArgument.js src/uwt-web/scripts/System.js src/uwt-web/scripts/WindowDimensions.js src/uwt-web/scripts/controls/AdditionalDetailWidget.js src/uwt-web/scripts/controls/Alert.js src/uwt-web/scripts/controls/BinarySwitch.js src/uwt-web/scripts/controls/Button.js src/uwt-web/scripts/controls/CheckBox.js src/uwt-web/scripts/controls/CodeEditor.js src/uwt-web/scripts/controls/CommandBar.js src/uwt-web/scripts/controls/Countdown.js src/uwt-web/scripts/controls/Disclosure.js src/uwt-web/scripts/controls/DropDown.js src/uwt-web/scripts/controls/FlyoutTabContainer.js src/uwt-web/scripts/controls/LinkButton.js src/uwt-web/scripts/controls/ListView.js src/uwt-web/scripts/controls/Menu.js src/uwt-web/scripts/controls/Meter.js src/uwt-web/scripts/controls/Panel.js src/uwt-web/scripts/controls/Popup.js src/uwt-web/scripts/controls/ProgressBar.js src/uwt-web/scripts/controls/Ribbon.js src/uwt-web/scripts/controls/RichTextBox.js src/uwt-web/scripts/controls/RotarySwitch.js src/uwt-web/scripts/controls/Sidebar.js src/uwt-web/scripts/controls/SlideContainer.js src/uwt-web/scripts/controls/Slider.js src/uwt-web/scripts/controls/SplitContainer.js src/uwt-web/scripts/controls/Switch.js src/uwt-web/scripts/controls/TabContainer.js src/uwt-web/scripts/controls/TextBox.js src/uwt-web/scripts/controls/ToggleSwitch.js src/uwt-web/scripts/controls/ToolTip.js src/uwt-web/scripts/controls/TrackBar.js src/uwt-web/scripts/controls/Window.js src/uwt-web/scripts/controls/Wizard.js
