Fix version output when missing.
[plcapi.git] / php / Makefile
1 #
2 # (Re)builds PHP API. PHP classes must be defined in a single file.
3 #
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2006 The Trustees of Princeton University
6 #
7 # $Id$
8 # $URL$
9 #
10
11 all: plc_api.php
12
13 methods.php: methods.py ../PLC/__init__.py ../PLC/Methods/__init__.py
14         PYTHONPATH=.. python $< > $@
15         # Indent all lines by a couple of spaces
16         sed -i -e "s/^/  /" $@
17
18 plc_api.php: header.php methods.php footer.php
19         # Set timestamp
20         sed -e "s/@DATE@/$$(date)/" header.php > $@
21         cat methods.php footer.php >> $@
22
23 clean:
24         rm -f plc_api.php methods.php
25
26 .PHONY: all clean