Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
libcdi
Commits
063cbbe8
Commit
063cbbe8
authored
2 years ago
by
Sergey Kosukhin
Browse files
Options
Downloads
Patches
Plain Diff
Generate/update Fortran 77 interface files in the maintainer mode only.
parent
b0ce7d54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!34
Version 2.2.0
,
!16
Remove Fortran interface files from the repo
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Makefile.am
+11
-58
11 additions, 58 deletions
src/Makefile.am
with
11 additions
and
58 deletions
src/Makefile.am
+
11
−
58
View file @
063cbbe8
...
...
@@ -285,63 +285,18 @@ LOCALTARGETS += pkgconfig/cdi_f2003.pc
endif
endif
#
# See https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
make_fint_run
=
stem
=
`
echo
'$@'
|
sed
-e
's|.*/||'
-e
's|.inc||'
-e
's|Fortran.c||'
`
;
if
MAINTAINER_MODE
make_fint_run
+=
./make_fint
-o
$(
@D
)
"
$(
srcdir
)
/
$${
stem
}
.h"
else
make_fint_run
+=
\
test
-f
"
$${
stem
}
.inc"
&&
test
-f
"
$${
stem
}
Fortran.c"
&&
exit
0
;
\
trap
"rm -rf .fint/
$${
stem
}
.lock .fint/
$${
stem
}
.stamp"
1 2 13 15
;
\
if
mkdir
.fint/
$${
stem
}
.lock 2>/dev/null
;
then
\
rm
-f
.fint/
$${
stem
}
.stamp
;
ec
=
0
;
\
test
'.'
!=
'
$(
srcdir
)
'
&&
\
for
f
in
"
$(
srcdir
)
/
$${
stem
}
.inc"
"
$(
srcdir
)
/
$${
stem
}
Fortran.c"
;
do
\
test
-f
$$
f
&&
\
echo
"The source directory is inconsistent: remove '
$$
f' to recover"
>
&2
&&
\
ec
=
1
&&
break
;
done
;
\
test
$$
ec
!=
0
||
./make_fint
-o
$(
@D
)
"
$(
srcdir
)
/
$${
stem
}
.h"
||
ec
=
1
;
\
test
$$
ec
=
0
&&
touch
.fint/
$${
stem
}
.stamp
;
\
rm
-rf
.fint/
$${
stem
}
.lock
;
exit
$$
ec
;
\
else
\
while
test
-d
.fint/
$${
stem
}
.lock
;
do
sleep
1
;
done
;
\
test
-f
.fint/
$${
stem
}
.stamp
||
exit
1
;
fi
endif
cdiFortran.c cdi.inc
:
$(srcdir)/cdi.h make_fint
$(
AM_V_GEN
)$(
top_builddir
)
/libtool
--mode
=
execute ./make_fint
-o
$(
@D
)
$<
cdi.inc
:
cdiFortran.c
# We have to provide the recipe fo non-maintainer mode literally to let make
# know that it contains a recursive make call:
cdiFortran.c cdi.inc
:
@MAINTAINER_MODE_TRUE@ $(srcdir)/cdi.h make_fint
@MAINTAINER_MODE_FALSE@
@$(MKDIR_P)
.fint;
\
@MAINTAINER_MODE_FALSE@
trap
'rm -rf .fint/make.lock .fint/make.stamp'
1
2
13
15;
\
@MAINTAINER_MODE_FALSE@
if
mkdir
.fint/make.lock
2>/dev/null;
then
\
@MAINTAINER_MODE_FALSE@
rm
-f
.fint/make.stamp;
\
@MAINTAINER_MODE_FALSE@
$(MAKE)
$(AM_MAKEFLAGS)
make_fint;
ec
=
$$
?
;
\
@MAINTAINER_MODE_FALSE@
test
$$
ec
=
0
&&
touch
.fint/make.stamp
;
\
@MAINTAINER_MODE_FALSE@
rm
-rf
.fint/make.lock
;
exit
$$
ec
;
\
@MAINTAINER_MODE_FALSE@
else
\
@MAINTAINER_MODE_FALSE@
while
test
-d
.fint/make.lock
;
do
sleep
1
;
done
;
\
@MAINTAINER_MODE_FALSE@
test
-f
.fint/make.stamp
||
exit
1
;
fi
$(AM_V_GEN)$(make_fint_run)
cdi.inc
:
@MAINTAINER_MODE_TRUE@ cdiFortran.c
cdipioFortran.c cdipio.inc
:
@MAINTAINER_MODE_TRUE@ $(srcdir)/cdipio.h make_fint
@MAINTAINER_MODE_FALSE@
@$(MKDIR_P)
.fint;
trap
'rm -rf .fint/make.lock .fint/make.stamp'
1
2
13
15;
\
@MAINTAINER_MODE_FALSE@
if
mkdir
.fint/make.lock
2>/dev/null;
then
\
@MAINTAINER_MODE_FALSE@
rm
-f
.fint/make.stamp;
\
@MAINTAINER_MODE_FALSE@
$(MAKE)
$(AM_MAKEFLAGS)
make_fint;
ec
=
$$
?
;
\
@MAINTAINER_MODE_FALSE@
test
$$
ec
=
0
&&
touch
.fint/make.stamp
;
\
@MAINTAINER_MODE_FALSE@
rm
-rf
.fint/make.lock
;
exit
$$
ec
;
\
@MAINTAINER_MODE_FALSE@
else
\
@MAINTAINER_MODE_FALSE@
while
test
-d
.fint/make.lock
;
do
sleep
1
;
done
;
\
@MAINTAINER_MODE_FALSE@
test
-f
.fint/make.stamp
||
exit
1
;
fi
$(AM_V_GEN)$(make_fint_run)
cdipio.inc
:
@MAINTAINER_MODE_TRUE@ cdipioFortran.c
mo_cdi.f90
:
@MAINTAINER_MODE_TRUE@ $(srcdir)/cdi.h $(top_srcdir)/interfaces/f2003/bindGen.rb
$(
AM_V_GEN
)$(
RUBY
)
$(
top_srcdir
)
/interfaces/f2003/bindGen.rb
$(
srcdir
)
/cdi.h
$@
cdipioFortran.c cdipio.inc
:
$(srcdir)/cdipio.h make_fint
$(
AM_V_GEN
)$(
top_builddir
)
/libtool
--mode
=
execute ./make_fint
-o
$(
@D
)
$<
cdipio.inc
:
cdipioFortran.c
mo_cdi.f90
:
$(srcdir)/cdi.h $(top_srcdir)/interfaces/f2003/bindGen.rb
$(
AM_V_GEN
)$(
RUBY
)
$(
top_srcdir
)
/interfaces/f2003/bindGen.rb
$<
$@
if
MAINTAINER_MODE
# Update files in $(srcdir) when building out-of-source:
$(srcdir)/cdiFortran.c $(srcdir)/cdi.inc
:
$(srcdir)/cdipioFortran.c $(srcdir)/cdipio.inc
:
...
...
@@ -354,7 +309,7 @@ BUILT_SOURCES = \
cdipio.inc
\
cdipioFortran.c
\
mo_cdi.f90
endif
endif
MAINTAINER_MODE
if
FORTRAN_MOD_UC
MO_CDI.$(FCMODEXT)
:
mo_cdi.lo
...
...
@@ -410,9 +365,7 @@ PKGCONFIG_FILES += pkgconfig/cdi_f2003.pc
CLEANFILES
+=
pkgconfig/cdi_f2003.pc
endif
clean-local
:
@MAINTAINER_MODE_FALSE@
-rm
-rf
.fint
-test
'.'
=
'$(srcdir)'
||
rm
-f
cdi.inc
cdiFortran.c
cdipio.inc
cdipioFortran.c
mo_cdi.f90
MAINTAINERCLEANFILES
=
cdi.inc cdiFortran.c cdipio.inc cdipioFortran.c mo_cdi.f90
install-exec-local
:
$(PKGCONFIG_FILES) $(CMAKECONFIG_FILES)
$(
mkinstalldirs
)
"
$(
DESTDIR
)$(
libdir
)
/pkgconfig"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment