mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Change the iso-4217 generator script to accept the srcdir as cmdline argument instead of an env variable.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19013 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
aa0c80f38e
commit
04552dd13d
@ -62,9 +62,7 @@ ADD_CUSTOM_COMMAND (
|
||||
OUTPUT ${ISO_4217_C}
|
||||
DEPENDS iso-4217-currencies.scm iso-currencies-to-c
|
||||
COMMAND
|
||||
GUILE_LOAD_PATH=@GNC_SRFI_LOAD_PATH@:${GUILE_LOAD_PATH}
|
||||
srcdir=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${GUILE_EXECUTABLE} -s ${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c
|
||||
${GUILE_EXECUTABLE} -s "${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c" "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
# Add dependency on iso-4217-currencies.c
|
||||
SET_SOURCE_FILES_PROPERTIES (gnc-commodity.c PROPERTIES OBJECT_DEPENDS ${ISO_4217_C})
|
||||
|
@ -166,7 +166,7 @@ endif
|
||||
|
||||
iso-4217-currencies.c: iso-4217-currencies.scm iso-currencies-to-c
|
||||
-chmod u+x ${srcdir}/iso-currencies-to-c
|
||||
srcdir=${srcdir} ${srcdir}/iso-currencies-to-c
|
||||
${srcdir}/iso-currencies-to-c "${srcdir}"
|
||||
|
||||
BUILT_SOURCES = iso-4217-currencies.c
|
||||
|
||||
|
@ -10,7 +10,13 @@ exec guile -s $0 "$@"
|
||||
(export simple-format)
|
||||
(define simple-format format)))
|
||||
|
||||
(define *currency-file* (string-append (getenv "srcdir") "/" "iso-4217-currencies.scm"))
|
||||
(if (< (length (command-line)) 2)
|
||||
(begin
|
||||
(display "Missing command line argument \"source directory\"")
|
||||
(exit 1)))
|
||||
|
||||
(define *srcdir* (list-ref (command-line) 1))
|
||||
(define *currency-file* (string-append *srcdir* "/" "iso-4217-currencies.scm"))
|
||||
(define *c-file-name* "iso-4217-currencies.c")
|
||||
|
||||
(define (generate-currency-c-code form output-port)
|
||||
|
Loading…
Reference in New Issue
Block a user