Skip to content

Commit

Permalink
ci: Build parallel port code on supported systems
Browse files Browse the repository at this point in the history
Build parallel port code on supported systems

Unsupported systems are:

  * MSVC compiler (does not support GNU style inline asm)
  * macos operating system (no macos implementations for preprocessor
    macros DO_PPI_READ, DO_PPI_WRITE, ppi_claim, ppi_release)

This means the CI can test

  * native Linux builds (yes, even for arm systems)
  * native Windows builds using mingw

Untested at this time are the BSDs.

Removes the dysfunctional Windows (since Windows XP)  parallel port code,
and has the buildsystems fail Windows builds if parallel port builds are
requested (HAVE_PARPORT or --enable-parport).

avrdudes#1874 (comment)
  • Loading branch information
ndim committed Aug 8, 2024
1 parent 23928d9 commit cd81b8b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 325 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
cmake
-D BUILD_DOC=1
-D DEBUG_CMAKE=1
-D HAVE_PARPORT=1
-D HAVE_LINUXGPIO=1
-D HAVE_LINUXSPI=1
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
Expand Down Expand Up @@ -169,6 +170,7 @@ jobs:
run: >-
cmake
-D DEBUG_CMAKE=1
-D HAVE_PARPORT=1
-D HAVE_LINUXGPIO=1
-D HAVE_LINUXSPI=1
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,14 @@ if(BUILD_DOC)
add_subdirectory(src/doc)
endif()

if(HAVE_PARPORT)
if(WIN32)
message(FATAL_ERROR "avrdude does not support parallel port on Windows")
elseif(APPLE)
message(FATAL_ERROR "avrdude does not support parallel port on Apple systems")
endif()
endif()

# =====================================
# Configuration
# =====================================
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ add_library(libavrdude
pindefs.c
ppi.c
ppi.h
ppiwin.c
serbb.h
serbb_posix.c
serbb_win32.c
Expand Down
1 change: 0 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ libavrdude_la_SOURCES = \
pindefs.c \
ppi.c \
ppi.h \
ppiwin.c \
serbb.h \
serbb_posix.c \
serbb_win32.c \
Expand Down
11 changes: 11 additions & 0 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,17 @@ AC_ARG_ENABLE(
esac],
[enabled_parport=no])

AS_IF([test "x$enabled_parport" = xyes], [dnl
case $target in
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
AC_MSG_ERROR([avrdude does not support parallel port on Windows])
;;
*-*-darwin*)
AC_MSG_ERROR([avrdude does not support parallel port on MacOS])
;;
esac
])

AC_ARG_ENABLE(
[linuxgpio],
AS_HELP_STRING([--enable-linuxgpio],
Expand Down
323 changes: 0 additions & 323 deletions src/ppiwin.c

This file was deleted.

0 comments on commit cd81b8b

Please sign in to comment.