From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Dmitry Alexandrov <dag@gnui.org>,
"Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: guile-user@gnu.org
Subject: Re: Starting a GNU Guile awesome list
Date: Sat, 10 Oct 2020 14:31:49 +0200 [thread overview]
Message-ID: <ed994563-a407-5152-f31a-ec1d0c48d50e@posteo.de> (raw)
In-Reply-To: <a6zzq21v.dag@gnui.org>
Hello Dmitry!
I know this is kind of a late reply. I hope you do not mind me
unearthing this. : )
On 7/16/20 10:47 AM, Dmitry Alexandrov wrote:
> "Dr. Arne Babenhauserheide" <arne_bab@web.de> wrote:
>>>> In the case you will stick with Org, there at least should be a runnable build recipe (i. e. a Makefile).
>> I’d like to cut this discussion short:
>>
>> https://notabug.org/ZelphirKaltstahl/awesome-guile/pulls/1/files
>> all: readme.md readme.texi readme.html
>> .INTERMEDIATE: .exported
>> readme.md readme.texi readme.html: .exported
>> .exported: readme.org
>> HOME=$$(dirname $$(realpath "$<")) emacs -Q --batch "$<" --exec "(require 'ox-md)" -f org-md-export-to-markdown -f org-html-export-to-html -f org-texinfo-export-to-texinfo -f kill-emacs
> Alternatively, without reliance on implicit behaviour (setting HOME in order to get an expected filename??):
>
> #!/usr/bin/make -f
>
> SHELL := emacs
> .SHELLFLAGS := --quick --batch --eval
>
> orgs := $(wildcard *.org)
> objs := $(orgs:.org=.md) $(orgs:.org=.texi)
>
> .PHONY: all
> all: $(objs)
>
> .ONESHELL:
> %.md %.texi: %.org
> (with-temp-buffer
> (require 'ox-md)
> (require 'ox-texinfo)
> (when (insert-file-contents "$<")
> (org-mode)
> (org-export-to-file 'md "$*.md")
> (org-export-to-file 'texinfo "$*.texi")))
I'm not that proficient at GNU Make yet. I would like to add a way to
cleanup created md and texi files, so that, when I run `make` again, it
creates all files anew.
So I thought I could simply add a `make clean` as follows:
~~~~
.PHONY: clean
clean:
/bin/rm --verbose *.html *.md *.texi || true;
~~~~
But then I would hardcode the location of `rm` and also it does not work:
~~~~
/bin/rm --verbose *.html *.md *.texi || true;
Symbol’s value as variable is void: /bin/rm
make: *** [Makefile:17: clean] Error 255
~~~~
I think this is, because we have `#!/usr/bin/make -f` at the top, so it
does not know what `/bin/rm/` is. How would you write the makefile to
either add a `make clean` step, or alternatively modify it so that
running `make` will always create the other formats anew?
Regards,
Zelphir
next prev parent reply other threads:[~2020-10-10 12:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 21:19 Starting a GNU Guile awesome list Zelphir Kaltstahl
2020-07-13 21:56 ` Jack Hill
2020-07-13 22:56 ` Aleix Conchillo Flaqué
2020-07-14 23:26 ` Zelphir Kaltstahl
2020-07-14 9:00 ` Dmitry Alexandrov
2020-07-14 21:23 ` Zelphir Kaltstahl
2020-07-15 6:32 ` Dr. Arne Babenhauserheide
2020-07-16 8:47 ` Dmitry Alexandrov
2020-07-16 19:01 ` Dr. Arne Babenhauserheide
2020-10-10 12:31 ` Zelphir Kaltstahl [this message]
2020-10-10 13:14 ` Matt Wette
2020-10-11 0:57 ` Zelphir Kaltstahl
2020-10-11 19:51 ` Ricardo Wurmus
2020-10-11 23:39 ` Zelphir Kaltstahl
2020-10-12 10:33 ` Ricardo Wurmus
2020-11-08 17:09 ` Zelphir Kaltstahl
2020-11-08 18:55 ` Paul Smith
2020-12-05 18:15 ` Zelphir Kaltstahl
2020-07-15 6:36 ` Dr. Arne Babenhauserheide
2020-07-15 21:14 ` Zelphir Kaltstahl
2020-07-15 22:40 ` Dr. Arne Babenhauserheide
2020-07-16 9:18 ` A licence for an ‘awesome list’ (was: Starting a GNU Guile awesome list) Dmitry Alexandrov
2020-07-16 18:56 ` Dr. Arne Babenhauserheide
2020-07-16 18:58 ` Dr. Arne Babenhauserheide
2020-07-16 20:47 ` Zelphir Kaltstahl
2020-07-16 22:55 ` Vladimir Zhbanov
2020-07-16 23:05 ` Vladimir Zhbanov
2020-07-17 0:20 ` John Cowan
2020-07-17 6:43 ` Dr. Arne Babenhauserheide
2020-07-14 14:14 ` Starting a GNU Guile awesome list Dr. Arne Babenhauserheide
2020-07-15 21:24 ` Zelphir Kaltstahl
2020-07-15 22:29 ` Dr. Arne Babenhauserheide
2020-07-14 16:37 ` Taylan Kammer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed994563-a407-5152-f31a-ec1d0c48d50e@posteo.de \
--to=zelphirkaltstahl@posteo.de \
--cc=arne_bab@web.de \
--cc=dag@gnui.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).