in reply to Distributing non-Perl script in a Perl distribution?
Replies are listed 'Best First'. | |
---|---|
Re^2: Distributing non-Perl script in a Perl distribution?
by perlancar (Hermit) on Aug 07, 2015 at 22:52 UTC | |
Yup, I was talking about a CPAN distribution, and installing a shell script (or Python script, or some other non-Perl script) via MakeMaker. I'm wondering a quick-hack solution of adding Makefile parameters/targets like this: SHELL_EXE_FILES = bin-sh/somescript PYTHON_EXE_FILES = bin-py/somescript2 $(INST_SCRIPT)/somescript :: bin-sh/somescript ... $(NOECHO) $(RM_F) $(INST_SCRIPT)/somescript $(CP) bin-sh/somescript $(INST_SCRIPT)/somescript $(FIXIN) bin-sh/somescript $(INST_SCRIPT)/somescript -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_SCRIPT)/somescript $(INST_SCRIPT)/somescript2 :: bin-py/somescript2 ... $(NOECHO) $(RM_F) $(INST_SCRIPT)/somescript2 $(CP) bin-py/somescript2 $(INST_SCRIPT)/somescript2 $(FIXIN) bin-py/somescript2 $(INST_SCRIPT)/somescript2 -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_SCRIPT)/somescript2 The non-Perl scripts will be installed like Perl scripts, except they won't get a manpage (or they could, if we put a POD either inside the script or somewhere else, inside the script if the language supports something equivalent to Perl's __END__), and in the fixin step the appropriate shebang will be chosen. | [reply] |
by Anonymous Monk on Aug 08, 2015 at 00:27 UTC | |
See https://metacpan.org/pod/ExtUtils::MakeMaker#EXE_FILES and PL_FILES
| [reply] [d/l] |