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 # Create a module that depends on all MakerNote subclasses to
# force initialisation of static data in the corresponding # force initialisation of static data in the corresponding
# components when using the static library. # components when using the static library.
cat > mn.cpp <<EOF rm -f mn.cpp
#include "canonmn.hpp" echo "// Generated by mn.sh on" `date` "- do not edit" > mn.cpp
namespace { for file in *mn.hpp; do
Exif::CanonMakerNote canonMakerNote; echo "#include \""$file"\"" >> mn.cpp
} done
EOF 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