Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto #22

Merged
merged 6 commits into from
Jan 26, 2016
Merged

Auto #22

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,20 @@
*.a
*.mod
TODO
Makefile.in
aclocal.m4
autom4te.cache/
autoscan.log
configure
configure.scan
depcomp
install-sh
missing
Makefile
config.log
config.status
tests/Makefile
*.tar.gz
datetime-fortran.pc
src/tests/datetime_tests

1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Milan Curcic <mcurcic@wavebitscientific.com>
Bjoern Hendrik Fock <bjoern.fock@uni-hamburg.de>
Marco Galli <marcofgalli@gmail.com>
Huziy Oleksandr Sasha <https://github.com/guziy>
Mark Carter <alt.mcarter@gmail.com>
370 changes: 370 additions & 0 deletions INSTALL

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUBDIRS = src/lib src/tests

pkgconfig_DATA = datetime-fortran.pc

scrub-clean :
scrub-clean.sh

CLEANFILES = datetime-fortran.pc
File renamed without changes.
22 changes: 22 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
AC_PREREQ([2.69])
AC_INIT([datetime-fortran], [1.3.0T])
AC_CONFIG_SRCDIR([src/lib/datetime.f90])

# foreign flag tells that we are not conforming to the GNU standards
# and hence can ommit NEWS, README, COPYING
AM_INIT_AUTOMAKE([foreign])


# for package configuration
PKG_PROG_PKG_CONFIG
PKG_INSTALLDIR

AC_PROG_FC([gfortran], [Fortran 90]) # we need a Fortran 90 compiler
AC_PROG_RANLIB # needed to create libraries

AC_CONFIG_FILES([Makefile src/lib/Makefile src/tests/Makefile])
# Generate a PC file so that others can easily detect our libraries:
AC_CONFIG_FILES([datetime-fortran.pc:datetime-fortran.pc.in])


AC_OUTPUT
7 changes: 7 additions & 0 deletions datetime-fortran.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
prefix=@prefix@

Name: @PACKAGE_NAME@
Description: A Fortran library that provides time and date manipulation facilities
Version: @PACKAGE_VERSION@
Libs: -L${prefix}/lib -ldatetime
Cflags: -I${prefix}/include
19 changes: 19 additions & 0 deletions scrub-clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

# Try to get rid of a lot of stuff generated by all the autotools

clean_dir () { (cd $1 ; rm -f Makefile Makefile.in *.o *.mod *.a datetime_tests ;); }

rm -f configure

rm -f datetime-fortran.pc
rm -f *.gz aclocal.m4 depcomp install-sh missing \
autoscan.log Makefile Makefile.in test-driver
rm -f config.log config.status configure.scan

rm -rf autom4te.cache

#(cd tests ; rm -f Makefile Makefile.in datetime_tests)

clean_dir src/lib
clean_dir src/tests
26 changes: 0 additions & 26 deletions src/lib/Makefile

This file was deleted.

35 changes: 35 additions & 0 deletions src/lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Items needed specifically by autotools
AM_FCFLAGS = -Wall -O0 -C -fbacktrace

include_HEADERS = datetime_module.mod

lib_LIBRARIES = libdatetime.a

libdatetime_a_SOURCES = datetime.f90 mod_datetime.f90 mod_timedelta.f90 \
mod_strftime.f90 mod_clock.f90 mod_constants.f90

CLEANFILES = *.mod

# Mostly unchanged from original upstream Makefile
OBJS = datetime.o mod_clock.o mod_datetime.o mod_timedelta.o mod_strftime.o mod_constants.o

.f90.o:
$(FC) -c $(AM_FCFLAGS) $<

libdatetime.a : datetime.o
ar ruv libdatetime.a $(OBJS)

datetime_module.mod : datetime.o

#install-exec-hook : datetime_module.mod
# cp datetime_module.mod $(libdir)

#uninstall-hook :
# rm $(libdir)/datetime_module.mod

datetime.o : datetime.f90 mod_clock.o mod_datetime.o mod_strftime.o mod_timedelta.o
mod_clock.o: mod_clock.f90 mod_datetime.o mod_timedelta.o
mod_datetime.o: mod_datetime.f90 mod_constants.o mod_strftime.o mod_timedelta.o
mod_timedelta.o: mod_timedelta.f90
mod_strftime.o: mod_strftime.f90
mod_constants.o: mod_constants.f90
24 changes: 0 additions & 24 deletions src/tests/Makefile

This file was deleted.

25 changes: 25 additions & 0 deletions src/tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Items needed specifically by autotools
AM_FCFLAGS = -Wall -O0 -C -fbacktrace

noinst_PROGRAMS = datetime_tests

datetime_tests_SOURCES = datetime_tests.f90

#datetime_tests$(EXEEXT) : datetime_tests.f90 ../datetime_module.mod
# $(FC) -I.. $< -o $@ -L.. -ldatetime

CLEANFILES = *.mod

# Mostly unchanged from original upstream Makefile
LIB = ../lib
INCLUDE = ../lib


OBJ = datetime_tests.o

.f90.o:
$(FC) -c $(AM_FCFLAGS) -I$(INCLUDE) $<

datetime_tests$(EXEEXT): datetime_tests.o
$(FC) $(FCFLAGS) $(OBJ) -L$(LIB) -ldatetime -o $@