~ubuntu-branches/ubuntu/oneiric/cardstories/oneiric

« back to all changes in this revision

Viewing changes to static/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Loic Dachary (OuoU)
  • Date: 2011-08-28 00:22:32 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20110828002232-m882t5uwjmsmaq0j
Tags: 1.0.6-1
upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Copyright (C) 2011 Dachary <loic@dachary.org>
 
3
#
 
4
# This software's license gives you freedom; you can copy, convey,
 
5
# propagate, redistribute and/or modify this program under the terms of
 
6
# the GNU Affero General Public License (AGPL) as published by the Free
 
7
# Software Foundation (FSF), either version 3 of the License, or (at your
 
8
# option) any later version of the AGPL published by the FSF.
 
9
#
 
10
# This program is distributed in the hope that it will be useful, but
 
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero
 
13
# General Public License for more details.
 
14
#
 
15
# You should have received a copy of the GNU Affero General Public License
 
16
# along with this program in a file in the toplevel directory called
 
17
# "AGPLv3".  If not, see <http://www.gnu.org/licenses/>.
 
18
#
 
19
# wget http://yui.zenfs.com/releases/yuicompressor/yuicompressor-2.4.6.zip
 
20
YUICOMPRESSOR=/var/www/yuicompressor-2.4.6/build/yuicompressor-2.4.6.jar
 
21
 
 
22
JS=js/jquery/jquery-1.6.2.js js/supplant.js tablesorter/jquery.tablesorter.js tablesorter/jquery.tablesorter.pager.js js/jquery.metadata.js js/jquery.cookie.js jscrollpane/jquery.jscrollpane.js js/jquery.cardstories.js test/skin.js js/jquery.query-2.1.7.js js/jquery.placeholder-1.0.1.js
 
23
 
 
24
MINIFIED=cardstories.js cardstories.png cardstories.css index.html
 
25
 
 
26
all: 
 
27
        ${MAKE} -C css all
 
28
        ${MAKE} ${MINIFIED}
 
29
 
 
30
clean:
 
31
 
 
32
index.html: cardstories.html
 
33
        echo ' <!DOCTYPE html>' > index.html
 
34
        echo '<html>' >>  index.html
 
35
        echo '<head>' >>  index.html
 
36
        echo ' <title>Cardstories</title>'
 
37
        echo ' <meta http-equiv="Content-type" content="text/html;charset=UTF-8">' >> index.html
 
38
        echo ' <script type="text/javascript" src="cardstories.js"></script>' >> index.html
 
39
        echo ' <link rel="stylesheet" href="cardstories.css" type="text/css" media="screen">' >> index.html
 
40
        echo '</head>' >> index.html
 
41
        perl -ne 'print if(/<body>/../EOF/);' < cardstories.html >> index.html
 
42
 
 
43
cardstories.css cardstories.png: css/cardstories.css
 
44
        cd css ; ${MAKE} all
 
45
        cp css/cardstories.png .
 
46
        if [ -f ${YUICOMPRESSOR} ] ; then \
 
47
                java -jar ${YUICOMPRESSOR} -o cardstories.css css/cardstories.css ; \
 
48
        else \
 
49
                cp css/cardstories.css cardstories.css ; \
 
50
        fi
 
51
 
 
52
cardstories.js: ${JS}
 
53
        cat ${JS} > merged.js
 
54
        if [ -f ${YUICOMPRESSOR} ] ; then \
 
55
                java -jar ${YUICOMPRESSOR} -o cardstories.js merged.js ; \
 
56
        else \
 
57
                cp merged.js cardstories.js ; \
 
58
        fi
 
59
        rm merged.js