Generate dependencies from *mn.hpp files

v0.27.3
Andreas Huggel 22 years ago
parent 370783fdce
commit 16f3871cd8

@ -2,9 +2,14 @@
# Create a module that depends on all MakerNote subclasses to
# force initialisation of static data in the corresponding
# components when using the static library.
cat > mn.cpp <<EOF
#include "canonmn.hpp"
namespace {
Exif::CanonMakerNote canonMakerNote;
}
EOF
rm -f mn.cpp
echo "// Generated by mn.sh on" `date` "- do not edit" > mn.cpp
for file in *mn.hpp; do
echo "#include \""$file"\"" >> mn.cpp
done
echo "namespace {" >> mn.cpp
for file in *mn.hpp; do
class=`grep 'class .*MakerNote.*:' $file | awk '{print $2}'`
echo " Exif::"$class `basename $file .hpp`";" >> mn.cpp
done
echo "}" >> mn.cpp

Loading…
Cancel
Save