Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to preserve .xml #468

Open
mouse07410 opened this issue Feb 27, 2025 · 2 comments
Open

Need to preserve .xml #468

mouse07410 opened this issue Feb 27, 2025 · 2 comments

Comments

@mouse07410
Copy link

Since I could not figure how to tell the build process (make) to leave (not remove) draft in .xml format, I had to apply a silly workaround:

diff --git a/main.mk b/main.mk
index bdf59cb..a39dab7 100644
--- a/main.mk
+++ b/main.mk
@@ -129,6 +129,7 @@ endif
 
 %.txt: %.xml $(DEPS_FILES)
        $(at)$(trace) $@ -s xml2rfc-txt $(xml2rfc) $(XML2RFC_TEXT) $< -o $@
+       cp $< /tmp/$(basename $<).xml
 endif
 
 %.pdf: %.txt

Please either incorporate something like this, or let me know how to prevent the folllowing from happening:

$ make
draft-uri-lamps-pquake: kramdown-rfc ... OK
draft-uri-lamps-pquake: xml2rfc-txt ... OK
draft-uri-lamps-pquake: xml2rfc-html ... OK
rm draft-uri-lamps-pquake.xml

I don't want rm draft-uri-lamps-pquake.xml to execute, but couldn't find where it is happening. :-(

@martinthomson
Copy link
Owner

martinthomson commented Feb 27, 2025

XML documents generally aren't needed. And by default, make discards any intermediate files once it has produced the requested output (by default here, that is the HTML and TXT versions).

The HTTP working group keeps XML around. You do that as follows:

.SECONDARY: $(drafts_xml)

https://github.com/httpwg/http-extensions/blob/2e69a068094688cbe172633e3d028a345e91ca10/Makefile#L29

Any particular reason you need these files? The HTTP drafts run a linting tool that they can avoid running every time if they keep the XML around. So there are good reasons to retain them, but the files aren't good for much. You need version/draft-whatever-NN.xml to submit, for example.

@mouse07410
Copy link
Author

First, my apologies - but I did but understand what I need to do to keep .xml files around.

Second, you got the reason I need them - for submission!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants