Update tde_add_project_* macros #72
Merged
SlavekB
merged 2 commits from rfc/docs_translations_macros
into master
3 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'rfc/docs_translations_macros'
Deleting a branch is permanent. It CANNOT be undone. Continue?
For the use of macros
tde_add_project_*
from the top directory of the project I considered immediately when the macros are prepared. @Ray-V, you had a great idea to add a variant withtde_conditional_*
!I modified your proposal so that it supports all variants of calls – with even without using
tde_conditional_...
, from top directory as well as from a specific subdirectory. This ensures functionality for existing use. To install simple HTML documentation I added potential pictures to the list of installed files. Formisc
directory I added the removal ofMakefile.am
file from the list of installed files to allow smooth transition from automake to CMake.Please, you can test it?
LANG ${_lang}
DESTINATION ${_doc_dest}
)
else()
This way the macro either handles docbook OR html files.
Why not making it more flexible and giving the possibility to handle both? Just need to remove the else() and put the html part in a standalone if() block.
I did it intentionally, because it makes sense to me that either documentation is generated from docbook or manually created in html, but not a combination of both within one language.
I assumed that when we make a change and, for example, add the possibility of creating documentation in AsciiDoc, another
else()
will be added.I understand and I think it is quite sensible. Is there any case where we could have both in the same package? And in such case which one should have priority (docbook or html)?
If I remember well, there was a case where there was documentation in the docbook, and next to it, some documentation in HTML files that were installed in a different directory – as the code used for
misc
. Unfortunately I don't remember where it was. But there was no collision that there would be double documentation installed on the same place.I found it – TDE/kdiff3
ok, thanks Slavek. I guess we can go with the current else() then.
endforeach()
endif()
if( EXISTS ${DOCS_SOURCE_DIR}/misc AND
Uhm.... IMO it would be better to leave the removal of makefile stuff out of TDE macros. The process can be done manually or with a small script and I don't see this as a "programming thing", just a clean up thing.
You keep in mind that after making a CMake conversion, there is always a period of concurrence with automake before automake related files are deleted. Used
list( REMOVE_ITEM ... )
is precisely that theMakefile.am
file is not installed in the binary package when CMake build is used.I am fine if you prefer this way, just is seems a bit unclean to me. But I don't have objections to proceed like this.
It seems that the
misc
installation code could be simplified. Instead offile( GLOB ... )
andinstall( FILES ...)
,install( DIRECTORY ... )
could be used, where it is possible to usePATERN ... EXLUDE
to skip unwanted files.Adjusted as mentioned.
Looks better. Question: is there any other case other than "misc" folder, that we should consider?
I considered an
other
directory. You can notice that in TDE/kvpnc there is a directorymisc
, which was not currently installed. After adding the default behavior formisc
directory, it will now be installed. Therefore, I consideredother
, which would be without default behavior.Adjusted as mentioned.
Sounds good 👍
I only added comments without going as far as requesting changes, since I am just proposing ideas. Overall it looks good though! 👍
65ecb62321
tod126204f66
3 years agod126204f66
tocbba8083f1
3 years agoComments based on original commits, I can't keep up with you two.
Yes - that works.
Tested with kdbg and kvpnc in the rfc/docs_translations_macro branches.
Tried BUILD_DOC and BUILD_TRANSLATIONS set on and off.
For kdbg, added po directory including Makefile.am, and added Makefile.am back in to translations and doc trees.
Ran the tde-l10n_split_desktop script to set up translations/desktop_files/kdbg.desktop files which created a kdbg.desktop with just the locales selected for the build.
If there are other types of images/extensions, eg *.svg, *.jpeg, this list will have to be extended.
Wouldn't it be better to GLOB everything in the directory, using the Makefile.am exclusion? Any other files which aren't relevant shouldn't be there.
Similarly for commit
65ecb62321
- tde_create_handbook() is only called once it's been established that *.docbook exists in the directory, so all files there should be relevant to the help files.How about removing all Makefile.am during the cmake build?
Add something like this to the top level CMakeLists.txt, and then remove it when the autotools stuff is removed?
It needs to be placed before cmake_install.cmake is created so I put it after set( VERSION R14.1.0 )
I tried file(REMOVE_RECURSE Makefile.am), but that didn't do what I expected.
What's the purpose of this overlap period?
In directories there sometimes are to find files that are only working and not desirable to be installed. For example, svg files are not used in docbook documentation, but can serve as a png images source. Therefore, it looks like it makes sense that instead of installing everything, only files where it is desirable are installed.
Another reason is that
file( GLOB * )
also returned directories, so then the list would have to be processed and the directories deleted from the list. (OptionLIST_DIRECTORIES
requires CMake 3.3, which is currently undesirable requirement.)No, it's not a good idea to make changes in the source directory. In addition to the Makefile.am files that will be deleted soon there may be files that are required. For example, an apidox generation still depends on the Makefile.am files.
Because package maintainers can respond to automake => CMake conversion with delay, here is a rule that automake build can be removed up to one release cycle after CMake conversion. This means that automake rules can now be removed in modules, where the CMake conversion was performed during R14.0.10 cycle.
cbba8083f1
to6d6ad623c4
3 years ago6d6ad623c4
into master 3 years agoThank you all for good ideas and comments!
Reviewers
6d6ad623c4
.