Commit f532471b authored by Russ Allbery's avatar Russ Allbery
Browse files

Clean up generation of Perl scripts

Use @PERL@ as the substitution variable instead of WALLET_PERL_PATH
to match normal Automake conventions.  Write the scripts into the
build path, not the source path, to work properly with out-of-tree
builds.  Clean up the distribution rules.  Use separate Makefile rules
for each script so that make has proper dependencies.

Also fix the Perl paths in (some of) the test scripts, although there
are others for which this still isn't going to work.
parent 4abe4ae9
......@@ -22,6 +22,10 @@
/perl/t/data/test.krbtype
/perl/t/lib/Test/RRA.pm
/perl/t/lib/Test/RRA/
/server/keytab-backend
/server/wallet-admin
/server/wallet-backend
/server/wallet-report
/tests/client/basic-t
/tests/client/full-t
/tests/client/prompt-t
......
......@@ -100,34 +100,36 @@ PERL_DIRECTORIES = perl perl/lib perl/lib/Wallet perl/lib/Wallet/ACL \
perl/t/policy perl/t/style perl/t/util perl/t/verifier
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = .gitignore .travis.yml LICENSE autogen client/wallet.pod \
client/wallet-rekey.pod config/allow-extract config/keytab \
config/keytab.acl config/wallet config/wallet-report.acl \
docs/design contrib/README contrib/commerzbank/wallet-history \
contrib/convert-srvtab-db contrib/used-principals \
contrib/wallet-contacts contrib/wallet-rekey-periodic \
contrib/wallet-rekey-periodic.8 contrib/wallet-summary \
contrib/wallet-summary.8 contrib/wallet-unknown-hosts \
contrib/wallet-unknown-hosts.8 docs/design-acl docs/design-api \
docs/netdb-role-api docs/notes docs/objects-and-schemes docs/setup \
docs/stanford-naming examples/stanford.conf tests/HOWTO tests/TESTS \
tests/config/README tests/data/allow-extract tests/data/basic.conf \
tests/data/cmd-fake tests/data/cmd-wrapper tests/data/fake-data \
tests/data/fake-kadmin tests/data/fake-keytab \
tests/data/fake-keytab-2 tests/data/fake-keytab-foreign \
tests/data/fake-keytab-merge tests/data/fake-keytab-old \
tests/data/fake-keytab-partial \
tests/data/fake-keytab-partial-result tests/data/fake-keytab-rekey \
tests/data/fake-keytab-unknown tests/data/fake-srvtab \
tests/data/full.conf tests/data/perl.conf tests/data/wallet.conf \
tests/docs/pod-spelling-t tests/docs/pod-t \
tests/perl/minimum-version-t tests/perl/module-version-t \
tests/perl/strict-t tests/server/admin-t tests/server/backend-t \
tests/server/keytab-t tests/server/report-t tests/tap/kerberos.sh \
tests/tap/libtap.sh tests/tap/perl/Test/RRA.pm \
tests/tap/perl/Test/RRA/Automake.pm \
tests/tap/perl/Test/RRA/Config.pm \
tests/tap/perl/Test/RRA/ModuleVersion.pm tests/tap/remctl.sh \
EXTRA_DIST = .gitignore .travis.yml LICENSE autogen client/wallet.pod \
client/wallet-rekey.pod config/allow-extract config/keytab \
config/keytab.acl config/wallet config/wallet-report.acl \
docs/design contrib/README contrib/commerzbank/wallet-history \
contrib/convert-srvtab-db contrib/used-principals \
contrib/wallet-contacts contrib/wallet-rekey-periodic \
contrib/wallet-rekey-periodic.8 contrib/wallet-summary \
contrib/wallet-summary.8 contrib/wallet-unknown-hosts \
contrib/wallet-unknown-hosts.8 docs/design-acl docs/design-api \
docs/netdb-role-api docs/notes docs/objects-and-schemes docs/setup \
docs/stanford-naming examples/stanford.conf \
server/keytab-backend.in server/wallet-admin.in \
server/wallet-backend.in server/wallet-report.in tests/HOWTO \
tests/TESTS tests/config/README tests/data/allow-extract \
tests/data/basic.conf tests/data/cmd-fake tests/data/cmd-wrapper \
tests/data/fake-data tests/data/fake-kadmin tests/data/fake-keytab \
tests/data/fake-keytab-2 tests/data/fake-keytab-foreign \
tests/data/fake-keytab-merge tests/data/fake-keytab-old \
tests/data/fake-keytab-partial \
tests/data/fake-keytab-partial-result tests/data/fake-keytab-rekey \
tests/data/fake-keytab-unknown tests/data/fake-srvtab \
tests/data/full.conf tests/data/perl.conf tests/data/wallet.conf \
tests/docs/pod-spelling-t tests/docs/pod-t \
tests/perl/minimum-version-t tests/perl/module-version-t \
tests/perl/strict-t tests/server/admin-t tests/server/backend-t \
tests/server/keytab-t tests/server/report-t tests/tap/kerberos.sh \
tests/tap/libtap.sh tests/tap/perl/Test/RRA.pm \
tests/tap/perl/Test/RRA/Automake.pm \
tests/tap/perl/Test/RRA/Config.pm \
tests/tap/perl/Test/RRA/ModuleVersion.pm tests/tap/remctl.sh \
tests/util/xmalloc-t $(PERL_FILES)
# Supporting convenience libraries used by other targets.
......@@ -150,7 +152,7 @@ client_libwallet_a_CPPFLAGS = $(REMCTL_CPPFLAGS) $(KRB5_CPPFLAGS)
# The client and server programs.
bin_PROGRAMS = client/wallet client/wallet-rekey
dist_sbin_SCRIPTS = server/keytab-backend server/wallet-admin \
sbin_SCRIPTS = server/keytab-backend server/wallet-admin \
server/wallet-backend server/wallet-report
client_wallet_CPPFLAGS = $(REMCTL_CPPFLAGS) $(KRB5_CPPFLAGS)
client_wallet_LDFLAGS = $(REMCTL_LDFLAGS) $(KRB5_LDFLAGS)
......@@ -209,19 +211,29 @@ warnings:
KRB5_CPPFLAGS='$(KRB5_CPPFLAGS_GCC)' $(check_PROGRAMS)
# Remove some additional files.
CLEANFILES = perl/t/lib/Test/RRA.pm perl/t/lib/Test/RRA/Automake.pm \
perl/t/lib/Test/RRA/Config.pm $(dist_sbin_SCRIPTS)
CLEANFILES = perl/t/lib/Test/RRA.pm perl/t/lib/Test/RRA/Automake.pm \
perl/t/lib/Test/RRA/Config.pm server/keytab-backend \
server/wallet-admin server/wallet-backend server/wallet-report
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \
build-aux/depcomp build-aux/install-sh build-aux/missing \
client/wallet.1 config.h.in config.h.in~ configure \
contrib/wallet-report.8 server/keytab-backend.8 \
server/wallet-admin.8 server/wallet-backend.8 server/wallet-report.8
# For each of the perl scripts in server/, we need to fill in the path to the
# Perl binary that was located during configuration.
$(dist_sbin_SCRIPTS):
sed 's|WALLET_PERL_PATH|$(PERL)|' < $(srcdir)/$@.in > $(srcdir)/$@
chmod a+x $(srcdir)/$@
# For each of the Perl scripts, we need to fill in the path to the Perl
# binary that was located during configuration.
server/keytab-backend: $(srcdir)/server/keytab-backend.in Makefile
sed 's|@PERL@|$(PERL)|' <$(srcdir)/server/keytab-backend.in >$@
chmod a+x $@
server/wallet-admin: $(srcdir)/server/wallet-admin.in Makefile
sed 's|@PERL@|$(PERL)|' <$(srcdir)/server/wallet-admin.in >$@
chmod a+x $@
server/wallet-backend: $(srcdir)/server/wallet-backend.in Makefile
sed 's|@PERL@|$(PERL)|' <$(srcdir)/server/wallet-backend.in >$@
chmod a+x $@
server/wallet-report: $(srcdir)/server/wallet-report.in Makefile
sed 's|@PERL@|$(PERL)|' <$(srcdir)/server/wallet-report.in >$@
chmod a+x $@
# Take appropriate actions in the Perl directory as well. We don't want to
# always build the Perl directory in all-local, since otherwise Automake does
......
......@@ -98,6 +98,7 @@ AC_CONFIG_FILES([tests/client/basic-t], [chmod +x tests/client/basic-t])
AC_CONFIG_FILES([tests/client/full-t], [chmod +x tests/client/full-t])
AC_CONFIG_FILES([tests/client/prompt-t], [chmod +x tests/client/prompt-t])
AC_CONFIG_FILES([tests/client/rekey-t], [chmod +x tests/client/rekey-t])
AC_CONFIG_COMMANDS([server], [test -d server || mkdir server])
AC_CONFIG_COMMANDS([tests/config],
[test -d tests/config || mkdir tests/config])
AC_OUTPUT
#!WALLET_PERL_PATH
#!@PERL@
# -*- perl -*-
#
# Extract keytabs from the KDC without changing the key.
#
......
#!WALLET_PERL_PATH
#!@PERL@
# -*- perl -*-
#
# Wallet server administrative commands.
......
#!WALLET_PERL_PATH
#!@PERL@
# -*- perl -*-
#
# Wallet server for storing and retrieving secure data.
......
#!WALLET_PERL_PATH
#!@PERL@
# -*- perl -*-
#
# Wallet server reporting interface.
......
#!/usr/bin/perl
#!@PERL@
# -*- perl -*-
#
# End-to-end tests for the wallet client.
#
......
#!/usr/bin/perl
#!@PERL@
# -*- perl -*-
#
# Password prompting tests for the wallet client.
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment