From ac8f8c65829fe1d23e2cbaaed1dffd5762f58fa6 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 24 Mar 2009 21:16:28 +0000 Subject: [PATCH] Starting to add install rules. --- Cantera/python/examples/Makefile | 19 +++++++++++++++---- Cantera/python/examples/Makefile.in | 10 ++++++++++ .../python/examples/equilibrium/Makefile.in | 12 ++++++++++++ .../equilibrium/adiabatic_flame/Makefile.in | 13 +++++++++++++ .../equilibrium/multiphase_plasma/Makefile.in | 13 +++++++++++++ .../equilibrium/simple_test/Makefile.in | 12 ++++++++++++ .../equilibrium/stoich_flame/Makefile.in | 15 ++++++++++++++- 7 files changed, 89 insertions(+), 5 deletions(-) diff --git a/Cantera/python/examples/Makefile b/Cantera/python/examples/Makefile index be9e135b5..29722f559 100644 --- a/Cantera/python/examples/Makefile +++ b/Cantera/python/examples/Makefile @@ -2,28 +2,39 @@ PY_DEMO_DIRS = equilibrium flames gasdynamics kinetics liquid_vapor \ misc reactors surface_chemistry transport fuel_cells +MAKE = gmake all: @(for d in $(PY_DEMO_DIRS) ; do \ echo "entering directory $${d}..."; \ - (cd $${d}; make run) ; \ + (cd $${d}; $(MAKE)) ; \ done) run: @(for d in $(PY_DEMO_DIRS) ; do \ echo "entering directory $${d}..."; \ - (cd $${d}; make run) ; \ + (cd $${d}; $(MAKE) run) ; \ done) test: @(for d in $(PY_DEMO_DIRS) ; do \ echo "entering directory $${d}..."; \ - (cd $${d}; make test) ; \ + (cd $${d}; $(MAKE) test) ; \ done) +install: + /usr/bin/install -c -d /home/hkmoffa/arch/linux/cantera-1.7_develop/demos/python + /usr/bin/install -c -c -m ug+rw,o+r Makefile /home/hkmoffa/arch/linux/cantera-1.7_develop/demos/python + /usr/bin/install -c -c -m ug+rw,o+r run_examples.py /home/hkmoffa/arch/linux/cantera-1.7_develop/demos/python + @(for d in $(PY_DEMO_DIRS) ; do \ + echo "entering directory $${d}..."; \ + (cd $${d}; $(MAKE) install) ; \ + done) + + clean: @(for dd in $(PY_DEMO_DIRS) ; do \ echo "entering directory $${dd}..."; \ - (cd $${dd}; make -i clean; cd ..) ; \ + (cd $${dd}; $(MAKE) -i clean; cd ..) ; \ done) # end of file diff --git a/Cantera/python/examples/Makefile.in b/Cantera/python/examples/Makefile.in index c24bb4769..7d75e7a45 100644 --- a/Cantera/python/examples/Makefile.in +++ b/Cantera/python/examples/Makefile.in @@ -21,6 +21,16 @@ test: (cd $${d}; $(MAKE) test) ; \ done) +install: + @INSTALL@ -d @ct_demodir@/python + @INSTALL@ -c -m ug+rw,o+r Makefile @ct_demodir@/python + @INSTALL@ -c -m ug+rw,o+r run_examples.py @ct_demodir@/python + @(for d in $(PY_DEMO_DIRS) ; do \ + echo "entering directory $${d}..."; \ + (cd $${d}; $(MAKE) install) ; \ + done) + + clean: @(for dd in $(PY_DEMO_DIRS) ; do \ echo "entering directory $${dd}..."; \ diff --git a/Cantera/python/examples/equilibrium/Makefile.in b/Cantera/python/examples/equilibrium/Makefile.in index becce123e..f00a0fbb0 100644 --- a/Cantera/python/examples/equilibrium/Makefile.in +++ b/Cantera/python/examples/equilibrium/Makefile.in @@ -1,5 +1,7 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/equilibrium + PY_DEMOS = simple_test stoich_flame adiabatic_flame multiphase_plasma MAKE = @MAKE@ @@ -22,6 +24,16 @@ test: cd .. ; \ done) +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r plotting.py $(INST_DIR) + @(for d in $(PY_DEMOS) ; do \ + echo "entering directory $${d}..."; \ + (cd $${d}; $(MAKE) install) ; \ + done) + + clean: rm -f *.log *.csv *.xml @(for py in $(PY_DEMOS) ; do \ diff --git a/Cantera/python/examples/equilibrium/adiabatic_flame/Makefile.in b/Cantera/python/examples/equilibrium/adiabatic_flame/Makefile.in index b21fddfc1..c0b8181f6 100644 --- a/Cantera/python/examples/equilibrium/adiabatic_flame/Makefile.in +++ b/Cantera/python/examples/equilibrium/adiabatic_flame/Makefile.in @@ -1,5 +1,8 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/equilibrium/adiabatic_flame + + PYTHON_CMD = @PYTHON_CMD@ run: @@ -7,6 +10,16 @@ run: test: ./runtest + +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r adiabatic.py $(INST_DIR) + @INSTALL@ -c runtest $(INST_DIR) + @INSTALL@ -c cleanup $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r adiabatic_blessed_0.csv $(INST_DIR) + clean: rm -f *.log *.csv *.xml ./cleanup diff --git a/Cantera/python/examples/equilibrium/multiphase_plasma/Makefile.in b/Cantera/python/examples/equilibrium/multiphase_plasma/Makefile.in index fc28965af..221f79aa4 100644 --- a/Cantera/python/examples/equilibrium/multiphase_plasma/Makefile.in +++ b/Cantera/python/examples/equilibrium/multiphase_plasma/Makefile.in @@ -1,5 +1,8 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/equilibrium/multiphase_plasma + + PYTHON_CMD = @PYTHON_CMD@ run: @@ -7,6 +10,16 @@ run: test: ./runtest + +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r multiphase_plasma.py $(INST_DIR) + @INSTALL@ -c runtest $(INST_DIR) + @INSTALL@ -c cleanup $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r equil_koh_blessed_0.csv $(INST_DIR) + clean: rm -f *.log *.csv *.xml ./cleanup diff --git a/Cantera/python/examples/equilibrium/simple_test/Makefile.in b/Cantera/python/examples/equilibrium/simple_test/Makefile.in index b21fddfc1..29db8ab81 100644 --- a/Cantera/python/examples/equilibrium/simple_test/Makefile.in +++ b/Cantera/python/examples/equilibrium/simple_test/Makefile.in @@ -1,5 +1,7 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/equilibrium/simple_test + PYTHON_CMD = @PYTHON_CMD@ run: @@ -7,6 +9,16 @@ run: test: ./runtest + +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r simple.py $(INST_DIR) + @INSTALL@ -c runtest $(INST_DIR) + @INSTALL@ -c cleanup $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) + + clean: rm -f *.log *.csv *.xml ./cleanup diff --git a/Cantera/python/examples/equilibrium/stoich_flame/Makefile.in b/Cantera/python/examples/equilibrium/stoich_flame/Makefile.in index b21fddfc1..99cae4d16 100644 --- a/Cantera/python/examples/equilibrium/stoich_flame/Makefile.in +++ b/Cantera/python/examples/equilibrium/stoich_flame/Makefile.in @@ -1,12 +1,25 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/equilibrium/stoich_flame + + PYTHON_CMD = @PYTHON_CMD@ run: - $(PYTHON_CMD) adiabatic.py + $(PYTHON_CMD) stoich.py test: ./runtest + +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r stoich.py $(INST_DIR) + @INSTALL@ -c runtest $(INST_DIR) + @INSTALL@ -c cleanup $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) + + clean: rm -f *.log *.csv *.xml ./cleanup