lib & contrib & tests: update users of `cflags` and `ldflags`
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 24 Jan 2015 14:18:41 +0000 (09:18 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 26 Jan 2015 02:18:57 +0000 (21:18 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

21 files changed:
contrib/pep8analysis/src/pep8analysis_web.nit
lib/cocoa/app_kit.nit
lib/cocoa/cocoa.nit
lib/cocoa/foundation.nit
lib/cpp.nit
lib/java/java.nit
lib/jvm.nit
lib/mpi.nit
lib/pthreads/extra.nit
lib/pthreads/pthreads.nit
lib/realtime.nit
lib/sdl.nit
lib/sdl2/image.nit
tests/error_annot_c_compiler.nit
tests/sav/error_annot_c_compiler_alt1.res
tests/sav/error_annot_c_compiler_alt2.res
tests/sav/error_annot_c_compiler_alt3.res
tests/sav/error_annot_c_compiler_alt4.res
tests/sav/error_annot_c_compiler_alt5.res
tests/sav/error_annot_c_compiler_alt6.res
tests/test_annot_c_compiler.nit

index dacc9ff..b991952 100644 (file)
@@ -20,8 +20,8 @@
 # analysis results. The result graph will be sent to the JavaScript function
 # `show_graph` with the source of the graph in Graphviz's dot.
 module pep8analysis_web is
-       cpp_compiler_option("--std=c++11 --bind")
-       c_linker_option("--bind")
+       cppflags "--std=c++11 --bind"
+       ldflags "--bind"
 end
 
 import emscripten
index 91bc87c..5fe0af2 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # The Application Kit provides services to create GUI
-module app_kit is c_linker_option "-framework AppKit"
+module app_kit is ldflags "-framework AppKit"
 
 import foundation
 
index 99c6b12..09e1291 100644 (file)
@@ -20,7 +20,7 @@
 #
 # This wrapper of the Cocoa API regroups the Foundation Kit and the
 # Application Kit.
-module cocoa is c_linker_option "-framework Cocoa"
+module cocoa is ldflags "-framework Cocoa"
 
 import foundation
 import app_kit
index ab027fd..cbe8f08 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # The Foundation Kit provides basic Objective-C classes and structures
-module foundation is c_linker_option "-framework Foundation"
+module foundation is ldflags "-framework Foundation"
 
 in "ObjC Header" `{
        #import <Foundation/Foundation.h>
index 6fe897a..78bb96c 100644 (file)
@@ -16,7 +16,7 @@
 
 # Offers features to interface with C++ code and libraries
 module cpp is
-       new_annotation cpp_compiler_option
+       new_annotation cppflags
 end
 
 # A pointer to a C++ std::string instance
index c3db430..2020e30 100644 (file)
@@ -27,8 +27,8 @@
 # most of JNI functions. You can use it to further customize the behavior
 # of your code.
 module java is
-       c_compiler_option "-I $(JAVA_HOME)/include/ -I $(JAVA_HOME)/include/linux/"
-       c_linker_option("-L $(JNI_LIB_PATH) -ljvm")
+       cflags "-I $(JAVA_HOME)/include/ -I $(JAVA_HOME)/include/linux/"
+       ldflags "-L $(JNI_LIB_PATH) -ljvm"
        new_annotation extra_java_files
 end
 
index 6063f23..abdcab6 100644 (file)
@@ -19,8 +19,8 @@
 #
 # See: http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/jniTOC.html
 module jvm is
-       c_compiler_option "-I $(JAVA_HOME)/include/ -I $(JAVA_HOME)/include/linux/"
-       c_linker_option "-L $(JNI_LIB_PATH) -ljvm"
+       cflags "-I $(JAVA_HOME)/include/ -I $(JAVA_HOME)/include/linux/"
+       ldflags "-L $(JNI_LIB_PATH) -ljvm"
 end
 
 in "C Header" `{
index 01137f7..de91686 100644 (file)
@@ -26,8 +26,8 @@
 # Since this module is a thin wrapper around OpenMPI, in case of missing
 # documentation, you can refer to https://www.open-mpi.org/doc/v1.8/.
 module mpi is
-       c_compiler_option(exec("mpicc", "-showme:compile"))
-       c_linker_option(exec("mpicc", "-showme:link"))
+       cflags exec("mpicc", "-showme:compile")
+       ldflags exec("mpicc", "-showme:link")
 end
 
 import c
index 416b174..e408270 100644 (file)
@@ -16,8 +16,8 @@
 
 # Offers some POSIX threads services that are not available on all platforms
 module extra is
-       c_compiler_option("-pthread")
-       c_linker_option("-pthread")
+       cflags "-pthread"
+       ldflags "-pthread"
 end
 
 intrude import pthreads
index bce93c4..5d6b80d 100644 (file)
@@ -16,8 +16,8 @@
 
 # Main POSIX threads support and intro the classes `Thread`, `Mutex` and `Barrier`
 module pthreads is
-       c_compiler_option("-pthread")
-       c_linker_option("-pthread")
+       cflags "-pthread"
+       ldflags "-pthread"
        pkgconfig "bdw-gc"
 end
 
index b66ade0..3a02d86 100644 (file)
@@ -11,7 +11,7 @@
 # another product.
 
 # Provides the Clock utility class to keep time of real time flow
-module realtime is c_linker_option("-lrt")
+module realtime is ldflags "-lrt"
 
 in "C header" `{
 #ifdef _POSIX_C_SOURCE
index 16695e2..41ddc5b 100644 (file)
@@ -16,8 +16,8 @@
 
 # SDL display support (used in Linux for windows and inputes only)
 module sdl is
-       c_compiler_option(exec("sdl-config", "--cflags"))
-       c_linker_option(exec("sdl-config", "--libs"), "-lSDL_image -lSDL_ttf")
+       cflags exec("sdl-config", "--cflags")
+       ldflags(exec("sdl-config", "--libs"), "-lSDL_image -lSDL_ttf")
 end
 
 import mnit_display
index 6dc53b3..ce642b8 100644 (file)
@@ -20,7 +20,7 @@
 # alone: JPG, PNG, TIF, GIT, ICO and much more.
 module image is
        pkgconfig "sdl2"
-       c_linker_option "-lSDL2_image"
+       ldflags "-lSDL2_image"
 end
 
 import sdl2
index 69e3f0d..6eddab1 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#alt1# module error_annot_c_compiler_alt1 is c_compiler_option
-#alt2# module error_annot_c_compiler_alt2 is c_compiler_option(foo("llvm-config"))
-#alt3# module error_annot_c_compiler_alt3 is c_compiler_option(foo("llvm-config", "2nd arg"))
-#alt4# module error_annot_c_compiler_alt4 is c_linker_option
-#alt5# module error_annot_c_compiler_alt5 is c_compiler_option(exec("invalid-program"))
-#alt6# module error_annot_c_compiler_alt6 is c_compiler_option(exec)
+#alt1# module error_annot_c_compiler_alt1 is cflags
+#alt2# module error_annot_c_compiler_alt2 is cflags(foo("llvm-config"))
+#alt3# module error_annot_c_compiler_alt3 is cflags(foo("llvm-config", "2nd arg"))
+#alt4# module error_annot_c_compiler_alt4 is ldflags
+#alt5# module error_annot_c_compiler_alt5 is cflags(exec("invalid-program"))
+#alt6# module error_annot_c_compiler_alt6 is cflags(exec)
 
 fun foo `{ printf("nothing...\n"); `}
 
index 981a90b..23b9437 100644 (file)
@@ -1 +1 @@
-alt/error_annot_c_compiler_alt1.nit:17,39--55: Syntax error: "c_compiler_option" expects at least one argument.
+alt/error_annot_c_compiler_alt1.nit:17,39--44: Syntax error: "cflags" expects at least one argument.
index b460682..2459cd4 100644 (file)
@@ -1 +1 @@
-alt/error_annot_c_compiler_alt2.nit:18,39--75: Syntax error: "c_compiler_option" accepts only calls to `exec` with the command as arguments.
+alt/error_annot_c_compiler_alt2.nit:18,39--64: Syntax error: "cflags" accepts only calls to `exec` with the command as arguments.
index 8142bf8..a584f16 100644 (file)
@@ -1 +1 @@
-alt/error_annot_c_compiler_alt3.nit:19,39--86: Syntax error: "c_compiler_option" accepts only calls to `exec` with the command as arguments.
+alt/error_annot_c_compiler_alt3.nit:19,39--75: Syntax error: "cflags" accepts only calls to `exec` with the command as arguments.
index d753ea9..f34ea44 100644 (file)
@@ -1 +1 @@
-alt/error_annot_c_compiler_alt4.nit:20,39--53: Syntax error: "c_linker_option" expects at least one argument.
+alt/error_annot_c_compiler_alt4.nit:20,39--45: Syntax error: "ldflags" expects at least one argument.
index 2251e01..133d200 100644 (file)
@@ -1 +1 @@
-alt/error_annot_c_compiler_alt5.nit:21,57--79: Annotation error: Something went wrong executing the argument of annotation "c_compiler_option", make sure the command is valid.
+alt/error_annot_c_compiler_alt5.nit:21,46--68: Annotation error: Something went wrong executing the argument of annotation "cflags", make sure the command is valid.
index 694b887..cc29f8a 100644 (file)
@@ -1 +1 @@
-alt/error_annot_c_compiler_alt6.nit:22,39--61: Syntax error: "c_compiler_option" accepts only calls to `exec` with the command as arguments.
+alt/error_annot_c_compiler_alt6.nit:22,39--50: Syntax error: "cflags" accepts only calls to `exec` with the command as arguments.
index e55ae8a..7277957 100644 (file)
 # limitations under the License.
 
 module test_annot_c_compiler is
-       c_compiler_option("-I /usr/include")
-       c_compiler_option(exec("pkg-config", "--cflags", "sdl"))
-       c_linker_option("-lm")
-       c_linker_option("-lm", "-L /usr/bin")
+       cflags "-I /usr/include"
+       cflags exec("pkg-config", "--cflags", "sdl")
+       ldflags "-lm"
+       ldflags("-lm", "-L /usr/bin")
 end
 
 fun dummy `{ printf("nothing...\n"); `}