mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
Moved everything that is generated to the generated folder (#6580)
Moved everything that is generated to the generated folder merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
This commit is contained in:
parent
4a33bb2505
commit
c7282f11e2
5 changed files with 42 additions and 60 deletions
32
.gitignore
vendored
32
.gitignore
vendored
|
@ -1,34 +1,18 @@
|
||||||
*.[oa]
|
*.[oa]
|
||||||
*.deps
|
*.deps
|
||||||
src/cdxxx.c
|
|
||||||
src/debtab.c
|
|
||||||
src/dmd
|
src/dmd
|
||||||
src/dmd_frontend
|
src/ddmd/id.d
|
||||||
src/ddmd
|
src/ddmd/id.h
|
||||||
src/dmd.conf
|
|
||||||
src/elxxx.c
|
|
||||||
src/fltables.c
|
|
||||||
src/id.c
|
|
||||||
src/id.h
|
|
||||||
src/id.d
|
|
||||||
src/idgen
|
|
||||||
src/optab.c
|
|
||||||
src/optabgen
|
|
||||||
src/tytab.c
|
|
||||||
test/test_results
|
test/test_results
|
||||||
|
test/trace.def
|
||||||
|
test/trace.log
|
||||||
|
generated/
|
||||||
*.obj
|
*.obj
|
||||||
src/idgen.exe
|
|
||||||
src/dmd.exe
|
src/dmd.exe
|
||||||
src/dmd_frontend.exe
|
|
||||||
src/optabgen.exe
|
|
||||||
src/verstr.h
|
|
||||||
*.map
|
*.map
|
||||||
.DS_Store
|
-.DS_Store
|
||||||
trace.def
|
-trace.def
|
||||||
trace.log
|
-trace.log
|
||||||
Makefile
|
|
||||||
src/magicport/magicport
|
|
||||||
src/SYSCONFDIR.imp
|
|
||||||
|
|
||||||
# Visual Studio files
|
# Visual Studio files
|
||||||
*.exe
|
*.exe
|
||||||
|
|
|
@ -164,7 +164,7 @@ FILE *fdeb;
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
printf("OPTABGEN... generating files\n");
|
printf("OPTABGEN... generating files\n");
|
||||||
fdeb = fopen("ddmd/backend/debtab.c","w");
|
fdeb = fopen("debtab.c","w");
|
||||||
dooptab();
|
dooptab();
|
||||||
dotab();
|
dotab();
|
||||||
fltables();
|
fltables();
|
||||||
|
@ -234,7 +234,7 @@ void dooptab()
|
||||||
#undef X2
|
#undef X2
|
||||||
#undef X1
|
#undef X1
|
||||||
|
|
||||||
f = fopen("ddmd/backend/optab.c","w");
|
f = fopen("optab.c","w");
|
||||||
fprintf(f,"extern \"C\" { unsigned char optab1[OPMAX] =\n\t{");
|
fprintf(f,"extern \"C\" { unsigned char optab1[OPMAX] =\n\t{");
|
||||||
for (i = 0; i < OPMAX; i++)
|
for (i = 0; i < OPMAX; i++)
|
||||||
{ if ((i & 7) == 0)
|
{ if ((i & 7) == 0)
|
||||||
|
@ -597,14 +597,14 @@ void dotab()
|
||||||
fprintf(fdeb,"\t\"%s\",\n",debtab[i]);
|
fprintf(fdeb,"\t\"%s\",\n",debtab[i]);
|
||||||
fprintf(fdeb,"\t\"%s\"\n\t};\n",debtab[i]);
|
fprintf(fdeb,"\t\"%s\"\n\t};\n",debtab[i]);
|
||||||
|
|
||||||
f = fopen("ddmd/backend/cdxxx.c","w");
|
f = fopen("cdxxx.c","w");
|
||||||
fprintf(f,"code *(*cdxxx[OPMAX]) (elem *,regm_t *) = \n\t{\n");
|
fprintf(f,"code *(*cdxxx[OPMAX]) (elem *,regm_t *) = \n\t{\n");
|
||||||
for (i = 0; i < OPMAX - 1; i++)
|
for (i = 0; i < OPMAX - 1; i++)
|
||||||
fprintf(f,"\t%s,\n",cdxxx[i]);
|
fprintf(f,"\t%s,\n",cdxxx[i]);
|
||||||
fprintf(f,"\t%s\n\t};\n",cdxxx[i]);
|
fprintf(f,"\t%s\n\t};\n",cdxxx[i]);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
f = fopen("ddmd/backend/elxxx.c","w");
|
f = fopen("elxxx.c","w");
|
||||||
fprintf(f,"static elem *(*elxxx[OPMAX]) (elem *, goal_t) = \n\t{\n");
|
fprintf(f,"static elem *(*elxxx[OPMAX]) (elem *, goal_t) = \n\t{\n");
|
||||||
for (i = 0; i < OPMAX - 1; i++)
|
for (i = 0; i < OPMAX - 1; i++)
|
||||||
fprintf(f,"\t%s,\n",elxxx[i]);
|
fprintf(f,"\t%s,\n",elxxx[i]);
|
||||||
|
@ -727,7 +727,7 @@ void fltables()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
f = fopen("ddmd/backend/fltables.c","w");
|
f = fopen("fltables.c","w");
|
||||||
|
|
||||||
fprintf(f,"const char datafl[FLMAX] = \n\t{ ");
|
fprintf(f,"const char datafl[FLMAX] = \n\t{ ");
|
||||||
for (i = 0; i < FLMAX - 1; i++)
|
for (i = 0; i < FLMAX - 1; i++)
|
||||||
|
@ -981,7 +981,7 @@ void dotytab()
|
||||||
#undef T1
|
#undef T1
|
||||||
#undef T2
|
#undef T2
|
||||||
|
|
||||||
f = fopen("ddmd/backend/tytab.c","w");
|
f = fopen("tytab.c","w");
|
||||||
|
|
||||||
fprintf(f,"unsigned tytab[] =\n{ ");
|
fprintf(f,"unsigned tytab[] =\n{ ");
|
||||||
for (i = 0; i < arraysize(tytab); i++)
|
for (i = 0; i < arraysize(tytab); i++)
|
||||||
|
|
|
@ -378,7 +378,7 @@ int main()
|
||||||
auto fp = fopen("ddmd/id.h","wb");
|
auto fp = fopen("ddmd/id.h","wb");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
printf("can't open id.h\n");
|
printf("can't open ddmd/id.h\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,7 +406,7 @@ int main()
|
||||||
auto fp = fopen("ddmd/id.d","wb");
|
auto fp = fopen("ddmd/id.d","wb");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
printf("can't open id.d\n");
|
printf("can't open ddmd/id.d\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ endif
|
||||||
# Uniqe extra flags if necessary
|
# Uniqe extra flags if necessary
|
||||||
DMD_FLAGS := -I$(ROOT) -Wuninitialized
|
DMD_FLAGS := -I$(ROOT) -Wuninitialized
|
||||||
GLUE_FLAGS := -I$(ROOT) -I$(TK) -I$(C)
|
GLUE_FLAGS := -I$(ROOT) -I$(TK) -I$(C)
|
||||||
BACK_FLAGS := -I$(ROOT) -I$(TK) -I$(C) -I$D -DDMDV2=1
|
BACK_FLAGS := -I$(ROOT) -I$(TK) -I$(C) -I$G -I$D -DDMDV2=1
|
||||||
ROOT_FLAGS := -I$(ROOT)
|
ROOT_FLAGS := -I$(ROOT)
|
||||||
|
|
||||||
ifeq ($(OS), osx)
|
ifeq ($(OS), osx)
|
||||||
|
@ -365,7 +365,7 @@ endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -R $(GENERATED)
|
rm -R $(GENERATED)
|
||||||
rm -f $(idgen_output) $(optabgen_output) dmd
|
rm -f dmd $(idgen_output)
|
||||||
@[ ! -d ${PGO_DIR} ] || echo You should issue manually: rm -rf ${PGO_DIR}
|
@[ ! -d ${PGO_DIR} ] || echo You should issue manually: rm -rf ${PGO_DIR}
|
||||||
|
|
||||||
######## Download and install the last dmd buildable without dmd
|
######## Download and install the last dmd buildable without dmd
|
||||||
|
@ -401,8 +401,9 @@ dmd.conf:
|
||||||
$G/optabgen: $C/optabgen.c $C/cc.h $C/oper.h
|
$G/optabgen: $C/optabgen.c $C/cc.h $C/oper.h
|
||||||
$(HOST_CXX) $(CXXFLAGS) -I$(TK) $< -o $G/optabgen
|
$(HOST_CXX) $(CXXFLAGS) -I$(TK) $< -o $G/optabgen
|
||||||
$G/optabgen
|
$G/optabgen
|
||||||
|
mv $(optabgen_output) $G
|
||||||
|
|
||||||
optabgen_output = $(addprefix $C/, debtab.c optab.c cdxxx.c elxxx.c fltables.c tytab.c)
|
optabgen_output = debtab.c optab.c cdxxx.c elxxx.c fltables.c tytab.c
|
||||||
$(optabgen_output) : $G/optabgen
|
$(optabgen_output) : $G/optabgen
|
||||||
|
|
||||||
######## idgen generates some source
|
######## idgen generates some source
|
||||||
|
@ -447,17 +448,17 @@ $(G_OBJS) : $(optabgen_output)
|
||||||
# If additional flags are needed for a specific file add a _CXXFLAGS as a
|
# If additional flags are needed for a specific file add a _CXXFLAGS as a
|
||||||
# dependency to the object file and assign the appropriate content.
|
# dependency to the object file and assign the appropriate content.
|
||||||
|
|
||||||
cg.o: $C/fltables.c
|
cg.o: $G/fltables.c
|
||||||
|
|
||||||
cgcod.o: $C/cdxxx.c
|
cgcod.o: $G/cdxxx.c
|
||||||
|
|
||||||
cgelem.o: $C/elxxx.c
|
cgelem.o: $G/elxxx.c
|
||||||
|
|
||||||
debug.o: $C/debtab.c
|
debug.o: $G/debtab.c
|
||||||
|
|
||||||
iasm.o: CXXFLAGS += -fexceptions
|
iasm.o: CXXFLAGS += -fexceptions
|
||||||
|
|
||||||
var.o: $C/optab.c $C/tytab.c
|
var.o: $G/optab.c $G/tytab.c
|
||||||
|
|
||||||
|
|
||||||
# Generic rules for all source files
|
# Generic rules for all source files
|
||||||
|
|
|
@ -306,7 +306,7 @@ $(LIBS) : $(GBACKOBJ) $(OBJ_MSVC)
|
||||||
DMDFRONTENDEXE = $G\dmd_frontend.exe
|
DMDFRONTENDEXE = $G\dmd_frontend.exe
|
||||||
|
|
||||||
$(DMDFRONTENDEXE): $(FRONT_SRCS) $D\gluelayer.d $(ROOT_SRCS) $G\newdelete.obj $(STRING_IMPORT_FILES)
|
$(DMDFRONTENDEXE): $(FRONT_SRCS) $D\gluelayer.d $(ROOT_SRCS) $G\newdelete.obj $(STRING_IMPORT_FILES)
|
||||||
$(HOST_DC) $(DSRC) -of$@ -vtls -J$G -J../res -L/STACK:8388608 $(DFLAGS) $(FRONT_SRCS) gluelayer.d $(ROOT_SRCS) newdelete.obj -version=NoBackend
|
$(HOST_DC) $(DSRC) -of$@ -vtls -J$G -J../res -L/STACK:8388608 $(DFLAGS) $(FRONT_SRCS) $D/gluelayer.d $(ROOT_SRCS) newdelete.obj -version=NoBackend
|
||||||
copy $(DMDFRONTENDEXE) .
|
copy $(DMDFRONTENDEXE) .
|
||||||
|
|
||||||
$(TARGETEXE): $(DMD_SRCS) $(ROOT_SRCS) $G\newdelete.obj $(LIBS) $(STRING_IMPORT_FILES)
|
$(TARGETEXE): $(DMD_SRCS) $(ROOT_SRCS) $G\newdelete.obj $(LIBS) $(STRING_IMPORT_FILES)
|
||||||
|
@ -318,10 +318,8 @@ $(TARGETEXE): $(DMD_SRCS) $(ROOT_SRCS) $G\newdelete.obj $(LIBS) $(STRING_IMPORT_
|
||||||
clean:
|
clean:
|
||||||
$(RD) /s /q $(GEN)
|
$(RD) /s /q $(GEN)
|
||||||
$(DEL) $D\msgs.h $D\msgs.c
|
$(DEL) $D\msgs.h $D\msgs.c
|
||||||
$(DEL) $C\elxxx.c $C\cdxxx.c $C\optab.c $C\debtab.c $C\fltables.c $C\tytab.c
|
|
||||||
$(DEL) $D\id.h $D\id.d
|
|
||||||
$(DEL) optabgen.exe
|
$(DEL) optabgen.exe
|
||||||
$(DEL) $(TARGETEXE) $(DMDFRONTENDEXE) *.map *.obj
|
$(DEL) $(TARGETEXE) $(DMDFRONTENDEXE) $(IDGENOUTPUT) *.map *.obj
|
||||||
|
|
||||||
install: detab install-copy
|
install: detab install-copy
|
||||||
|
|
||||||
|
@ -388,18 +386,17 @@ checkwhitespace:
|
||||||
$(HOST_DC) -Df$@ $<
|
$(HOST_DC) -Df$@ $<
|
||||||
|
|
||||||
############################## Generated Source ##############################
|
############################## Generated Source ##############################
|
||||||
OPTABGENOUTPUT = $C\elxxx.c $C\cdxxx.c $C\optab.c $C\debtab.c $C\fltables.c $C\tytab.c
|
OPTABGENOUTPUT = $G\elxxx.c $G\cdxxx.c $G\optab.c $G\debtab.c $G\fltables.c $G\tytab.c
|
||||||
IDGENOUTPUT = $D\id.d $D\id.h
|
IDGENOUTPUT = $D/id.d $D/id.h
|
||||||
|
|
||||||
print:
|
|
||||||
@echo '$(IDGENOUTPUT)'
|
|
||||||
|
|
||||||
$(OPTABGENOUTPUT) : \
|
$(OPTABGENOUTPUT) : \
|
||||||
$C\cdef.h $C\cc.h $C\oper.h $C\ty.h $C\optabgen.c
|
$C\cdef.h $C\cc.h $C\oper.h $C\ty.h $C\optabgen.c
|
||||||
$(CC) -cpp -o$G\optabgen.exe $C\optabgen -DMARS -DDM_TARGET_CPU_X86=1 -I$(TK)
|
$(CC) -cpp -o$G\optabgen.exe $C\optabgen -DMARS -DDM_TARGET_CPU_X86=1 -I$(TK)
|
||||||
$G\optabgen.exe
|
$G\optabgen.exe
|
||||||
|
copy *.c "$G\"
|
||||||
|
$(DEL) *.c
|
||||||
|
|
||||||
ddmd/id.h ddmd/id.d : $D\idgen.d
|
$(IDGENOUTPUT) : $D\idgen.d
|
||||||
$(HOST_DC) -of$G\idgen $D\idgen.d
|
$(HOST_DC) -of$G\idgen $D\idgen.d
|
||||||
$G/idgen
|
$G/idgen
|
||||||
|
|
||||||
|
@ -420,7 +417,7 @@ $G/bcomplex.obj : $C\bcomplex.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\bcomplex
|
$(CC) -c -o$@ $(MFLAGS) $C\bcomplex
|
||||||
|
|
||||||
$G/aa.obj : $C\tinfo.h $C\aa.h $C\aa.c
|
$G/aa.obj : $C\tinfo.h $C\aa.h $C\aa.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D $C\aa
|
$(CC) -c -o$@ $(MFLAGS) -I$D -I$G $C\aa
|
||||||
|
|
||||||
$G/backconfig.obj : $C\backconfig.c
|
$G/backconfig.obj : $C\backconfig.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\backconfig
|
$(CC) -c -o$@ $(MFLAGS) $C\backconfig
|
||||||
|
@ -429,13 +426,13 @@ $G/blockopt.obj : $C\blockopt.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\blockopt
|
$(CC) -c -o$@ $(MFLAGS) $C\blockopt
|
||||||
|
|
||||||
$G/cg.obj : $C\cg.c
|
$G/cg.obj : $C\cg.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D $C\cg
|
$(CC) -c -o$@ $(MFLAGS) -I$D -I$G $C\cg
|
||||||
|
|
||||||
$G/cg87.obj : $C\cg87.c
|
$G/cg87.obj : $C\cg87.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\cg87
|
$(CC) -c -o$@ $(MFLAGS) $C\cg87
|
||||||
|
|
||||||
$G/cgcod.obj : $C\cgcod.c
|
$G/cgcod.obj : $C\cgcod.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D $C\cgcod
|
$(CC) -c -o$@ $(MFLAGS) -I$D -I$G $C\cgcod
|
||||||
|
|
||||||
$G/cgcs.obj : $C\cgcs.c
|
$G/cgcs.obj : $C\cgcs.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\cgcs
|
$(CC) -c -o$@ $(MFLAGS) $C\cgcs
|
||||||
|
@ -444,7 +441,7 @@ $G/cgcv.obj : $C\cgcv.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\cgcv
|
$(CC) -c -o$@ $(MFLAGS) $C\cgcv
|
||||||
|
|
||||||
$G/cgelem.obj : $C\rtlsym.h $C\cgelem.c
|
$G/cgelem.obj : $C\rtlsym.h $C\cgelem.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D $C\cgelem
|
$(CC) -c -o$@ $(MFLAGS) -I$D -I$G $C\cgelem
|
||||||
|
|
||||||
$G/cgen.obj : $C\rtlsym.h $C\cgen.c
|
$G/cgen.obj : $C\rtlsym.h $C\cgen.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\cgen
|
$(CC) -c -o$@ $(MFLAGS) $C\cgen
|
||||||
|
@ -489,7 +486,7 @@ $G/cv8.obj : $C\cv8.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\cv8
|
$(CC) -c -o$@ $(MFLAGS) $C\cv8
|
||||||
|
|
||||||
$G/debug.obj : $C\debug.c
|
$G/debug.obj : $C\debug.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D $C\debug
|
$(CC) -c -o$@ $(MFLAGS) -I$D -I$G $C\debug
|
||||||
|
|
||||||
$G/divcoeff.obj : $C\divcoeff.c
|
$G/divcoeff.obj : $C\divcoeff.c
|
||||||
$(CC) -c -o$@ -cpp -e $(DEBUG) $C\divcoeff
|
$(CC) -c -o$@ -cpp -e $(DEBUG) $C\divcoeff
|
||||||
|
@ -537,7 +534,7 @@ $G/md5.obj : $C\md5.h $C\md5.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\md5
|
$(CC) -c -o$@ $(MFLAGS) $C\md5
|
||||||
|
|
||||||
$G/mscoffobj.obj : $C\mscoff.h $C\mscoffobj.c
|
$G/mscoffobj.obj : $C\mscoff.h $C\mscoffobj.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D;$(ROOT) $C\mscoffobj
|
$(CC) -c -o$@ $(MFLAGS) -I$D;$(ROOT) -I$G $C\mscoffobj
|
||||||
|
|
||||||
$G/newman.obj : $(CH) $C\newman.c
|
$G/newman.obj : $(CH) $C\newman.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\newman
|
$(CC) -c -o$@ $(MFLAGS) $C\newman
|
||||||
|
@ -573,7 +570,7 @@ $G/ti_achar.obj : $C\tinfo.h $C\ti_achar.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D $C\ti_achar
|
$(CC) -c -o$@ $(MFLAGS) -I$D $C\ti_achar
|
||||||
|
|
||||||
$G/ti_pvoid.obj : $C\tinfo.h $C\ti_pvoid.c
|
$G/ti_pvoid.obj : $C\tinfo.h $C\ti_pvoid.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D $C\ti_pvoid
|
$(CC) -c -o$@ $(MFLAGS) -I$D -I$G $C\ti_pvoid
|
||||||
|
|
||||||
$G/type.obj : $C\type.c
|
$G/type.obj : $C\type.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\type
|
$(CC) -c -o$@ $(MFLAGS) $C\type
|
||||||
|
@ -581,11 +578,11 @@ $G/type.obj : $C\type.c
|
||||||
$G/util2.obj : $C\util2.c
|
$G/util2.obj : $C\util2.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) $C\util2
|
$(CC) -c -o$@ $(MFLAGS) $C\util2
|
||||||
|
|
||||||
$G/var.obj : $C\var.c $C\optab.c
|
$G/var.obj : $C\var.c $G\optab.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D -I$C $C\var
|
$(CC) -c -o$@ $(MFLAGS) -I$D -I$C -I$G $C\var
|
||||||
|
|
||||||
$G/varstats.obj : $C\varstats.c
|
$G/varstats.obj : $C\varstats.c
|
||||||
$(CC) -c -o$@ $(MFLAGS) -I$D $C\varstats
|
$(CC) -c -o$@ $(MFLAGS) -I$D -I$G $C\varstats
|
||||||
|
|
||||||
|
|
||||||
$G/tk.obj : $C\tk.c
|
$G/tk.obj : $C\tk.c
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue