On 11/11/10 21:11, Stuart Rackham wrote:
>> On "make install"
>> ^^^^^^^^^^^^^^^^^
>> Without these previous calls (mentioned in INSTALL.txt) make install
>> fails:
>>
>>     # python a2x.py -f manpage doc/asciidoc.1.txt
>>     # python a2x.py -f manpage doc/a2x.1.txt
>>
>> What are the reasons to not integrate this into the Makefile so make
>> install actually depends on them so that they get executed?
>> Would you accept patches for this?
> 
> I don't think there is a reason, please post a patch if you can come up
> with one.

First try on a patch is attached.

Best,




Sebastian

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

exporting patch:
# HG changeset patch
# User Sebastian Pipping <[email protected]>
# Date 1289521784 -3600
# Branch make-install
# Node ID f0307e4e3f398faab4e0aba35a4ccfe2dbca5016
# Parent  38fc611fd125a20a9a6e7c33c5ce17a260ca3fa0
Auto-create man pages in order to fix make install

diff --git a/INSTALL.txt b/INSTALL.txt
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -57,8 +57,6 @@
 $ autoconf
 $ ./configure
 $ make
-$ python a2x.py -f manpage doc/asciidoc.1.txt
-$ python a2x.py -f manpage doc/a2x.1.txt
 $ sudo make install
 ---------------------------------------------
 
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -29,7 +29,7 @@
 
 vimdir = @sysconfdir@/vim
 
-manp = $(wildcard doc/*.1)
+manp = $(patsubst %1.txt,%1,$(wildcard doc/*.1.txt))
 
 conf = $(wildcard *.conf)
 confdir = $(ASCIIDOCCONF)
@@ -99,6 +99,9 @@
 $(DATATARGETS): % : %dir
        $(INSTALL_DATA) $($@) $(DESTDIR)/$($<)/
 
+$(manp): %.1 : %.1.txt
+       python a2x.py -f manpage $<
+
 docs:
        $(INSTALL) -d $(DESTDIR)/$(docdir)
        $(INSTALL_DATA) $(doc) $(DESTDIR)/$(docdir)
@@ -151,7 +154,8 @@
        done
 
 
-build: fixconfpath
+build: fixconfpath $(manp)
+
 
 install: all $(PROGTARGETS) $(DATATARGETS) progsymlink install-vim
 
@@ -165,5 +169,8 @@
        rm -rf $(DESTDIR)/$(confdir)
        rm -rf $(DESTDIR)/$(docdir)
 
+clean:
+       rm -f $(manp)
+
 test:
        @echo "Nothing to see here...Move along."

Reply via email to