1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-11-03 20:54:07 +01:00
trexio/Makefile.in
2021-05-05 12:17:15 +02:00

107 lines
2.6 KiB
Makefile

# @configure_input@
# Package-specific substitution variables
package = @PACKAGE_NAME@
version = @PACKAGE_VERSION@
tarname = @PACKAGE_TARNAME@
distdir = $(tarname)-$(version)
# Prefix-specific substitution variables
datarootdir = @datarootdir@
prefix = @prefix@
includedir = @includedir@
docdir = @docdir@
htmldir = @htmldir@
libdir = @libdir@
# Supplementary
exec_prefix = @exec_prefix@
libexecdir = @libexecdir@
lispdir = @lispdir@
# VPATH-specific substitution variables
srcdir = @srcdir@
VPATH = @srcdir@
# Tool-specific substitution variables
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
FC = @FC@
FCFLAGS = @FCFLAGS@
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@
INSTALL = @INSTALL@
.PHONY: FORCE all install uninstall clean maintainer-clean check dist distcheck
.POSIX:
.SUFFIXES:
all install uninstall:
cd src && $(MAKE) $@
check:
cd tests && $(MAKE) $@
clean maintainer-clean:
cd src && $(MAKE) $@
cd tests && $(MAKE) $@
dist: $(distdir).tar.gz
$(distdir).tar.gz: $(distdir)
tar chof - $(distdir) | gzip -9 -c > $@
$(RM) -r -- $(distdir)
# for now copy entire src/ directory into $(distdir) in order for distcheck rule to work
# later on can be changed to ship only files like *.c *.h *.f90 *.so *.mod
$(distdir): FORCE
mkdir -p $(distdir)
cp $(srcdir)/configure.ac $(distdir)
cp $(srcdir)/configure $(distdir)
cp $(srcdir)/config.h.in $(distdir)
cp $(srcdir)/install-sh $(distdir)
mkdir -p $(distdir)/src
mkdir -p $(distdir)/tests
mkdir -p $(distdir)/include
mkdir -p $(distdir)/lib
cp $(srcdir)/include/trexio.h $(distdir)/include
cp $(srcdir)/include/trexio_f.f90 $(distdir)/include
cp $(srcdir)/src/trexio*.c $(distdir)/src
cp $(srcdir)/src/trexio*.h $(distdir)/src
cp $(srcdir)/src/Makefile.in $(distdir)/src
cp $(srcdir)/tests/test.c $(distdir)/tests
cp $(srcdir)/tests/test.f90 $(distdir)/tests
cp $(srcdir)/tests/Makefile.in $(distdir)/tests
cp $(srcdir)/Makefile.in $(distdir)
cp $(srcdir)/trexio.pc.in $(distdir)
cp $(srcdir)/LICENSE $(distdir)
FORCE:
-$(RM) -- $(distdir).tar.gz >/dev/null 2>&1
-$(RM) -r -- $(distdir) >/dev/null 2>&1
distcheck: $(distdir).tar.gz
gzip -cd $(distdir).tar.gz | tar xvf -
cd $(distdir) && \
./configure CC="$(CC)" CFLAGS="$(CFLAGS)" && \
$(MAKE) && \
$(MAKE) DESTDIR=$${PWD}/_inst install && \
$(MAKE) DESTDIR=$${PWD}/_inst check && \
$(MAKE) DESTDIR=$${PWD}/_inst uninstall && \
$(MAKE) clean
$(RM) -r -- $(distdir)
@echo "*** Package $(distdir).tar.gz is ready for distribution."
Makefile: Makefile.in config.status
./config.status $@
config.status: configure
./config.status --recheck