diff options
Diffstat (limited to 'src/cgi-bin/Makefile.am')
-rw-r--r-- | src/cgi-bin/Makefile.am | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/cgi-bin/Makefile.am b/src/cgi-bin/Makefile.am index f085e57..aca9137 100644 --- a/src/cgi-bin/Makefile.am +++ b/src/cgi-bin/Makefile.am @@ -11,16 +11,17 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cgidir=@CGIDIR@ -cgi_SCRIPTS=$(EXTRA_DIST:.scm4=.@SCRIPT_SUFFIX@) -EXTRA_DIST=dict.scm4 nea.scm4 conj.scm4 -CLEANFILES=dict.m4 dict.scm nea.scm dict.cgi nea.cgi conj.cgi +cgidir = @CGIDIR@ +CGI_SOURCES = dict.scm4 nea.scm4 conj.scm4 +EXTRA_DIST = $(CGI_SOURCES) +cgi_SCRIPTS = $(CGI_SOURCES:.scm4=.scm) +CLEANFILES = dict.m4 $(cgi_SCRIPTS) dict.m4: Makefile $(AM_V_GEN){ \ echo 'divert(-1)'; \ echo 'changequote([,])'; \ echo 'changecom([;],['; \ @@ -40,21 +41,25 @@ dict.m4: Makefile echo ')dnl'; \ echo '@AUTOGENERATED@'; \ echo 'ifelse(IFACE,[CGI],!#'; \ echo ')dnl'; \ } > dict.m4 -SUFFIXES = .scm4 .scm .cgi +SUFFIXES = .scm4 .scm .scm4.scm: $(AM_V_GEN)m4 dict.m4 $< > $@ -.scm.cgi: - $(AM_V_GEN)cp $< $@ - dict.scm: dict.scm4 dict.m4 nea.scm: nea.scm4 dict.m4 conj.scm: conj.scm4 dict.m4 -dict.cgi: dict.scm -nea.cgi: nea.scm -conj.cgi: conj.scm +install-data-hook: + $(AM_V_GEN)if test @REAL_SCRIPT_SUFFIX@ != .scm; then\ + here=`pwd`; \ + cd $(DESTDIR)$(cgidir); \ + for file in $(cgi_SCRIPTS); do\ + mv $$file $${file%%.scm}@REAL_SCRIPT_SUFFIX@;\ + done;\ + cd $$here;\ + fi + |