mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 23:52:22 +00:00
Add an option to prevent the use of default paths.
Despair has things locked down such that running qfcc during a build fails due to lack of read access to /usr/local/lib. This is actually a good thing as accidentally hitting old includes/libs (when a file gets deleted in the tree) hides bugs. Thus, --no-default-paths to turn off default search paths.
This commit is contained in:
parent
add5440ad1
commit
c8163fc0de
9 changed files with 19 additions and 8 deletions
|
@ -5,7 +5,7 @@ pkgdatadir=@sharepath@/QF
|
|||
|
||||
QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
|
||||
QFCC=$(QFCC_DEP)
|
||||
QCFLAGS=-qq -g -Wall -Werror -Wno-integer-divide
|
||||
QCFLAGS=-qq -g -Wall -Werror -Wno-integer-divide --no-default-paths
|
||||
QCPPFLAGS=-I. -I$(srcdir) -I$(top_builddir)/ruamoko/include -I$(top_srcdir)/ruamoko/include -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
GZIP=if echo $@ | grep -q .gz; then gzip -f `basename $@ .gz`; if test -f `basename $@ .dat.gz`.sym; then gzip -f `basename $@ .dat.gz`.sym; fi; fi
|
||||
if HAVE_ZLIB
|
||||
|
|
|
@ -7,7 +7,7 @@ pkgdatadir=@sharepath@/id1
|
|||
|
||||
QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
|
||||
QFCC=$(QFCC_DEP)
|
||||
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide
|
||||
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide --no-default-paths
|
||||
QCPPFLAGS=-I. -I$(srcdir) -I$(top_builddir)/ruamoko/include -I$(top_srcdir)/ruamoko/include
|
||||
GZIP=if echo $@ | grep -q .gz; then gzip -f `basename $@ .gz`; if test -f `basename $@ .dat.gz`.sym; then gzip -f `basename $@ .dat.gz`.sym; fi; fi
|
||||
if HAVE_ZLIB
|
||||
|
|
|
@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS= foreign
|
|||
pkglibdir=$(libdir)/qfcc/lib
|
||||
|
||||
QFCC=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
|
||||
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide
|
||||
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide --no-default-paths
|
||||
QCPPFLAGS=$(INCLUDES)
|
||||
PAK=$(top_builddir)/tools/pak/pak$(EXEEXT)
|
||||
RANLIB=touch
|
||||
|
|
|
@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS= foreign
|
|||
pkglibdir=$(libdir)/qfcc/lib
|
||||
|
||||
QFCC=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
|
||||
QCFLAGS=-qq -g -Wall -Wno-integer-divide -Werror
|
||||
QCFLAGS=-qq -g -Wall -Wno-integer-divide -Werror --no-default-paths
|
||||
QCPPFLAGS=$(INCLUDES)
|
||||
PAK=$(top_builddir)/tools/pak/pak$(EXEEXT)
|
||||
RANLIB=touch
|
||||
|
|
|
@ -4,7 +4,7 @@ pkglibdir=$(libdir)/qfcc/lib
|
|||
|
||||
QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
|
||||
QFCC=$(QFCC_DEP)
|
||||
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide
|
||||
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide --no-default-paths
|
||||
QCPPFLAGS=$(INCLUDES)
|
||||
PAK=$(top_builddir)/tools/pak/pak$(EXEEXT)
|
||||
GZIP=if echo $@ | grep -q .gz; then gzip -f `basename $@ .gz`; if test -f `basename $@ .dat.gz`.sym; then gzip -f `basename $@ .dat.gz`.sym; fi; fi
|
||||
|
|
|
@ -101,6 +101,9 @@ object files built using the \fBpak\fP utility.
|
|||
Generate dependency info.
|
||||
Dependent on \*[cpp] version, so check \*[cpp]'s documentation.
|
||||
.TP
|
||||
.B \-\-no\-default\-paths
|
||||
Do not use default paths for include files or libraries.
|
||||
.TP
|
||||
.B \-N, \-\-notice OPTION,...
|
||||
Set notice options.
|
||||
See \fBNOTICE OPTIONS\fP for details.
|
||||
|
|
|
@ -76,6 +76,7 @@ typedef struct {
|
|||
qboolean single_cpp; // process progs.src into a series of
|
||||
// #include directives and then compile
|
||||
// that
|
||||
qboolean no_default_paths; // no default -I or -L
|
||||
qboolean save_temps; // save temporary files
|
||||
qboolean files_dat; // generate files.dat
|
||||
qboolean progdefs_h; // generate progdefs.h
|
||||
|
|
|
@ -65,6 +65,7 @@ enum {
|
|||
OPT_ADVANCED,
|
||||
OPT_CPP,
|
||||
OPT_INCLUDE,
|
||||
OPT_NO_DEFAULT_PATHS,
|
||||
OPT_PROGDEFS,
|
||||
OPT_QCCX_ESCAPES,
|
||||
OPT_TRADITIONAL,
|
||||
|
@ -78,6 +79,7 @@ static struct option const long_options[] = {
|
|||
{"files", no_argument, 0, 'F'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"include", required_argument, 0, OPT_INCLUDE},
|
||||
{"no-default-paths", no_argument, 0, OPT_NO_DEFAULT_PATHS},
|
||||
{"notice", required_argument, 0, 'N'},
|
||||
{"output-file", required_argument, 0, 'o'},
|
||||
{"progdefs", no_argument, 0, OPT_PROGDEFS},
|
||||
|
@ -537,6 +539,9 @@ DecodeArgs (int argc, char **argv)
|
|||
add_cpp_def (nva ("-M"));
|
||||
}
|
||||
break;
|
||||
case OPT_NO_DEFAULT_PATHS:
|
||||
options.no_default_paths = 1;
|
||||
break;
|
||||
default:
|
||||
usage (1);
|
||||
}
|
||||
|
@ -579,8 +584,10 @@ DecodeArgs (int argc, char **argv)
|
|||
add_cpp_def ("-D__VERSION6__=1");
|
||||
|
||||
// add the default paths
|
||||
if (!options.no_default_paths) {
|
||||
add_cpp_def (nva ("-I%s", QFCC_INCLUDE_PATH));
|
||||
linker_add_path (QFCC_LIB_PATH);
|
||||
}
|
||||
|
||||
if (options.verbosity >= 3)
|
||||
yydebug = 1;
|
||||
|
|
|
@ -6,7 +6,7 @@ INCLUDES= -I$(top_srcdir)/include $(QWAQ_INCS)
|
|||
|
||||
QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
|
||||
QFCC=$(top_builddir)/tools/qfcc/source/qfcc
|
||||
QCFLAGS=-qq -g -Werror --advanced
|
||||
QCFLAGS=-qq -g -Werror --advanced --no-default-paths
|
||||
|
||||
if BUILD_QWAQ
|
||||
qwaq=qwaq
|
||||
|
|
Loading…
Reference in a new issue