Hi Ricardo! On 10/11/20 9:51 PM, Ricardo Wurmus wrote: > Zelphir Kaltstahl <[email protected]> writes: > >> Hello Matt, >> >> On 10/10/20 3:14 PM, Matt Wette wrote: >>> >>> On 10/10/20 5:31 AM, Zelphir Kaltstahl wrote: >>>>> #!/usr/bin/make -f >>>>> >>>>> SHELL := emacs >>>>> .SHELLFLAGS := --quick --batch --eval >>>>> >>>>> >>> Maybe try this: >>> >>> #!/usr/bin/make -f - >>> >>> with the added dash. >> This does not seem to change anything: >> >> ~~~~ >> #!/usr/bin/make -f - >> >> # use emacs as a shell, so that we can write emacs lisp code in here >> SHELL := emacs >> # set some flags for emacs >> .SHELLFLAGS := --quick --batch --eval >> >> # all org mode files will be converted >> # orgs := $(wildcard *.org) >> # only the list.org file will be converted >> orgs := list.org >> objs := $(orgs:.org=.md) $(orgs:.org=.texi) $(orgs:.org=.html) >> >> .PHONY: all >> all: $(objs) >> >> .PHONY: clean >> clean: >> /bin/rm --verbose *.html *.md *.texi || true; >> >> # in here comes the shell specific code >> .ONESHELL: >> %.html %.md %.texi: %.org >> (with-temp-buffer >> (require 'ox-md) >> (require 'ox-texinfo) >> (require 'ox-html) >> (when (insert-file-contents "$<") >> (org-mode) >> (org-export-to-file 'md "$*.md") >> (org-export-to-file 'texinfo "$*.texi") >> (org-export-to-file 'html "$*.html"))) >> ~~~~ >> >> ~~~~ >> $ make clean >> /bin/rm --verbose *.html *.md *.texi || true; >> Symbol’s value as variable is void: /bin/rm >> make: *** [Makefile:19: clean] Error 255 >> ~~~~ > Well, isn’t that expected as you’re using Emacs as a shell?
Yes : ) But that is the problem: How can I add a clean step, even though I am using Emacs as shell? Or can I switch shell for one command? I realize this might be not the correct user list to ask these questions. If so, I am sorry for the confusion! Best regards, Zelphir -- repositories: https://notabug.org/ZelphirKaltstahl
