From 5df277ec9fbc603d9488b9181c5cda0fd6fbb883 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 10 Apr 2016 21:19:44 -0700 Subject: [PATCH] plugin Makefile.ams (dist): Add missing files to EXTRA_DIST. Fix ./fix-tags.sh to take the package name as an argument, to support building the dist in strangely named directories like mit-scheme- blowfish-0.1/. Add a missing dependency of stamp-scheme on the .pkg file. --- src/blowfish/Makefile.am | 11 +++++++---- src/blowfish/tags-fix.sh | 7 +++---- src/gdbm/Makefile.am | 11 +++++++---- src/gdbm/tags-fix.sh | 7 +++---- src/mcrypt/Makefile.am | 11 +++++++---- src/mcrypt/tags-fix.sh | 7 +++---- src/md5/Makefile.am | 11 +++++++---- src/md5/tags-fix.sh | 7 +++---- src/mhash/Makefile.am | 11 +++++++---- src/mhash/tags-fix.sh | 7 +++---- 10 files changed, 50 insertions(+), 40 deletions(-) diff --git a/src/blowfish/Makefile.am b/src/blowfish/Makefile.am index 0fa9c837f..a210eb74b 100644 --- a/src/blowfish/Makefile.am +++ b/src/blowfish/Makefile.am @@ -73,7 +73,7 @@ blowfish.bin: stamp-scheme blowfish.bci: stamp-scheme blowfish.com: stamp-scheme blowfish-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme -stamp-scheme: stamp-shim $(sources) +stamp-scheme: stamp-shim $(sources) blowfish.pkg touch stamp-scheme echo '(load "compile.scm")' \ | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode \ @@ -86,13 +86,16 @@ TESTS = blowfish-check.sh CLEANFILES += test tags: tags-am - ./tags-fix.sh + ./tags-fix.sh blowfish -all_sources = $(sources) -all_sources += blowfish-check.scm blowfish-adapter.c blowfish-shim.h +all_sources = $(sources) compile.scm make.scm +all_sources += blowfish-check.scm blowfish-adapter.c blowfish-check.sh ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) blowfish.pkg TAGS_DEPENDENCIES = $(all_sources) $(cdecls) blowfish.pkg +EXTRA_DIST += $(all_sources) $(cdecls) blowfish.pkg +EXTRA_DIST += optiondb.scm tags-fix.sh + install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ | $(MIT_SCHEME_EXE) --batch-mode diff --git a/src/blowfish/tags-fix.sh b/src/blowfish/tags-fix.sh index ae5d023e6..c2823ad7f 100755 --- a/src/blowfish/tags-fix.sh +++ b/src/blowfish/tags-fix.sh @@ -1,13 +1,12 @@ #!/bin/sh # -*-Scheme-*- # -# Chop the generated -shim.c and -const.c files out of TAGS. +# Chop the generated $1-shim.c and $1-const.c files out of TAGS. set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF -(let ((name (pathname-name - (directory-pathname-as-file (working-directory-pathname))))) +${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF +(let ((name (car (command-line)))) (let ((shim.c-prefix (string-append name "-shim.c,")) (const.c-prefix (string-append name "-const.c,"))) diff --git a/src/gdbm/Makefile.am b/src/gdbm/Makefile.am index f8916e01a..70bb0fb04 100644 --- a/src/gdbm/Makefile.am +++ b/src/gdbm/Makefile.am @@ -73,7 +73,7 @@ gdbm.bin: stamp-scheme gdbm.bci: stamp-scheme gdbm.com: stamp-scheme gdbm-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme -stamp-scheme: stamp-shim $(sources) +stamp-scheme: stamp-shim $(sources) gdbm.pkg touch stamp-scheme echo '(load "compile.scm")' \ | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode \ @@ -86,13 +86,16 @@ TESTS = gdbm-check.sh CLEANFILES += gdbm-check.db tags: tags-am - ./tags-fix.sh + ./tags-fix.sh gdbm -all_sources = $(sources) -all_sources += gdbm-check.scm gdbm-adapter.c gdbm-shim.h +all_sources = $(sources) compile.scm make.scm +all_sources += gdbm-check.scm gdbm-adapter.c gdbm-check.sh ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) gdbm.pkg TAGS_DEPENDENCIES = $(all_sources) $(cdecls) gdbm.pkg +EXTRA_DIST += $(all_sources) $(cdecls) gdbm.pkg +EXTRA_DIST += optiondb.scm tags-fix.sh + install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ | $(MIT_SCHEME_EXE) --batch-mode diff --git a/src/gdbm/tags-fix.sh b/src/gdbm/tags-fix.sh index ae5d023e6..c2823ad7f 100755 --- a/src/gdbm/tags-fix.sh +++ b/src/gdbm/tags-fix.sh @@ -1,13 +1,12 @@ #!/bin/sh # -*-Scheme-*- # -# Chop the generated -shim.c and -const.c files out of TAGS. +# Chop the generated $1-shim.c and $1-const.c files out of TAGS. set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF -(let ((name (pathname-name - (directory-pathname-as-file (working-directory-pathname))))) +${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF +(let ((name (car (command-line)))) (let ((shim.c-prefix (string-append name "-shim.c,")) (const.c-prefix (string-append name "-const.c,"))) diff --git a/src/mcrypt/Makefile.am b/src/mcrypt/Makefile.am index c3675d449..d456a7808 100644 --- a/src/mcrypt/Makefile.am +++ b/src/mcrypt/Makefile.am @@ -73,7 +73,7 @@ mcrypt.bin: stamp-scheme mcrypt.bci: stamp-scheme mcrypt.com: stamp-scheme mcrypt-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme -stamp-scheme: stamp-shim $(sources) +stamp-scheme: stamp-shim $(sources) mcrypt.pkg touch stamp-scheme echo '(load "compile.scm")' \ | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode \ @@ -86,13 +86,16 @@ TESTS = mcrypt-check.sh CLEANFILES += encrypted decrypted tags: tags-am - ./tags-fix.sh + ./tags-fix.sh mcrypt -all_sources = $(sources) -all_sources += mcrypt-check.scm mcrypt-adapter.c mcrypt-shim.h +all_sources = $(sources) compile.scm make.scm +all_sources += mcrypt-check.scm mcrypt-adapter.c mcrypt-check.sh ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) mcrypt.pkg TAGS_DEPENDENCIES = $(all_sources) $(cdecls) mcrypt.pkg +EXTRA_DIST += $(all_sources) $(cdecls) mcrypt.pkg +EXTRA_DIST += optiondb.scm tags-fix.sh + install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ | $(MIT_SCHEME_EXE) --batch-mode diff --git a/src/mcrypt/tags-fix.sh b/src/mcrypt/tags-fix.sh index ae5d023e6..c2823ad7f 100755 --- a/src/mcrypt/tags-fix.sh +++ b/src/mcrypt/tags-fix.sh @@ -1,13 +1,12 @@ #!/bin/sh # -*-Scheme-*- # -# Chop the generated -shim.c and -const.c files out of TAGS. +# Chop the generated $1-shim.c and $1-const.c files out of TAGS. set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF -(let ((name (pathname-name - (directory-pathname-as-file (working-directory-pathname))))) +${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF +(let ((name (car (command-line)))) (let ((shim.c-prefix (string-append name "-shim.c,")) (const.c-prefix (string-append name "-const.c,"))) diff --git a/src/md5/Makefile.am b/src/md5/Makefile.am index 506286460..3bab01b1a 100644 --- a/src/md5/Makefile.am +++ b/src/md5/Makefile.am @@ -73,7 +73,7 @@ md5.bin: stamp-scheme md5.bci: stamp-scheme md5.com: stamp-scheme md5-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme -stamp-scheme: stamp-shim $(sources) +stamp-scheme: stamp-shim $(sources) md5.pkg touch stamp-scheme echo '(load "compile.scm")' \ | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode \ @@ -86,13 +86,16 @@ TESTS = md5-check.sh CLEANFILES += sample tags: tags-am - ./tags-fix.sh + ./tags-fix.sh md5 -all_sources = $(sources) -all_sources += md5-check.scm md5-adapter.c md5-shim.h +all_sources = $(sources) compile.scm make.scm +all_sources += md5-check.scm md5-adapter.c md5-check.sh ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) md5.pkg TAGS_DEPENDENCIES = $(all_sources) $(cdecls) md5.pkg +EXTRA_DIST += $(all_sources) $(cdecls) md5.pkg +EXTRA_DIST += optiondb.scm tags-fix.sh + install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ | $(MIT_SCHEME_EXE) --batch-mode diff --git a/src/md5/tags-fix.sh b/src/md5/tags-fix.sh index ae5d023e6..c2823ad7f 100755 --- a/src/md5/tags-fix.sh +++ b/src/md5/tags-fix.sh @@ -1,13 +1,12 @@ #!/bin/sh # -*-Scheme-*- # -# Chop the generated -shim.c and -const.c files out of TAGS. +# Chop the generated $1-shim.c and $1-const.c files out of TAGS. set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF -(let ((name (pathname-name - (directory-pathname-as-file (working-directory-pathname))))) +${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF +(let ((name (car (command-line)))) (let ((shim.c-prefix (string-append name "-shim.c,")) (const.c-prefix (string-append name "-const.c,"))) diff --git a/src/mhash/Makefile.am b/src/mhash/Makefile.am index 2d436639f..915e0e2d8 100644 --- a/src/mhash/Makefile.am +++ b/src/mhash/Makefile.am @@ -73,7 +73,7 @@ mhash.bin: stamp-scheme mhash.bci: stamp-scheme mhash.com: stamp-scheme mhash-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme -stamp-scheme: stamp-shim $(sources) +stamp-scheme: stamp-shim $(sources) mhash.pkg touch stamp-scheme echo '(load "compile.scm")' \ | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode \ @@ -86,13 +86,16 @@ TESTS = mhash-check.sh CLEANFILES += sample tags: tags-am - ./tags-fix.sh + ./tags-fix.sh mhash -all_sources = $(sources) -all_sources += mhash-check.scm mhash-adapter.c mhash-shim.h +all_sources = $(sources) compile.scm make.scm +all_sources += mhash-check.scm mhash-adapter.c mhash-check.sh ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) mhash.pkg TAGS_DEPENDENCIES = $(all_sources) $(cdecls) mhash.pkg +EXTRA_DIST += $(all_sources) $(cdecls) mhash.pkg +EXTRA_DIST += optiondb.scm tags-fix.sh + install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ | $(MIT_SCHEME_EXE) --batch-mode diff --git a/src/mhash/tags-fix.sh b/src/mhash/tags-fix.sh index ae5d023e6..c2823ad7f 100755 --- a/src/mhash/tags-fix.sh +++ b/src/mhash/tags-fix.sh @@ -1,13 +1,12 @@ #!/bin/sh # -*-Scheme-*- # -# Chop the generated -shim.c and -const.c files out of TAGS. +# Chop the generated $1-shim.c and $1-const.c files out of TAGS. set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF -(let ((name (pathname-name - (directory-pathname-as-file (working-directory-pathname))))) +${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF +(let ((name (car (command-line)))) (let ((shim.c-prefix (string-append name "-shim.c,")) (const.c-prefix (string-append name "-const.c,"))) -- 2.25.1