Skip to content

Commit

Permalink
Fix out-of-tree builds generating netcdf_json.h and netcdf_proplist.h
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Dec 7, 2024
1 parent 197b4d7 commit 2eafef9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ BUILT_SOURCES = netcdf_json.h netcdf_proplist.h

# Give the recipe for building netcdf_json.h
netcdf_json.h: ${top_srcdir}/libdispatch/ncjson.c ${top_srcdir}/include/ncjson.h ${top_srcdir}/include/ncexternl.h
rm -fr ${srcdir}/netcdf_json.h
cat ${srcdir}/ncjson.h | sed -e 's/NCJSON_H/NETCDF_JSON_H/' >> ${srcdir}/netcdf_json.h
echo '#ifdef NETCDF_JSON_H' >> netcdf_json.h
sed -e '/ncjson.h/d' < ${srcdir}/../libdispatch/ncjson.c >> ${srcdir}/netcdf_json.h
echo '#endif /*NETCDF_JSON_H*/' >> ${srcdir}/netcdf_json.h
rm -fr ${builddir}/netcdf_json.h
cat ${srcdir}/ncjson.h | sed -e 's/NCJSON_H/NETCDF_JSON_H/' >> ${builddir}/netcdf_json.h
echo '#ifdef NETCDF_JSON_H' >> ${builddir}/netcdf_json.h
sed -e '/ncjson.h/d' < ${srcdir}/../libdispatch/ncjson.c >> ${builddir}/netcdf_json.h
echo '#endif /*NETCDF_JSON_H*/' >> ${builddir}/netcdf_json.h

# netcdf_proplist is analogous to netcdf_json but, of course, using libdispatch/ncproplist.c and include/ncproplist.h
# Give the recipe for building netcdf_proplist.h. Basically same as for netcdf_json.h
netcdf_proplist.h: ${top_srcdir}/libdispatch/ncproplist.c ${top_srcdir}/include/ncproplist.h ${top_srcdir}/include/ncexternl.h
rm -fr ${srcdir}/netcdf_proplist.h
cat ${srcdir}/ncproplist.h | sed -e 's/NCPROPLIST_H/NETCDF_PROPLIST_H/' >> ${srcdir}/netcdf_proplist.h
echo '#ifdef NETCDF_PROPLIST_H' >> netcdf_proplist.h
sed -e '/ncproplist.h/d' < ${srcdir}/../libdispatch/ncproplist.c >> ${srcdir}/netcdf_proplist.h
echo '#endif /*NETCDF_PROPLIST_H*/' >> ${srcdir}/netcdf_proplist.h
rm -fr ${builddir}/netcdf_proplist.h
cat ${srcdir}/ncproplist.h | sed -e 's/NCPROPLIST_H/NETCDF_PROPLIST_H/' >> ${builddir}/netcdf_proplist.h
echo '#ifdef NETCDF_PROPLIST_H' >> ${builddir}/netcdf_proplist.h
sed -e '/ncproplist.h/d' < ${srcdir}/../libdispatch/ncproplist.c >> ${builddir}/netcdf_proplist.h
echo '#endif /*NETCDF_PROPLIST_H*/' >> ${builddir}/netcdf_proplist.h

0 comments on commit 2eafef9

Please sign in to comment.