From: Dale Weiler Date: Thu, 12 Sep 2013 21:06:20 +0000 (-0400) Subject: Added -progsrc commandline switch to specify progs.src files of different names.... X-Git-Tag: 0.3.5~92 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=94e477e466bb368efd2a8bee056c94a1547616e1 Added -progsrc commandline switch to specify progs.src files of different names. Cleaned up xonotic export script, fixed check-doc on linux systems by disabling mandoc check. --- diff --git a/main.c b/main.c index 33bde55..fa245a9 100644 --- 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; } diff --git a/misc/check-doc.sh b/misc/check-doc.sh index e5ffdee..da0c4cf 100755 --- a/misc/check-doc.sh +++ b/misc/check-doc.sh @@ -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 diff --git a/misc/xonotic_export.sh b/misc/xonotic_export.sh index 775cf05..ed09a39 100755 --- a/misc/xonotic_export.sh +++ b/misc/xonotic_export.sh @@ -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 4f6660e..3e7e207 100644 --- 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); diff --git a/opts.def b/opts.def index 977272a..ee40cf5 100644 --- a/opts.def +++ b/opts.def @@ -129,6 +129,7 @@ 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 */