Skip to content
Snippets Groups Projects
Commit 1eea5ee0 authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Create cdilib.c in the build directory.

parent 2f8184b5
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -327,8 +327,8 @@ pkgconfig/cdipio.pc: $(top_builddir)/config.status $(srcdir)/pkgconfig/cdipio.pc
pkgconfig/cdi_f2003.pc: $(top_builddir)/config.status $(srcdir)/pkgconfig/cdi_f2003.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
cdilib.c:
$(AM_V_GEN)$(am__cd) $(top_srcdir)/src && ./make_cdilib
cdilib.c: $(libcdi_la_SOURCES) $(srcdir)/make_cdilib
$(AM_V_GEN)CPP='$(CPP)' $(srcdir)/make_cdilib $(srcdir)
CLEANFILES = cdilib.c
MOSTLYCLEANFILES = make_fint
......
......@@ -19,8 +19,9 @@ rm -f ${PROG}
DATE=`date +%F`
if test -f ../configure.ac ; then
CDILIBVERSION=\"`sed -n '/^AC_INIT(/s/AC_INIT *( *[^,]*,[[ ]*\([^],]*\).*/\1/ p' ../configure.ac`\"
config_file="${srcdir}/../configure.ac"
if test -f "$config_file" ; then
CDILIBVERSION=\"`sed -n '/^AC_INIT(/s/AC_INIT *( *[^,]*,[[ ]*\([^],]*\).*/\1/ p' "$config_file"`\"
else
echo "error: cannot find configure.ac" >&2
exit 1
......@@ -193,8 +194,10 @@ until test "foo$scanlist" = "foo" ; do
if echo "$fileList" | grep -q '\<'"$curFile"'\>' ; then
true #Nothing to do, we have already scanned this header.
else
curFilePath="$srcdir/$curFile"
if [ "$curFile" = "config.h" ] ; then curFilePath="$curFile" ; fi
#Prepend the includes of the current header to the scanlist so that we will scan them in the order that the preprocessor would.
scanlist="$(listIncludes "$curFile") <$curFile> $scanlist"
scanlist="$(listIncludes "$curFilePath") <$curFile> $scanlist"
fi
;;
esac
......@@ -212,7 +215,7 @@ for file in $fileList ; do
done
cpp -P -DVERSION="${CDILIBVERSION}" -DCDI_H_ \
${CPP-cpp} -P -DVERSION="${CDILIBVERSION}" -DCDI_H_ \
$srcdir/version.c >>${PROG}
# Fortran interface (with -DHAVE_CF_INTERFACE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment