Skip to content

Commit

Permalink
Simplify Makefile for Python code.
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanSkocic committed Nov 21, 2024
1 parent 26f55fe commit f81eafd
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions py/src/pycodata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,15 @@ AST_DIR=../../../data

AST_SRC=$(wildcard $(AST_DIR)/*.toml)
CPYTHON = cpy_codata_constants_2010.c cpy_codata_constants_2014.c cpy_codata_constants_2018.c cpy_codata_constants_2022.c
PYTHON = constants_2010.py constants_2014.py constants_2018.py constants_2022.py
PYTHON = codata_constants_2010.py codata_constants_2014.py codata_constants_2018.py codata_constants_2022.py

.PHONY: clean

# all: $(CPYTHON) $(PYTHON)
all: $(PYTHON)

cpy_codata_constants_2010.c: $(AST_DIR)/codata_2010.toml
$(PY) $(GEN) $< $@

cpy_codata_constants_2014.c: $(AST_DIR)/codata_2014.toml
$(PY) $(GEN) $< $@

cpy_codata_constants_2018.c: $(AST_DIR)/codata_2018.toml
$(PY) $(GEN) $< $@

cpy_codata_constants_2022.c: $(AST_DIR)/codata_2022.toml
$(PY) $(GEN) $< $@

constants_2010.py: $(AST_DIR)/codata_2010.toml
$(PY) $(GENPY) $< $@

constants_2014.py: $(AST_DIR)/codata_2014.toml
$(PY) $(GENPY) $< $@

constants_2018.py: $(AST_DIR)/codata_2018.toml
$(PY) $(GENPY) $< $@

constants_2022.py: $(AST_DIR)/codata_2022.toml
%.py: $(AST_DIR)/%.toml
$(PY) $(GENPY) $< $@

clean:
Expand Down

0 comments on commit f81eafd

Please sign in to comment.