date/lutin_date.py

48 lines
937 B
Python
Raw Permalink Normal View History

2015-05-07 22:45:18 +02:00
#!/usr/bin/python
2019-05-03 10:18:22 +02:00
import realog.debug as debug
2015-05-08 22:36:21 +02:00
import lutin.tools as tools
2015-05-07 22:45:18 +02:00
import datetime
2015-10-14 21:21:03 +02:00
def get_type():
2016-09-14 21:27:39 +02:00
return "LIBRARY_STATIC"
2015-10-14 21:21:03 +02:00
2015-05-07 22:45:18 +02:00
def get_desc():
return "Date buid date of the program"
2015-10-14 21:21:03 +02:00
def get_licence():
return "MPL-2"
2015-10-14 21:21:03 +02:00
def get_compagny_type():
return "com"
def get_compagny_name():
return "atria-soft"
def get_maintainer():
2016-09-14 21:27:39 +02:00
return "authors.txt"
2015-10-14 21:21:03 +02:00
def get_version():
2016-09-14 21:27:39 +02:00
return "version.txt"
2015-05-07 22:45:18 +02:00
def configure(target, my_module):
2015-09-24 21:44:04 +02:00
my_module.add_src_file([
'date/date.cpp'
])
2015-09-24 21:44:04 +02:00
my_module.add_header_file([
'date/date.hpp'
])
2015-05-07 22:45:18 +02:00
now = datetime.datetime.now()
2016-09-08 21:35:02 +02:00
my_module.add_flag('c++', [
'-Wno-write-strings',
'-Wall',
"-DBUILD_DAY=\""+str(now.day)+"\"",
"-DBUILD_MONTH=\""+str(now.month)+"\"",
"-DBUILD_YEAR=\""+str(now.year)+"\"",
"-DBUILD_HOUR=\""+str(now.hour)+"\"",
"-DBUILD_MINUTE=\""+str(now.minute)+"\"",
"-DBUILD_SECOND=\""+str(now.second)+"\""
])
return True
2015-05-07 22:45:18 +02:00