-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A new binary object which tests linking with libfontforge.la #553
Conversation
CPPFLAGS sets flags for the C preprocessor. Flags for a C++ compiler (which compiles .cpp files) would be CXXFLAGS. I think this is for historical reasons - CPPFLAGS existed before C++. I'm not sure that this test should properly be done as part of "make check," because it's not really a test of our code but of the build process itself. I think having it fail during plain "make" may be the right thing; and that's certainly easier to accomplish, just tell Automake to build but not install the binary that results from link_test.c. Breaking libfontforge is a big problem, and I think it should break the build. Detecting it only when "make check" is invoked means people will continue committing changes that cause this problem, because they won't bother running "make check" before committing. If you did want to make it strictly part of "make check", however, I think the right way to do it instead of trying to write a test script that understands compilers and paths and so on, would be to have a target in the Makefile for building the binary that results from link_test.c, but not tell Automake to build that binary as part of "make all". That's easy to accomplish by leaving it out of the relevant _PROGRAMS variables. Then have a test script that just invokes "make link_test". That way Autotools can worry about getting the flags right. It won't be completely bulletproof (may fail, in particular, with VPATH builds or on systems where make is not named "make"), but such things don't need to be perfect. |
@mskala Ah yes, when I see the CXXFLAGS you mentioned, I just remember the tricky gotcha "CC is for C compilers, but not C++ as in |
Can this now be merged? :) |
@davelab6 It can be 'merged', but then |
Ahh I see. Okay. Let's wait for the issues to be fixed now and then merge this so there is no regression on this :) |
gallocs and gfree removed in gutils/gimagereadbmp.c
Seems that we are now clear to merge this one. |
@davelab6 I think we are ready for this merge. Shall I do so? |
Sure! No need to wait for my approval:-)
|
A new binary object which tests linking with libfontforge.la
This is a first step towards #465 and #469.
I added a new near-empty c file, which links to
libfontforge.la
. The file is in thetests
folder, which will not be installed.This target is a normal target in
tests
, which is always compiled, not only whenmake check
is called.(Sorry about the commit message) I made this because actually I don't know how to make it that way. Or shall I write a new script in the testsuite? That way it would be harder to handle compilers, flags, and paths -- but possible.Since it is a normal target, if this pull request is merged,
make
will fail, so #465 should be fixed beforehand.Also please check if any FLAGS should be added for this target.
BTW, why there are xxx_CPPFLAGS used in many makefiles? I don't think we have CPP files.