News:

--

Main Menu

© 2001 - 2017 Mean

Started by Jan Gruuthuse, January 01, 2018, 10:00:04 AM

Previous topic - Next topic

Jan Gruuthuse

Yes, Happy New Year ;) Perhaps time again to update the copyright messages © 2001 - 2018 Mean
or automate with a function? like clang example:

QuoteYou can also define the macro in the Makefile. With this approach, you have complete control over which fields to include in the expansion:

ctyear: ctyear.c
    clang '-DBUILD_YEAR="$(shell date +%Y)"' $< -o $@

ctyear.c:

#include <stdio.h>

#define COMPANY  "Mean"
#define CYC BUILD_YEAR " " COMPANY

int main(void) {
    printf("Copyright %s\n", CYC);
    return 0;
}


If you have a large project with many source files, you probably have a Makefile and you can add '-DBUILD_YEAR="$(shell date +%Y)"' to the definition of CFLAGS.

source: https://stackoverflow.com/questions/41898659/extract-only-year-from-date-macro

mean


EEMcGee

Thank you for all of your hard work and dedication.