nlopt.f: nlopt.h
rm -f $@
- (i=0; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL' $(srcdir)/nlopt.h | tr -d ' =0,' | while read n; do echo " integer $$n"; echo " parameter ($$n=$$i)"; i=`expr $$i + 1`; done; tail -n +`grep -n enum $(srcdir)/nlopt.h |cut -d: -f1 |tail -n 1` $(srcdir)/nlopt.h | grep NLOPT | egrep -v 'EXTERN|DEPRECATED|MINF_MAX' | cut -d, -f1 | tr -d ' ' | perl -pe 's/([A-Za-z0-9_]+)=([-+0-9]+)/ integer \1\n parameter (\1=\2)/') > $@
+ (i=0; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL' $(srcdir)/nlopt.h | tr -d ' =0,' | while read n; do echo " integer $$n"; echo " parameter ($$n=$$i)"; i=`expr $$i + 1`; done; tail -n +`grep -n enum $(srcdir)/nlopt.h |cut -d: -f1 |tail -n 1` $(srcdir)/nlopt.h | grep NLOPT | egrep -v 'EXTERN|DEPRECATED|MINF_MAX' | cut -d, -f1 | tr -d ' ' | perl -pe 's/([A-Za-z0-9_]+)=([-+0-9]+)/ integer \1\n parameter (\1=\2)/') > $(srcdir)/$@
nlopt.hpp: nlopt.h nlopt-in.hpp
rm -f $@
- (n=`grep -n GEN_ENUMS_HERE nlopt-in.hpp | cut -d: -f1`; head -n $$n $(srcdir)/nlopt-in.hpp; echo " enum algorithm {"; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL|NLOPT_NUM_ALGORITHMS' $(srcdir)/nlopt.h | sed 's/NLOPT_//g'; echo " };"; echo " enum result {"; egrep 'NLOPT_[A-Z_]* =' $(srcdir)/nlopt.h | egrep -v 'NLOPT_[LG][DN]' | sed 's/NLOPT_//g'; echo " };"; tail -n +$$n $(srcdir)/nlopt-in.hpp) > $@
+ (n=`grep -n GEN_ENUMS_HERE $(srcdir)/nlopt-in.hpp | cut -d: -f1`; head -n $$n $(srcdir)/nlopt-in.hpp; echo " enum algorithm {"; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL|NLOPT_NUM_ALGORITHMS' $(srcdir)/nlopt.h | sed 's/NLOPT_//g'; echo " };"; echo " enum result {"; egrep 'NLOPT_[A-Z_]* =' $(srcdir)/nlopt.h | egrep -v 'NLOPT_[LG][DN]' | sed 's/NLOPT_//g'; echo " };"; tail -n +$$n $(srcdir)/nlopt-in.hpp) > $(srcdir)/$@
endif
if MAINTAINER_MODE
nlopt-guile.cpp nlopt.scm.in: $(SWIG_SRC) nlopt-guile.i $(HDR)
- swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -guile -scmstub -o $@ nlopt.i
+ swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -guile -scmstub -o $@ $(srcdir)/nlopt.i
rm -f nlopt.scm.in
mv nlopt.scm nlopt.scm.in
nlopt-python.cpp nlopt.py: $(SWIG_SRC) nlopt-python.i numpy.i $(HDR)
- swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -python -o $@ nlopt.i
+ swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -python -o $@ $(srcdir)/nlopt.i
nlopt-enum-renames.i: $(top_srcdir)/api/nlopt.h
(echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL|NLOPT_NUM_ALGORITHMS' $(top_srcdir)/api/nlopt.h | sed 's/NLOPT_//g' |tr -d ' ' |tr '/' ',' |tr '=' ',' |cut -d, -f1 |while read name; do echo "%rename(NLOPT_$$name) nlopt::$$name;"; done; egrep 'NLOPT_[A-Z_]* =' $(top_srcdir)/api/nlopt.h | egrep -v 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL' | sed 's/NLOPT_//g' |tr -d ' ' |cut -d'=' -f1 | while read name; do echo "%rename(NLOPT_$$name) nlopt::$$name;"; done) > $@