Skip to content

Commit

Permalink
Disable default text=auto .gitattributes
Browse files Browse the repository at this point in the history
Fix makefile.vc and *.bat EOL-s according to .gitattributes.
Update .editorconfig to enforce CRLF for *.bat, makefile.vc
and config.h.vc*.
  • Loading branch information
mloskot committed Oct 10, 2018
1 parent 67ba5c6 commit 4a55d76
Show file tree
Hide file tree
Showing 25 changed files with 1,077 additions and 1,064 deletions.
16 changes: 14 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,27 @@ indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{sln,*proj,*proj.filters,rc,rc2}]
[{*.h.vc*}]
charset = utf-8
end_of_line = crlf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{bat,sln,*proj,*proj.filters,rc,rc2}]
charset = unset
end_of_line = crlf
insert_final_newline = unset
indent_style = unset
indent_size = unset

[{makefile.vc,nmake.opt}]
end_of_line = crlf
indent_style = tab

[{configure,configure.*,config.*,*.{sh,yml}}]
indent_size = 2

[{GNUmakefile,*.{in,opt,vc}}]
[{GNUmakefile,*.in}]
indent_style = tab
5 changes: 3 additions & 2 deletions .gitattributes.disabled → .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Do NOT set the default behavior, in case people don't have core.autocrlf set.
# This may lead to implicit modification of certain files (eg. test data) during git clone.
#* text=auto

# Declare files that will always have LF line endings on checkout.
*.m4 text eol=lf
Expand Down
30 changes: 15 additions & 15 deletions gdal/frmts/dods/makefile.vc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
OBJ = dodsdataset2.obj
GDAL_ROOT = ..\..
EXTRAFLAGS = -I$(DODS_DIR) -I$(DODS_DIR)\include -I$(DODS_DIR)\include\gnu -I$(DODS_DIR)\include\xdr -I$(DODS_DIR)\include\pthreads /DWIN32 /DWIN32_LEAN_AND_MEAN -DFRMT_dods $(DODS_FLAGS) /GR
!INCLUDE $(GDAL_ROOT)\nmake.opt
default: $(OBJ)
xcopy /D /Y *.obj ..\o
clean:
-del *.obj

OBJ = dodsdataset2.obj

GDAL_ROOT = ..\..

EXTRAFLAGS = -I$(DODS_DIR) -I$(DODS_DIR)\include -I$(DODS_DIR)\include\gnu -I$(DODS_DIR)\include\xdr -I$(DODS_DIR)\include\pthreads /DWIN32 /DWIN32_LEAN_AND_MEAN -DFRMT_dods $(DODS_FLAGS) /GR

!INCLUDE $(GDAL_ROOT)\nmake.opt

default: $(OBJ)
xcopy /D /Y *.obj ..\o

clean:
-del *.obj

108 changes: 54 additions & 54 deletions gdal/frmts/georaster/makefile.vc
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
GDAL_ROOT = ..\..
!INCLUDE $(GDAL_ROOT)\nmake.opt
OBJ = oci_wrapper.obj \
georaster_dataset.obj \
georaster_rasterband.obj \
georaster_wrapper.obj \
cpl_vsil_ocilob.obj
PLUGIN_DLL = gdal_GEOR.dll
!IFDEF JPEG_SUPPORTED
!IFDEF JPEG_EXTERNAL_LIB
JPEG_FLAGS = -I$(JPEGDIR) -DJPEG_SUPPORTED
!ELSE
JPEG_FLAGS = -I..\jpeg\libjpeg -DJPEG_SUPPORTED
JPEG_LIB = ..\jpeg\libjpeg\libjpeg.lib
!ENDIF
!ENDIF
!IFDEF ZLIB_EXTERNAL_LIB
ZLIB_FLAGS = $(ZLIB_INC)
!ELSE
ZLIB_FLAGS = -I..\zlib
ZLIB_LIB = ..\zlib\*.obj
!ENDIF
EXTRAFLAGS = $(OCI_INCLUDE) $(ZLIB_FLAGS) $(JPEG_FLAGS)
default: $(OBJ)
xcopy /D /Y *.obj ..\o
cd ..
fastread:
cl $(OPTFLAGS) fastread.c $(OCI_INCLUDE) $(OCI_LIB)
clean:
-del *.obj
-del *.dll
-del *.exp
-del *.lib
-del *.manifest
plugin: $(PLUGIN_DLL)
$(PLUGIN_DLL): $(OBJ)
link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(OCI_LIB) $(ZLIB_LIB) \
..\jpeg\vsidataio.obj $(JPEG_LIB)
if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2
plugin-install:
-mkdir $(PLUGINDIR)
$(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR)
GDAL_ROOT = ..\..

!INCLUDE $(GDAL_ROOT)\nmake.opt

OBJ = oci_wrapper.obj \
georaster_dataset.obj \
georaster_rasterband.obj \
georaster_wrapper.obj \
cpl_vsil_ocilob.obj

PLUGIN_DLL = gdal_GEOR.dll

!IFDEF JPEG_SUPPORTED
!IFDEF JPEG_EXTERNAL_LIB
JPEG_FLAGS = -I$(JPEGDIR) -DJPEG_SUPPORTED
!ELSE
JPEG_FLAGS = -I..\jpeg\libjpeg -DJPEG_SUPPORTED
JPEG_LIB = ..\jpeg\libjpeg\libjpeg.lib
!ENDIF
!ENDIF

!IFDEF ZLIB_EXTERNAL_LIB
ZLIB_FLAGS = $(ZLIB_INC)
!ELSE
ZLIB_FLAGS = -I..\zlib
ZLIB_LIB = ..\zlib\*.obj
!ENDIF

EXTRAFLAGS = $(OCI_INCLUDE) $(ZLIB_FLAGS) $(JPEG_FLAGS)

default: $(OBJ)
xcopy /D /Y *.obj ..\o
cd ..

fastread:
cl $(OPTFLAGS) fastread.c $(OCI_INCLUDE) $(OCI_LIB)

clean:
-del *.obj
-del *.dll
-del *.exp
-del *.lib
-del *.manifest

plugin: $(PLUGIN_DLL)

$(PLUGIN_DLL): $(OBJ)
link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(OCI_LIB) $(ZLIB_LIB) \
..\jpeg\vsidataio.obj $(JPEG_LIB)
if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2

plugin-install:
-mkdir $(PLUGINDIR)
$(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR)
26 changes: 13 additions & 13 deletions gdal/frmts/grib/degrib/degrib/makefile.vc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
OBJ = clock.obj degrib1.obj degrib2.obj inventory.obj metaname.obj myerror.obj filedatasource.obj memorydatasource.obj grib1tab.obj myutil.obj metaparse.obj weather.obj metaprint.obj grib2api.obj myassert.obj scan.obj tendian.obj hazard.obj
EXTRAFLAGS = -I ../g2clib $(SOFTWARNFLAGS)
GDAL_ROOT = ..\..\..\..
!INCLUDE $(GDAL_ROOT)\nmake.opt
default: $(OBJ)
xcopy /D /Y *.obj ..\..\..\o
clean:
-del *.obj
OBJ = clock.obj degrib1.obj degrib2.obj inventory.obj metaname.obj myerror.obj filedatasource.obj memorydatasource.obj grib1tab.obj myutil.obj metaparse.obj weather.obj metaprint.obj grib2api.obj myassert.obj scan.obj tendian.obj hazard.obj

EXTRAFLAGS = -I ../g2clib $(SOFTWARNFLAGS)

GDAL_ROOT = ..\..\..\..

!INCLUDE $(GDAL_ROOT)\nmake.opt

default: $(OBJ)
xcopy /D /Y *.obj ..\..\..\o

clean:
-del *.obj
30 changes: 15 additions & 15 deletions gdal/frmts/grib/degrib/g2clib/makefile.vc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
OBJ = gridtemplates.obj drstemplates.obj pdstemplates.obj gbits.obj g2_free.obj g2_unpack1.obj g2_unpack2.obj g2_unpack3.obj g2_unpack4.obj g2_unpack5.obj g2_unpack6.obj g2_unpack7.obj g2_info.obj g2_getfld.obj simunpack.obj comunpack.obj pack_gp.obj reduce.obj specunpack.obj rdieee.obj mkieee.obj int_power.obj simpack.obj compack.obj cmplxpack.obj misspack.obj pngunpack.obj dec_png.obj \
dec_jpeg2000.obj jpcunpack.obj
EXTRAFLAGS = -I ../../../png/libpng -I ../../../zlib -DUSE_PNG $(SOFTWARNFLAGS)
GDAL_ROOT = ..\..\..\..
!INCLUDE $(GDAL_ROOT)\nmake.opt
default: $(OBJ)
xcopy /D /Y *.obj ..\..\..\o
clean:
-del *.obj
OBJ = gridtemplates.obj drstemplates.obj pdstemplates.obj gbits.obj g2_free.obj g2_unpack1.obj g2_unpack2.obj g2_unpack3.obj g2_unpack4.obj g2_unpack5.obj g2_unpack6.obj g2_unpack7.obj g2_info.obj g2_getfld.obj simunpack.obj comunpack.obj pack_gp.obj reduce.obj specunpack.obj rdieee.obj mkieee.obj int_power.obj simpack.obj compack.obj cmplxpack.obj misspack.obj pngunpack.obj dec_png.obj \
dec_jpeg2000.obj jpcunpack.obj


EXTRAFLAGS = -I ../../../png/libpng -I ../../../zlib -DUSE_PNG $(SOFTWARNFLAGS)

GDAL_ROOT = ..\..\..\..

!INCLUDE $(GDAL_ROOT)\nmake.opt

default: $(OBJ)
xcopy /D /Y *.obj ..\..\..\o

clean:
-del *.obj
20 changes: 10 additions & 10 deletions gdal/frmts/grib/degrib/makefile.vc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
GDAL_ROOT = ..\..\..
!INCLUDE $(GDAL_ROOT)\nmake.opt
default:
cd degrib && $(MAKE) /f makefile.vc && cd ..
cd g2clib && $(MAKE) /f makefile.vc && cd ..
GDAL_ROOT = ..\..\..

!INCLUDE $(GDAL_ROOT)\nmake.opt

default:
cd degrib && $(MAKE) /f makefile.vc && cd ..
cd g2clib && $(MAKE) /f makefile.vc && cd ..



74 changes: 37 additions & 37 deletions gdal/frmts/grib/makefile.vc
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
OBJ = gribdataset.obj gribcreatecopy.obj
GDAL_ROOT = ..\..
!INCLUDE $(GDAL_ROOT)\nmake.opt
!IF DEFINED(PNG_LIB)
LINK_PNG = $(PNG_LIB)
!ELSE
LINK_PNG = ..\png\libpng\*.obj
!ENDIF
!IFDEF ZLIB_EXTERNAL_LIB
LINK_ZLIB = $(ZLIB_LIB)
!ELSE
LINK_ZLIB = ..\zlib\*.obj
!ENDIF
default: $(OBJ)
cd degrib && $(MAKE) /f makefile.vc && cd ..
xcopy /D /Y *.obj ..\o
clean:
-del *.obj
-del degrib\degrib\*.obj
-del degrib\g2clib\*.obj
-del *.dll
-del *.exp
-del *.lib
plugin: gdal_GRIB.dll
gdal_GRIB.dll: default
link /dll $(LDEBUG) /out:gdal_GRIB.dll \
$(OBJ) degrib\degrib\*.obj degrib\g2clib\*.obj \
$(GDAL_ROOT)/gdal_i.lib $(LINK_PNG) $(LINK_ZLIB)

OBJ = gribdataset.obj gribcreatecopy.obj

GDAL_ROOT = ..\..

!INCLUDE $(GDAL_ROOT)\nmake.opt

!IF DEFINED(PNG_LIB)
LINK_PNG = $(PNG_LIB)
!ELSE
LINK_PNG = ..\png\libpng\*.obj
!ENDIF

!IFDEF ZLIB_EXTERNAL_LIB
LINK_ZLIB = $(ZLIB_LIB)
!ELSE
LINK_ZLIB = ..\zlib\*.obj
!ENDIF

default: $(OBJ)
cd degrib && $(MAKE) /f makefile.vc && cd ..
xcopy /D /Y *.obj ..\o

clean:
-del *.obj
-del degrib\degrib\*.obj
-del degrib\g2clib\*.obj
-del *.dll
-del *.exp
-del *.lib

plugin: gdal_GRIB.dll

gdal_GRIB.dll: default
link /dll $(LDEBUG) /out:gdal_GRIB.dll \
$(OBJ) degrib\degrib\*.obj degrib\g2clib\*.obj \
$(GDAL_ROOT)/gdal_i.lib $(LINK_PNG) $(LINK_ZLIB)
40 changes: 20 additions & 20 deletions gdal/frmts/kmlsuperoverlay/makefile.vc
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
OBJ = kmlsuperoverlaydataset.obj
GDAL_ROOT = ..\..
!INCLUDE $(GDAL_ROOT)\nmake.opt
default: $(OBJ)
$(INSTALL) *.obj ..\o
all: default
clean:
-del *.obj
-del *.dll
-del *.exp
-del *.lib
-del *.manifest
-del *.pdb
-del *.ilk
OBJ = kmlsuperoverlaydataset.obj

GDAL_ROOT = ..\..

!INCLUDE $(GDAL_ROOT)\nmake.opt

default: $(OBJ)
$(INSTALL) *.obj ..\o

all: default

clean:
-del *.obj
-del *.dll
-del *.exp
-del *.lib
-del *.manifest
-del *.pdb
-del *.ilk

Loading

0 comments on commit 4a55d76

Please sign in to comment.