]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Added -progsrc commandline switch to specify progs.src files of different names....
authorDale Weiler <killfieldengine@gmail.com>
Thu, 12 Sep 2013 21:06:20 +0000 (17:06 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 12 Sep 2013 21:06:20 +0000 (17:06 -0400)
main.c
misc/check-doc.sh
misc/xonotic_export.sh
opts.c
opts.def

diff --git a/main.c b/main.c
index 33bde557176bf0d3a5c6ab9a4077551334f37606..fa245a936800d8f6ec72af07080179703ca5f5e3 100644 (file)
--- a/main.c
+++ b/main.c
@@ -234,6 +234,10 @@ static bool options_parse(int argc, char **argv) {
                 OPTS_OPTION_U16(OPTION_MEMDUMPCOLS) = (uint16_t)strtol(memdumpcols, NULL, 10);
                 continue;
             }
+            if (options_long_gcc("progsrc", &argc, &argv, &argarg)) {
+                OPTS_OPTION_STR(OPTION_PROGSRC) = argarg;
+                continue;
+            }
 
             /* show defaults (like pathscale) */
             if (!strcmp(argv[0]+1, "show-defaults")) {
@@ -670,9 +674,9 @@ int main(int argc, char **argv) {
 
         progs_src = true;
 
-        src = fs_file_open("progs.src", "rb");
+        src = fs_file_open(OPTS_OPTION_STR(OPTION_PROGSRC), "rb");
         if (!src) {
-            con_err("failed to open `progs.src` for reading\n");
+            con_err("failed to open `%s` for reading\n", OPTS_OPTION_STR(OPTION_PROGSRC));
             retval = 1;
             goto cleanup;
         }
index e5ffdee295789318ff33238c8b26df5e0eae0b5c..da0c4cf0370638fb7d8d60ab31b2247c9e426a75 100755 (executable)
@@ -42,4 +42,10 @@ check_opt FLAGS f
 check_opt WARNS W
 check_opt OPTIMIZATIONS O
 
-for i in doc/*.1; do mandoc -Tlint -Wall "$i"; done
+# TODO: linux version
+if [ "$(uname -s)" != "Linux" ]; then
+    for i in doc/*.1;
+    do
+        mandoc -Tlint -Wall "$i";
+    done
+fi
index 775cf058846c178622679d2d62b8f5612eb13451..ed09a390c9717dc040891b7fe80c248c32d061a0 100755 (executable)
@@ -26,7 +26,6 @@ else
 fi
 
 echo -n "removing redundant files ... "
-# remove redundant stuff
 rm -f autocvarize.pl
 rm -f autocvarize-update.sh
 rm -f collect-precache.sh
@@ -48,7 +47,7 @@ ls server/w_*.qc | cat >> menu.src
 echo "complete"
 
 echo -n "creating zip archive ... "
-zip -r ../xonotic.zip * > /dev/null
+zip -r -9 ../xonotic.zip * > /dev/null
 echo "complete"
 
 popd > /dev/null
diff --git a/opts.c b/opts.c
index 4f6660e5c1abc8c86d0629e15f181d6143719755..3e7e2073b834539e1464b6dce0570d071be49a70 100644 (file)
--- a/opts.c
+++ b/opts.c
@@ -60,6 +60,7 @@ opts_cmd_t   opts; /* command line options */
 static void opts_setdefault(void) {
     memset(&opts, 0, sizeof(opts_cmd_t));
     OPTS_OPTION_BOOL(OPTION_CORRECTION) = true;
+    OPTS_OPTION_STR(OPTION_PROGSRC) = "progs.src";
 
     /* warnings */
     opts_set(opts.warn,  WARN_UNUSED_VARIABLE,           true);
index 977272a270e79064edff0bcd58298da11904b7f4..ee40cf5ff9a00f36fc7331ac1b09d144c4f0f452 100644 (file)
--- a/opts.def
+++ b/opts.def
     GMQCC_DEFINE_FLAG(ADD_INFO)
     GMQCC_DEFINE_FLAG(CORRECTION)
     GMQCC_DEFINE_FLAG(STATISTICS)
+    GMQCC_DEFINE_FLAG(PROGSRC)
 #endif
 
 /* some cleanup so we don't have to */