summaryrefslogtreecommitdiffabout
path: root/src/cgi-bin/Makefile.am
Side-by-side diff
Diffstat (limited to 'src/cgi-bin/Makefile.am') (more/less context) (ignore whitespace changes)
-rw-r--r--src/cgi-bin/Makefile.am27
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
@@ -14,10 +14,11 @@
# 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){ \
@@ -43,18 +44,22 @@ dict.m4: Makefile
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
+

Return to:

Send suggestions and report system problems to the System administrator.