Commit b5145662 authored by Marco Govoni's avatar Marco Govoni
Browse files

Added make conf layer

parent 6a62f013
......@@ -7,8 +7,9 @@
*.UPF
*.dSYM
*.a
*.in
*.out
doc/_build/
Modules/west_version.f90
Pytools/setup.py
west_make.inc
*/__pycache__
......@@ -5,6 +5,7 @@ vX.X.X (XXXX/XX/XX)
-------------------
- Introduced automatic installation of missing python packages
- Introduced the conf layer in the Makefile to ease installation
- Updated manual
v4.1.0 (2019/10/18)
......
......@@ -2,17 +2,31 @@
include ../make.inc
WEST_VERSION_NUMBER=4.1.1
default: all
conf:
@[ "${PYT}" ] || ( echo ">> PYT is not set. Ex: make conf PYT=python3"; exit 1 )
@echo " " > west_make.inc
@echo TOPDIR=${TOPDIR} >> west_make.inc
@echo PYT=${PYT} >> west_make.inc
@echo WEST_VERSION_NUMBER=${WEST_VERSION_NUMBER} >> west_make.inc
@echo "Generated file: west_make.inc"
check_conf:
@[ -f "west_make.inc" ] || ( echo ">> Cannot find west_make.inc. Run: make conf PYT=python3"; exit 1 )
$(eval include ./west_make.inc)
report_build_vars :
@[ "${PYT}" ] || ( echo ">> PYT is not set. Please set Python, ex: make PYT=python3"; exit 1 )
@[ "${MPIF90}" ] || ( echo ">> MPIF90 is not set."; exit 1 )
@[ "${CC}" ] || ( echo ">> CC is not set."; exit 1 )
@echo " "
@echo "##############"
@echo "# Build vars #"
@echo "##############"
@echo " "
@[ "${MPIF90}" ] || ( echo ">> MPIF90 is not set."; exit 1 )
@[ "${CC}" ] || ( echo ">> CC is not set."; exit 1 )
@echo "# WEST_VERSION_NUMBER : ${WEST_VERSION_NUMBER}"
@echo "# TOPDIR : ${TOPDIR}"
@echo "# FDFLAGS : ${FDFLAGS}"
@echo "# IFLAGS : ${IFLAGS}"
......@@ -47,12 +61,13 @@ report_build_vars :
@echo "# PYT : ${PYT}"
@echo " "
pytools: \
check_conf \
report_build_vars \
pytools_do
wstat: \
pytools_do \
libraries_do \
modules_do \
tools_do \
......@@ -65,10 +80,12 @@ io_kernel_do \
wstat_do
wfreq: \
pytools \
wstat \
wfreq_do
westpp: \
pytools \
wstat \
wfreq \
westpp_do
......@@ -224,4 +241,8 @@ westpp_undo:
( cd Westpp ; if test "$(MAKE)" = "" ; then make clean ; \
else $(MAKE) clean ; fi ) ; fi
distclean: clean
unconf:
[ -f "west_make.inc" ] && ( rm west_make.inc )
veryclean: clean \
unconf
# Makefile for Modules
include ../../make.inc
include ../west_make.inc
# location of needed modules
MODFLAGS= $(MOD_FLAG)../../iotk/src $(MOD_FLAG)../../Modules $(MOD_FLAG)../../LAXlib \
......@@ -23,7 +24,7 @@ all : title tldeps libmodules.a
tldeps:
test -n "$(TLDEPS)" && ( cd ../.. ; $(MAKE) $(MFLAGS) $(TLDEPS) || exit 1) || :
./update_west_version ${TOPDIR}
./update_west_version ${TOPDIR} ${WEST_VERSION_NUMBER}
libmodules.a : $(MODULES_OBJS)
$(AR) $(ARFLAGS) $@ $?
......
......@@ -3,6 +3,9 @@
top_dir=$1
echo "TOPDIR = " $top_dir
west_version=$2
echo "WEST_VERSION = " $west_version
# check if svn info available (do not write anything)
git remote -v 2> /dev/null > /dev/null
......@@ -16,7 +19,7 @@ fi
echo "GITREV = " $git_rev
# write svn into file version_tmp.f90
cat west_version.f90.in | sed "s/unknown/$git_rev/;s&unset&$top_dir&" > west_version.f90.tmp
cat west_version.f90.in | sed "s,checkit,$west_version,;s/unknown/$git_rev/;s&unset&$top_dir&" > west_version.f90.tmp
# check if a previous version.f90 file exists
if test -f west_version.f90 ; then
......
......@@ -20,7 +20,7 @@ MODULE west_version
!
SAVE
!
CHARACTER (LEN=6) :: west_version_number = '4.1.0'
CHARACTER (LEN=6) :: west_version_number = 'checkit'
CHARACTER (LEN=512) :: west_git_revision = 'unknown'
CHARACTER (LEN=512) :: west_forpy_path = 'unset'
TYPE(list) :: paths
......
#PYT=python3
include ../west_make.inc
all: \
title \
install
install:
cat setup.py.in | sed "s,checkit,${WEST_VERSION_NUMBER}," > setup.py
- ${PYT} setup.py install --user --prefix= --record files.txt
clean:
......
......@@ -2,7 +2,7 @@ from setuptools import setup
from setuptools import find_packages
setup(name="west",
version="4.1.0",
version="checkit",
packages=find_packages(),
description='installation script for WEST',
url='https://west-code.org',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment