diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-11-08 22:58:28 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-08 22:58:28 +0000 |
| commit | 52be1ef0d126f09ba943c7afcf367e7d9347f2fd (patch) | |
| tree | fd4b0dd148751c3c6c1b95296c3b82cb86051b83 /share | |
| parent | 795d0737fed40d88a7801b451b7750ba90802345 (diff) | |
| download | build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.gz build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.bz2 build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.xz build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.zip | |
tabconv: it's all spaces now.
Diffstat (limited to 'share')
| -rw-r--r-- | share/autoinclude/general-rules.bld | 166 | ||||
| -rw-r--r-- | share/include/qt4.bld | 236 |
2 files changed, 201 insertions, 201 deletions
diff --git a/share/autoinclude/general-rules.bld b/share/autoinclude/general-rules.bld index 6c0df30..0e4f0b4 100644 --- a/share/autoinclude/general-rules.bld +++ b/share/autoinclude/general-rules.bld | |||
| @@ -6,151 +6,151 @@ | |||
| 6 | 6 | ||
| 7 | if CXX == null then | 7 | if CXX == null then |
| 8 | { | 8 | { |
| 9 | CXX = "g++"; | 9 | CXX = "g++"; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | if AR == null then | 12 | if AR == null then |
| 13 | { | 13 | { |
| 14 | AR = "ar"; | 14 | AR = "ar"; |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | if CC == null then | 17 | if CC == null then |
| 18 | { | 18 | { |
| 19 | CC = "cc"; | 19 | CC = "cc"; |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | if BISON == null then | 22 | if BISON == null then |
| 23 | { | 23 | { |
| 24 | BISON = "bison"; | 24 | BISON = "bison"; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | if FLEX == null then | 27 | if FLEX == null then |
| 28 | { | 28 | { |
| 29 | FLEX = "flex"; | 29 | FLEX = "flex"; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | function cppToObj() | 32 | function cppToObj() |
| 33 | { | 33 | { |
| 34 | if OBJ_DIR == null then | 34 | if OBJ_DIR == null then |
| 35 | { | 35 | { |
| 36 | return INPUT.regex("\\.cpp$", ".o"); | 36 | return INPUT.regex("\\.cpp$", ".o"); |
| 37 | } | 37 | } |
| 38 | else | 38 | else |
| 39 | { | 39 | { |
| 40 | return OBJ_DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".o"); | 40 | return OBJ_DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".o"); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | function cToObj() | 45 | function cToObj() |
| 46 | { | 46 | { |
| 47 | if OBJ_DIR == null then | 47 | if OBJ_DIR == null then |
| 48 | { | 48 | { |
| 49 | return INPUT.regex("\\.c$", ".o"); | 49 | return INPUT.regex("\\.c$", ".o"); |
| 50 | } | 50 | } |
| 51 | else | 51 | else |
| 52 | { | 52 | { |
| 53 | return OBJ_DIR + "/" + INPUT.fileName().regex("\\.c$", ".o"); | 53 | return OBJ_DIR + "/" + INPUT.fileName().regex("\\.c$", ".o"); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | rule "exe" | 58 | rule "exe" |
| 59 | { | 59 | { |
| 60 | input "*.o"; | 60 | input "*.o"; |
| 61 | profile "build" | 61 | profile "build" |
| 62 | { | 62 | { |
| 63 | INPUT = [INPUT].unique().matches("*.o"); | 63 | INPUT = [INPUT].unique().matches("*.o"); |
| 64 | execute("${CXX} -o ${OUTPUT} ${INPUT} ${LDFLAGS}"); | 64 | execute("${CXX} -o ${OUTPUT} ${INPUT} ${LDFLAGS}"); |
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | rule "so" | 68 | rule "so" |
| 69 | { | 69 | { |
| 70 | input "*.o"; | 70 | input "*.o"; |
| 71 | profile "build" | 71 | profile "build" |
| 72 | { | 72 | { |
| 73 | INPUT = [INPUT].unique().matches("*.o"); | 73 | INPUT = [INPUT].unique().matches("*.o"); |
| 74 | execute("${CXX} -shared -o ${OUTPUT} ${INPUT} ${LDFLAGS}"); | 74 | execute("${CXX} -shared -o ${OUTPUT} ${INPUT} ${LDFLAGS}"); |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | rule "lib" | 78 | rule "lib" |
| 79 | { | 79 | { |
| 80 | input "*.o"; | 80 | input "*.o"; |
| 81 | profile "build" | 81 | profile "build" |
| 82 | { | 82 | { |
| 83 | INPUT = [INPUT].unique().matches("*.o"); | 83 | INPUT = [INPUT].unique().matches("*.o"); |
| 84 | execute("${AR} cr ${OUTPUT} ${INPUT}"); | 84 | execute("${AR} cr ${OUTPUT} ${INPUT}"); |
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | rule "cpp" | 88 | rule "cpp" |
| 89 | { | 89 | { |
| 90 | input "*.cpp"; | 90 | input "*.cpp"; |
| 91 | output INPUT.cppToObj(); | 91 | output INPUT.cppToObj(); |
| 92 | requires getMakeDeps("${CXX} ${CXXFLAGS} -M -MG ${INPUT}"); | 92 | requires getMakeDeps("${CXX} ${CXXFLAGS} -M -MG ${INPUT}"); |
| 93 | profile "build" | 93 | profile "build" |
| 94 | { | 94 | { |
| 95 | execute("${CXX} ${CXXFLAGS} -c -o ${OUTPUT} ${INPUT}", "g++"); | 95 | execute("${CXX} ${CXXFLAGS} -c -o ${OUTPUT} ${INPUT}", "g++"); |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | // Heh, we're not going to use this one. | 99 | // Heh, we're not going to use this one. |
| 100 | rule "c" | 100 | rule "c" |
| 101 | { | 101 | { |
| 102 | input "*.c"; | 102 | input "*.c"; |
| 103 | output INPUT.cToObj(); | 103 | output INPUT.cToObj(); |
| 104 | requires getMakeDeps("${CC} ${CFLAGS} -M -MG ${INPUT}"); | 104 | requires getMakeDeps("${CC} ${CFLAGS} -M -MG ${INPUT}"); |
| 105 | profile "build" | 105 | profile "build" |
| 106 | { | 106 | { |
| 107 | execute("${CC} ${CFLAGS} -c -o ${OUTPUT} ${INPUT}"); | 107 | execute("${CC} ${CFLAGS} -c -o ${OUTPUT} ${INPUT}"); |
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | rule "bison" | 111 | rule "bison" |
| 112 | { | 112 | { |
| 113 | input "*.y"; | 113 | input "*.y"; |
| 114 | output [INPUT.regex("\\.y$", ".tab.c"), INPUT.regex("\\.y$", ".tab.h")]; | 114 | output [INPUT.regex("\\.y$", ".tab.c"), INPUT.regex("\\.y$", ".tab.h")]; |
| 115 | profile "build" | 115 | profile "build" |
| 116 | { | 116 | { |
| 117 | BASE = INPUT.regex("\\.y", ""); | 117 | BASE = INPUT.regex("\\.y", ""); |
| 118 | execute("${BISON} -b${BASE} ${BISONFLAGS} ${INPUT}"); | 118 | execute("${BISON} -b${BASE} ${BISONFLAGS} ${INPUT}"); |
| 119 | // if you add a -v bison will produce a .output file | 119 | // if you add a -v bison will produce a .output file |
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | rule "flex" | 123 | rule "flex" |
| 124 | { | 124 | { |
| 125 | input "*.l"; | 125 | input "*.l"; |
| 126 | output INPUT.regex("\\.l$", ".yy.c"); | 126 | output INPUT.regex("\\.l$", ".yy.c"); |
| 127 | output INPUT.regex("\\.l$", ".yy.h"); | 127 | output INPUT.regex("\\.l$", ".yy.h"); |
| 128 | profile "build" | 128 | profile "build" |
| 129 | { | 129 | { |
| 130 | execute("${FLEX} ${FLEXFLAGS} ${INPUT}"); | 130 | execute("${FLEX} ${FLEXFLAGS} ${INPUT}"); |
| 131 | } | 131 | } |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | rule "jar" | 134 | rule "jar" |
| 135 | { | 135 | { |
| 136 | input "*.class"; | 136 | input "*.class"; |
| 137 | profile "build" | 137 | profile "build" |
| 138 | { | 138 | { |
| 139 | if exists(OUTPUT) then | 139 | if exists(OUTPUT) then |
| 140 | { | 140 | { |
| 141 | unlink(OUTPUT); | 141 | unlink(OUTPUT); |
| 142 | } | 142 | } |
| 143 | execute("jar cf ${OUTPUT} ${INPUT}"); | 143 | execute("jar cf ${OUTPUT} ${INPUT}"); |
| 144 | } | 144 | } |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | rule "class" | 147 | rule "class" |
| 148 | { | 148 | { |
| 149 | input "*.java"; | 149 | input "*.java"; |
| 150 | output INPUT.regex("\\.java", ".class"); | 150 | output INPUT.regex("\\.java", ".class"); |
| 151 | profile "build" | 151 | profile "build" |
| 152 | { | 152 | { |
| 153 | execute("javac -cp . ${INPUT}"); | 153 | execute("javac -cp . ${INPUT}"); |
| 154 | } | 154 | } |
| 155 | } | 155 | } |
| 156 | 156 | ||
diff --git a/share/include/qt4.bld b/share/include/qt4.bld index ebf26d7..e1cfdd2 100644 --- a/share/include/qt4.bld +++ b/share/include/qt4.bld | |||
| @@ -1,165 +1,165 @@ | |||
| 1 | 1 | ||
| 2 | function qt_getCXXFLAGS() | 2 | function qt_getCXXFLAGS() |
| 3 | { | 3 | { |
| 4 | if QTDIR == null then | 4 | if QTDIR == null then |
| 5 | { | 5 | { |
| 6 | error "QTDIR is not set, cannot find QT tools."; | 6 | error "QTDIR is not set, cannot find QT tools."; |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | ret = "-D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LI " | 9 | ret = "-D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LI " |
| 10 | "-DQT_SHARED -I${QTDIR}/mkspecs/linux-g++ " | 10 | "-DQT_SHARED -I${QTDIR}/mkspecs/linux-g++ " |
| 11 | "$(PKG_CONFIG_PATH=PKG_CONFIG_PATH:${QTDIR}/lib/pkgconfig " | 11 | "$(PKG_CONFIG_PATH=PKG_CONFIG_PATH:${QTDIR}/lib/pkgconfig " |
| 12 | "pkg-config --cflags QtCore QtGui ice glu x11 xext libpng freetype2 " | 12 | "pkg-config --cflags QtCore QtGui ice glu x11 xext libpng freetype2 " |
| 13 | "gobject-2.0 sm xrender fontconfig gthread-2.0 glib-2.0)"; | 13 | "gobject-2.0 sm xrender fontconfig gthread-2.0 glib-2.0)"; |
| 14 | if UI_DIR != null then | 14 | if UI_DIR != null then |
| 15 | { | 15 | { |
| 16 | ret += "-I${UI_DIR}"; | 16 | ret += "-I${UI_DIR}"; |
| 17 | } | 17 | } |
| 18 | if RCC_DIR != null then | 18 | if RCC_DIR != null then |
| 19 | { | 19 | { |
| 20 | ret += "-I${RCC_DIR}"; | 20 | ret += "-I${RCC_DIR}"; |
| 21 | } | 21 | } |
| 22 | if MOC_DIR != null then | 22 | if MOC_DIR != null then |
| 23 | { | 23 | { |
| 24 | ret += "-I${MOC_DIR}"; | 24 | ret += "-I${MOC_DIR}"; |
| 25 | } | 25 | } |
| 26 | return ret; | 26 | return ret; |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | function qt_getLDFLAGS() | 29 | function qt_getLDFLAGS() |
| 30 | { | 30 | { |
| 31 | if QTDIR == null then | 31 | if QTDIR == null then |
| 32 | { | 32 | { |
| 33 | error "QTDIR is not set, cannot find QT tools."; | 33 | error "QTDIR is not set, cannot find QT tools."; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | return "-Wl,-rpath,${QTDIR}/lib $(PKG_CONFIG_PATH=" | 36 | return "-Wl,-rpath,${QTDIR}/lib $(PKG_CONFIG_PATH=" |
| 37 | "PKG_CONFIG_PATH:${QTDIR}/lib/pkgconfig " | 37 | "PKG_CONFIG_PATH:${QTDIR}/lib/pkgconfig " |
| 38 | "pkg-config --libs QtCore QtGui ice glu x11 xext libpng freetype2 " | 38 | "pkg-config --libs QtCore QtGui ice glu x11 xext libpng freetype2 " |
| 39 | "gobject-2.0 sm xrender fontconfig gthread-2.0 glib-2.0) -lz " | 39 | "gobject-2.0 sm xrender fontconfig gthread-2.0 glib-2.0) -lz " |
| 40 | "-lm -ldl"; | 40 | "-lm -ldl"; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | function qt_getToolPath( TOOL, DEFAULT ) | 43 | function qt_getToolPath( TOOL, DEFAULT ) |
| 44 | { | 44 | { |
| 45 | if QTDIR == null then | 45 | if QTDIR == null then |
| 46 | { | 46 | { |
| 47 | error "QTDIR is not set, cannot find QT tools."; | 47 | error "QTDIR is not set, cannot find QT tools."; |
| 48 | } | 48 | } |
| 49 | if TOOL == null then | 49 | if TOOL == null then |
| 50 | { | 50 | { |
| 51 | return "${QTDIR}/bin/${DEFAULT}"; | 51 | return "${QTDIR}/bin/${DEFAULT}"; |
| 52 | } | 52 | } |
| 53 | return TOOL; | 53 | return TOOL; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | function qt_uiToH() | 56 | function qt_uiToH() |
| 57 | { | 57 | { |
| 58 | if "${UI_DIR}" == "" then | 58 | if "${UI_DIR}" == "" then |
| 59 | { | 59 | { |
| 60 | DIR = INPUT.dirName(); | 60 | DIR = INPUT.dirName(); |
| 61 | } | 61 | } |
| 62 | else | 62 | else |
| 63 | { | 63 | { |
| 64 | DIR = UI_DIR; | 64 | DIR = UI_DIR; |
| 65 | } | 65 | } |
| 66 | FILE = INPUT.fileName(); | 66 | FILE = INPUT.fileName(); |
| 67 | OUTFILE = FILE.replace(".ui",".h"); | 67 | OUTFILE = FILE.replace(".ui",".h"); |
| 68 | return "${DIR}/ui_${OUTFILE}"; | 68 | return "${DIR}/ui_${OUTFILE}"; |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | rule "qt_ui" | 71 | rule "qt_ui" |
| 72 | { | 72 | { |
| 73 | display "ui"; | 73 | display "ui"; |
| 74 | input "*.ui"; | 74 | input "*.ui"; |
| 75 | output INPUT.qt_uiToH(); | 75 | output INPUT.qt_uiToH(); |
| 76 | tag "headers"; | 76 | tag "headers"; |
| 77 | profile "build" | 77 | profile "build" |
| 78 | { | 78 | { |
| 79 | UIC = qt_getToolPath( UIC, "uic" ); | 79 | UIC = qt_getToolPath( UIC, "uic" ); |
| 80 | execute("${UIC} -o ${OUTPUT} ${INPUT}"); | 80 | execute("${UIC} -o ${OUTPUT} ${INPUT}"); |
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | function qt_qrcToCpp() | 84 | function qt_qrcToCpp() |
| 85 | { | 85 | { |
| 86 | if "${RCC_DIR}" == "" then | 86 | if "${RCC_DIR}" == "" then |
| 87 | { | 87 | { |
| 88 | DIR = INPUT.dirName(); | 88 | DIR = INPUT.dirName(); |
| 89 | } | 89 | } |
| 90 | else | 90 | else |
| 91 | { | 91 | { |
| 92 | DIR = RCC_DIR; | 92 | DIR = RCC_DIR; |
| 93 | } | 93 | } |
| 94 | FILE = INPUT.fileName(); | 94 | FILE = INPUT.fileName(); |
| 95 | OUTFILE = FILE.replace(".qrc",".cpp"); | 95 | OUTFILE = FILE.replace(".qrc",".cpp"); |
| 96 | return "${DIR}/qrc_${OUTFILE}"; | 96 | return "${DIR}/qrc_${OUTFILE}"; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | rule "qt_rcc" | 99 | rule "qt_rcc" |
| 100 | { | 100 | { |
| 101 | display "rcc"; | 101 | display "rcc"; |
| 102 | input "*.qrc"; | 102 | input "*.qrc"; |
| 103 | output INPUT.qt_qrcToCpp(); | 103 | output INPUT.qt_qrcToCpp(); |
| 104 | profile "build" | 104 | profile "build" |
| 105 | { | 105 | { |
| 106 | RCC = qt_getToolPath( RCC, "rcc" ); | 106 | RCC = qt_getToolPath( RCC, "rcc" ); |
| 107 | NAME = INPUT.fileName().replace(".qrc",""); | 107 | NAME = INPUT.fileName().replace(".qrc",""); |
| 108 | execute("${RCC} -name ${NAME} -o ${OUTPUT} ${INPUT}"); | 108 | execute("${RCC} -name ${NAME} -o ${OUTPUT} ${INPUT}"); |
| 109 | } | 109 | } |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | function qt_isMocable() | 112 | function qt_isMocable() |
| 113 | { | 113 | { |
| 114 | if INPUT.matches("*.h") then | 114 | if INPUT.matches("*.h") then |
| 115 | { | 115 | { |
| 116 | if exists( INPUT ) then | 116 | if exists( INPUT ) then |
| 117 | { | 117 | { |
| 118 | if "$(grep Q_OBJECT ${INPUT})" != "" then | 118 | if "$(grep Q_OBJECT ${INPUT})" != "" then |
| 119 | { | 119 | { |
| 120 | return true; | 120 | return true; |
| 121 | } | 121 | } |
| 122 | } | 122 | } |
| 123 | } | 123 | } |
| 124 | return false; | 124 | return false; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | function qt_hToMocCpp() | 127 | function qt_hToMocCpp() |
| 128 | { | 128 | { |
| 129 | if "${MOC_DIR}" == "" then | 129 | if "${MOC_DIR}" == "" then |
| 130 | { | 130 | { |
| 131 | DIR = INPUT.dirName(); | 131 | DIR = INPUT.dirName(); |
| 132 | } | 132 | } |
| 133 | else | 133 | else |
| 134 | { | 134 | { |
| 135 | DIR = MOC_DIR; | 135 | DIR = MOC_DIR; |
| 136 | } | 136 | } |
| 137 | FILE = INPUT.fileName(); | 137 | FILE = INPUT.fileName(); |
| 138 | OUTFILE = FILE.replace(".h",".cpp"); | 138 | OUTFILE = FILE.replace(".h",".cpp"); |
| 139 | return "${DIR}/moc_${OUTFILE}"; | 139 | return "${DIR}/moc_${OUTFILE}"; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | rule "qt_moc" | 142 | rule "qt_moc" |
| 143 | { | 143 | { |
| 144 | display "moc"; | 144 | display "moc"; |
| 145 | input qt_isMocable(); | 145 | input qt_isMocable(); |
| 146 | output INPUT.qt_hToMocCpp(); | 146 | output INPUT.qt_hToMocCpp(); |
| 147 | profile "build" | 147 | profile "build" |
| 148 | { | 148 | { |
| 149 | MOC = qt_getToolPath( MOC, "moc" ); | 149 | MOC = qt_getToolPath( MOC, "moc" ); |
| 150 | execute("${MOC} -o${OUTPUT} ${INPUT}"); | 150 | execute("${MOC} -o${OUTPUT} ${INPUT}"); |
| 151 | } | 151 | } |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | rule "exe" | 154 | rule "exe" |
| 155 | { | 155 | { |
| 156 | input regex(".*\\.(h|o)"); | 156 | input regex(".*\\.(h|o)"); |
| 157 | profile "build" | 157 | profile "build" |
| 158 | { | 158 | { |
| 159 | INPUT = [INPUT].matches("*.o"); | 159 | INPUT = [INPUT].matches("*.o"); |
| 160 | // execute("echo ${INPUT}"); | 160 | // execute("echo ${INPUT}"); |
| 161 | // execute("echo ${MYIN}"); | 161 | // execute("echo ${MYIN}"); |
| 162 | execute("${CXX} -o ${OUTPUT} ${INPUT} ${LDFLAGS}"); | 162 | execute("${CXX} -o ${OUTPUT} ${INPUT} ${LDFLAGS}"); |
| 163 | } | 163 | } |
| 164 | } | 164 | } |
| 165 | 165 | ||
