diff options
author | Russ Allbery <eagle@eyrie.org> | 2016-01-23 15:17:49 -0800 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2016-01-23 15:21:55 -0800 |
commit | f532471b897dfb426890cd96b77f0f44e36c061d (patch) | |
tree | 4334d349cbd303baf6e8946215b0b7bc91d07e10 /Makefile.am | |
parent | 4abe4ae9b4149a5eb8a30a6e7b1070ff97d69021 (diff) |
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.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 84 |
1 files changed, 48 insertions, 36 deletions
diff --git a/Makefile.am b/Makefile.am index 3e76885..d05039b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 |