Fix bug 3120 and bug 3154 #46

Συγχωνευμένα
MicheleC συγχώνευσε 3 υποβολές από bug/3120/holidays σε master 4 έτη πριν
MicheleC σχολίασε 4 έτη πριν
Ιδιοκτήτης
  1. Reverted fix for bug 3120
  2. Added cmake commands to generate parseholiday and scanholiday files at built time
  3. Fixed original problem of bug 3120 without affecting holiday's functionality, hence fixing also bug 3154.
1. Reverted fix for bug 3120 2. Added cmake commands to generate parseholiday and scanholiday files at built time 3. Fixed original problem of bug 3120 without affecting holiday's functionality, hence fixing also bug 3154.
MicheleC το πρόσθεσε στο R14.0.9 release ορόσημο 4 έτη πριν
MicheleC πρόσθεσε τη σήμανση PR/rfc 4 έτη πριν
SlavekB αξιολόγησε 4 έτη πριν
SlavekB άφησε ένα σχόλιο
Ιδιοκτήτης

Here are some comments to resolve.

Here are some comments to resolve.
libkholidays/CMakeLists.txt Παρωχημένο
add_custom_command(
OUTPUT parseholiday.c parseholiday.h
COMMAND bison -p kcal -d -o ${CMAKE_CURRENT_BINARY_DIR}/parseholiday.c parseholiday.y
SlavekB σχολίασε 4 έτη πριν
Ιδιοκτήτης

It is necessary to add bison and flex detection – see for example TDE/kscope.

At the same time, it is better to keep the binary as the active directory and use ${CMAKE_CURRENT_SOURCE_DIR} to specify the source file – see also TDE/kscope. Flex and bison can generate some temporary files, and it's a good idea to generate them in a binary directory, because the source directory can be read-only and should remain intact. This applies, for example, to a generated file parseholiday.h.

It is necessary to add bison and flex detection – see for example [TDE/kscope](../kscope/src/branch/master/ConfigureChecks.cmake#L29). At the same time, it is better to keep the binary as the active directory and use `${CMAKE_CURRENT_SOURCE_DIR}` to specify the source file – see also [TDE/kscope](../kscope/src/branch/master/src/CMakeLists.txt#L17). Flex and bison can generate some temporary files, and it's a good idea to generate them in a binary directory, because the source directory can be read-only and should remain intact. This applies, for example, to a generated file `parseholiday.h`.
libkholidays/CMakeLists.txt Παρωχημένο
add_custom_command(
OUTPUT scanholiday.c
COMMAND lex -Pkcal -B -i -o ${CMAKE_CURRENT_BINARY_DIR}/scanholiday.c scanholiday.lex
SlavekB σχολίασε 4 έτη πριν
Ιδιοκτήτης

Same note as above.

Same note as above.
libkholidays/CMakeLists.txt Παρωχημένο
)
add_custom_target(
file_generation
SlavekB σχολίασε 4 έτη πριν
Ιδιοκτήτης

Target names are unique throughout the whole project. Therefore file_generation is not a good choice – it should be more accurate, for example holiday_parser_generated.

Target names are unique throughout the whole project. Therefore `file_generation` is not a good choice – it should be more accurate, for example `holiday_parser_generated`.
MicheleC σχολίασε 4 έτη πριν
Συντάκτης
Ιδιοκτήτης

Thanks for the comments Slavek, will update in a while

Thanks for the comments Slavek, will update in a while
MicheleC σχολίασε 4 έτη πριν
Συντάκτης
Ιδιοκτήτης

All three issues addressed in newer version. I also separated out the fix for the FTBFS into its own commit.

All three issues addressed in newer version. I also separated out the fix for the FTBFS into its own commit.
SlavekB αξιολόγησε 4 έτη πριν
SlavekB άφησε ένα σχόλιο
Ιδιοκτήτης

Just a small note…

Just a small note…
libkholidays/CMakeLists.txt Παρωχημένο
add_custom_command(
OUTPUT parseholiday.c parseholiday.h
COMMAND ${BISON_EXECUTABLE} -p kcal -d -o parseholiday.c ${CMAKE_CURRENT_SOURCE_DIR}/parseholiday.y
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
SlavekB σχολίασε 4 έτη πριν
Ιδιοκτήτης

CMAKE_CURRENT_BINARY_DIR is the default WORKING_DIRECTORY => it does not need to be specified.

`CMAKE_CURRENT_BINARY_DIR` is the default `WORKING_DIRECTORY` => it does not need to be specified.
MicheleC σχολίασε 4 έτη πριν
Συντάκτης
Ιδιοκτήτης

Updated 😄

Updated :smile:
SlavekB ενέκρινε αυτές τις αλλαγές 4 έτη πριν
SlavekB άφησε ένα σχόλιο
Ιδιοκτήτης

It seems good.
Build successfully tested on Wheezy, Stretch and FreeBSD.

It seems good. Build successfully tested on Wheezy, Stretch and FreeBSD.
MicheleC συγχώνευσε την υποβολή f95037bc26 σε master 4 έτη πριν
MicheleC διέγραψε το κλάδο bug/3120/holidays 4 έτη πριν
MicheleC αφαίρεσε το σήμα PR/rfc 4 έτη πριν

Εξεταστές

SlavekB ενέκρινε αυτές τις αλλαγές 4 έτη πριν
Το pull request έχει συγχωνευθεί ως f95037bc26.
Συνδεθείτε για να συμμετάσχετε σε αυτή τη συνομιλία.
Δεν υπάρχουν εξεταστές
Χωρίς Ορόσημο
Χωρίς Αποδέκτη
2 Συμμετέχοντες
Ειδοποιήσεις
Ημερομηνία Παράδοσης

Δεν ορίστηκε ημερομηνία παράδοσης.

Εξαρτήσεις

Δεν έχουν οριστεί εξαρτήσεις.

Αναφορά: TDE/tdepim#46
Φόρτωση…
Δεν υπάρχει ακόμα περιεχόμενο.