aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-02-21 11:21:12 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-02-21 11:21:12 +0100
commitd9cf71000fb7c2197d05bae1c7bce47af5297aa5 (patch)
tree6e3bf56590ebd51dd6744193f44609a33d183a12 /Makefile
parentb9c8e02072ea6da04ddc9fe9795f699697f25d07 (diff)
downloadee-python-d9cf71000fb7c2197d05bae1c7bce47af5297aa5.tar.gz
ee-python-d9cf71000fb7c2197d05bae1c7bce47af5297aa5.tar.bz2
ee-python-d9cf71000fb7c2197d05bae1c7bce47af5297aa5.tar.xz
ee-python-d9cf71000fb7c2197d05bae1c7bce47af5297aa5.zip
Trying a new way to generate way to generate files.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 19 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fd67d4e..c717472 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,24 @@
-all: env-packages
+XSDS = xsd/ee-bom.xsd xsd/ee-catalog.xsd
+XSD_PYS = src/ee/xml/bomFile.py src/ee/xml/catalogFile.py
-env:
+all: env/pip.cookie $(XSD_PYS)
+
+env/bin/pip:
virtualenv -p python3 env
-env-packages: env
+env/pip.cookie: requirements.txt env/bin/pip
env/bin/pip install -r requirements.txt
env/bin/pip install -e .
+ @touch env/pip.cookie
+
+src/ee/xml/__init__.py:
+ touch $@
+
+src/ee/xml/%File.py: xsd/ee-%.xsd
+ env/bin/generateDS.py \
+ -f \
+ --one-file-per-xsd \
+ --output-directory=src/ee/xml \
+ -m $<
+
+$(XSDS): env/pip.cookie src/ee/xml/__init__.py