[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-docteam] Merging with packages/Makefiles?
From: |
Luca - De Whiskey's - De Vitis |
Subject: |
[Phpgroupware-docteam] Merging with packages/Makefiles? |
Date: |
Sat, 29 Jun 2002 22:53:54 +0200 |
User-agent: |
Mutt/1.4i |
Hi, what about merging all the Makefile with the packages/Makefile?
When i created it i didn't noticed the various Makefiles around the
phpgroupware/doc/sgml directory, so i did a target to compile any sgml
document: now i see the documentation structure, and i think tha we can
improove it a bit.
My proposal is simple: for all the sgml documents, we may move all the sgml
documents into a directory named as the master documet, and then rename it
into index.sgml; in this way i can find the right document into the source
tree, compile it and, guessing it's name from the directory name, move it in
the right place. For example, now we have:
admin/
|-- addressbook.sgml
|-- calendar.sgml
|-- email.sgml
|-- filemanager.sgml
|-- general.sgml
|-- installation.sgml
|-- introduction.sgml
|-- notes.sgml
|-- performance.sgml
|-- phpGroupWare-Admin-Manual.sgml
|-- project.sgml
|-- security.sgml
|-- todo.sgml
`-- upgrading.sgml
If we move all as:
phpGroupWare-Admin-Manual
|-- addressbook.sgml
|-- calendar.sgml
|-- email.sgml
|-- filemanager.sgml
|-- general.sgml
|-- index.sgml
|-- installation.sgml
|-- introduction.sgml
|-- notes.sgml
|-- performance.sgml
|-- project.sgml
|-- security.sgml
|-- todo.sgml
`-- upgrading.sgml
With a find, dirname and basename command we can do anything for all the
documentation. A simple command like the following will do all:
find -type f -name index.sgml | while read file ; do \
for backend in ps html txt ; do \
sgmltools -b $$backend $$file ;\
done; \
doc=$$(basename $$(dirname $$file));\
install -D --mode=644 $$(dirname $$file)/index.txt $(INSTDIR)/$$doc.txt
;\
install -D --mode=644 $$(dirname $$file)/index.ps
$(INSTDIR)/ps/$$doc.ps ;\
install -d --mode=755 $(INSTDIR)/html/$$doc/ ;\
for html in $$(dirname $$file)/index/* ; do \
tidy -i -clean < $$html > $(INSTDIR)/html/$$doc/$$(basename
$$html) ;\
done ;\
done
Having such a structure, will let any one do his sgml document and a single
make target to compile anithing.
If you let me go on, i can do all the chenges in less than an hour.
--
Luca - De Whiskey's - De Vitis | Elegant or ugly code as well
aliases: Luca ^De [A-Z][A-Za-z\-]*[iy]'\?s$ | as fine or rude sentences have
Luca, a wannabe ``Good guy''. | something in common: they
local LANG="address@hidden" | don't depend on the language.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-docteam] Merging with packages/Makefiles?,
Luca - De Whiskey's - De Vitis <=