www/Makefile

Thu, 05 Dec 2019 22:47:40 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 05 Dec 2019 22:47:40 +0100
changeset 563
acdd54144838
parent 522
35675eadc655
child 571
468377312726
permissions
-rw-r--r--

Added export inventory and profiles in beerxml format. Small fixes in beerxml recipe and product export.

# Makefile for the bms webserver
# Copyright (c) 2018-2019 by M. Broek.

include ../Makefile.global

SRC		= cmd_fermenter.php cmd_co2meter.php config.php.dist crontasks.php \
		  export_equipments.php export_fermentables.php export_hops.php export_mashs.php \
		  export_miscs.php export_styles.php export_suppliers.php export_waters.php \
		  export_yeasts.php favicon.ico gen_about.php \
		  getbrewlog.php getco2meter.php getco2pressurelog.php getfermentablesources.php \
		  getfermenter.php getfermentlog.php gethopsources.php getmiscsources.php getnode.php \
		  getwatersources.php getyeastsources.php import_ingredients.php index.php \
		  inv_equipments.php inv_fermentables.php inv_hops.php inv_instock.php \
		  inv_miscs.php inv_suppliers.php inv_waters.php inv_yeasts.php \
		  log_brew.php log_co2pressure.php log_fermentation.php \
		  mon_brewer.php mon_co2meter.php mon_fermenter.php mon_node.php \
		  prod_archive_code.php prod_archive_date.php prod_archive_name.php prod_beerxml.php \
		  prod_checklist.php prod_divide.php prod_duplicate.php prod_edit.php prod_export.php prod_forum.php \
		  prod_impbrew.php prod_inprod.php prod_new.php prod_print.php prod_torecipe.php \
		  prod_r_efficiency.php prod_r_yeast.php prod_r_totals.php \
		  profile_fermentation.php profile_mash.php profile_setup.php profile_styles.php \
		  profile_water.php \
		  rec_beerxml.php rec_duplicate.php rec_edit.php rec_export.php rec_forum.php \
		  rec_import.php rec_main.php rec_new.php rec_print.php rec_toproduct.php \
		  upl_brew.php upl_fermentables.php upl_hops.php upl_miscs.php upl_recipe.php \
		  upl_styles.php upl_yeasts.php version.php
SUB		= version.php.in images/* css/* jqwidgets/* jqwidgets/styles/* \
		  jqwidgets/styles/images/* jqwidgets/globalization/* js/* \
		  includes/* fpdf/* import/*
OTHER		= Makefile
CSS_FILES	= $(filter-out %-min.css,$(wildcard css/*.css css/**/*.css ))
YUI_COMPRESSOR	= yui-compressor
YUI_COMPRESSOR_FLAGS	= --charset utf-8 --verbose

CSS_MINIFIED = $(CSS_FILES:.css=-min.css)



#############################################################################

.c.o:
		${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<

all:		minify-css

clean:
		rm -f version.php ${CSS_MINIFIED}

minify-css:	$(CSS_FILES) $(CSS_MINIFIED)

%-min.css:	%.css
		@echo '==> Minifying $<'
		$(YUI_COMPRESSOR) $(YUI_COMPRESSOR_FLAGS) --type css $< >$@
		@echo

install:
		${INSTALL} -d -g 314 -o 314 ${PREFIX} ${WWWDIR} ${WWWDIR}/css ${WWWDIR}/fpdf \
			${WWWDIR}/fpdf/font \
			${WWWDIR}/jqwidgets ${WWWDIR}/js ${WWWDIR}/images/ ${WWWDIR}/includes/
		${INSTALL} -d -g 314 -o 314 -m 0777 ${WWWDIR}/run
		${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log
		${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/brews
		${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/fermentation
		${INSTALL} -g 314 -o 314 -m 0644 ${SRC} ${WWWDIR}/
		${INSTALL} -g 314 -o 314 -m 0644 version.php ${WWWDIR}/
		${INSTALL} -g 314 -o 314 -m 0644 css/* ${WWWDIR}/css/
		${INSTALL} -g 314 -o 314 -m 0644 images/* ${WWWDIR}/images/
		${INSTALL} -g 314 -o 314 -m 0644 includes/* ${WWWDIR}/includes/
		cp -r jqwidgets/* ${WWWDIR}/jqwidgets/
		chown -R 314:314 ${WWWDIR}/jqwidgets
		cp -r -p fpdf/* ${WWWDIR}/fpdf/
		chown -R 314:314 ${WWWDIR}/fpdf
		${INSTALL} -g 314 -o 314 -m 0644 js/* ${WWWDIR}/js/

filelist:	Makefile
		BASE=`pwd`; \
		BASE=`basename $${BASE}`; \
		(for f in ${SRC} ${SUB} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist

depend:

mercurial