Selaa lähdekoodia

build: Rename perl scripts to have a .pl extension

This allows to easily replace the shebang at installation time to use
the system perl interpreter and will make it easier to analyze all
perl scripts in the source tree.
Guillem Jover 11 vuotta sitten
vanhempi
commit
96ff574ed0

+ 2 - 2
Makefile.am

@@ -34,7 +34,7 @@ EXTRA_DIST = \
 	doc/README.feature-removal-schedule \
 	doc/coding-style.txt \
 	doc/frontend.txt \
-	doc/lcov-inject \
+	doc/lcov-inject.pl \
 	doc/triggers.txt \
 	debian/changelog \
 	debian/compat \
@@ -98,7 +98,7 @@ LCOV_CAPTURE_OPTS = $(LCOV_OPTS) --no-recursion \
 	-d $(top_builddir)/lib/dpkg \
 	-d $(top_builddir)/src \
 	-d $(top_builddir)/utils
-LCOV_INJECT = $(PERL) -i $(top_srcdir)/doc/lcov-inject
+LCOV_INJECT = $(PERL) -i $(top_srcdir)/doc/lcov-inject.pl
 
 coverage: all
 	: # Remove coverage data from any previous run

+ 1 - 1
doc/lcov-inject

@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# lcov-inject
+# lcov-inject.pl
 #
 # Copyright © 2014 Guillem Jover <guillem@debian.org>
 #

+ 23 - 4
dselect/methods/Makefile.am

@@ -18,6 +18,12 @@ nobase_dist_methods_DATA = \
 	multicd/desc.multi_mount \
 	multicd/desc.multi_nfs
 
+nobase_methods_SCRIPTS = \
+	ftp/setup \
+	ftp/update \
+	ftp/install \
+	$(nil)
+
 nobase_dist_methods_SCRIPTS = \
 	disk/setup \
 	disk/update \
@@ -25,9 +31,6 @@ nobase_dist_methods_SCRIPTS = \
 	floppy/setup \
 	floppy/update \
 	floppy/install \
-	ftp/setup \
-	ftp/update \
-	ftp/install \
 	multicd/setup \
 	multicd/update \
 	multicd/install
@@ -35,7 +38,23 @@ nobase_dist_methods_SCRIPTS = \
 perllibdir = $(PERL_LIBDIR)
 nobase_dist_perllib_DATA = Dselect/Ftp.pm
 
-EXTRA_DIST = multicd/README.multicd
+EXTRA_DIST = \
+	ftp/setup.pl \
+	ftp/update.pl \
+	ftp/install.pl \
+	multicd/README.multicd
+
+CLEANFILES = \
+	$(nobase_methods_SCRIPTS) \
+	$(nil)
+
+do_perl_subst = $(AM_V_GEN) \
+	sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):"
+
+%: %.pl Makefile
+	@test -d `dirname $@` || $(MKDIR_P) `dirname $@`
+	$(do_perl_subst) <$< >$@
+	$(AM_V_at) chmod +x $@
 
 install-data-local:
 	$(MKDIR_P) $(DESTDIR)$(admindir)/methods/mnt

+ 3 - 0
dselect/methods/ftp/.gitignore

@@ -0,0 +1,3 @@
+install
+setup
+update

dselect/methods/ftp/install → dselect/methods/ftp/install.pl


dselect/methods/ftp/setup → dselect/methods/ftp/setup.pl


dselect/methods/ftp/update → dselect/methods/ftp/update.pl