Explorar el Código

Re-enable optional pins target using CMake

Directly use `pdflatex` command if available to generate pins.pdf.
The pins target is not included in all.
Remove pins.pdf from repository.
pull/289/head
Jonathan GUILLOT hace 1 mes
padre
commit
dec4ae7118
Se han modificado 4 ficheros con 18 adiciones y 43 borrados
  1. +1
    -1
      CMakeLists.txt
  2. +17
    -20
      pins/CMakeLists.txt
  3. +0
    -22
      pins/Makefile
  4. BIN
      pins/pins.pdf

+ 1
- 1
CMakeLists.txt Ver fichero

@@ -15,7 +15,7 @@ set(WIRINGPI_VERSION_MINOR ${CMAKE_MATCH_2})
# Include subdirectories
add_subdirectory(devLib)
add_subdirectory(gpio)
#add_subdirectory(pins)
add_subdirectory(pins)
add_subdirectory(wiringPi)
#add_subdirectory(wiringPiD)



+ 17
- 20
pins/CMakeLists.txt Ver fichero

@@ -1,26 +1,23 @@
# CMakeLists.txt for pins
project(pins LANGUAGES NONE)

# Source file
set(SRC pins.tex)
find_program (PDFLATEX pdflatex)

# Add custom target to generate PDF
add_custom_target(pins_pdf
COMMAND latex ${SRC}
COMMAND dvipdf ${SRC:.tex=.dvi}
COMMENT "Generating PDF"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
if(NOT PDFLATEX)
message(WARNING "Disabling pins target as pdflatex not found!")
else()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pins.pdf
COMMAND ${PDFLATEX} -interaction=nonstopmode -halt-on-error ${CMAKE_CURRENT_SOURCE_DIR}/pins.tex
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating pins.pdf"
)

# Add clean target
add_custom_target(clean_pins
COMMAND rm -f *.dvi *.aux *.log *.ps *.toc *.bak *~
COMMENT "Cleaning pins"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
# Add custom target to generate PDF
add_custom_target(pins
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pins.pdf
)

# Add dependencies
add_dependencies(pins_pdf clean_pins)

# Install PDF
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pins.pdf DESTINATION share/pins)
# Install PDF
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pins.pdf DESTINATION share/pins)
endif()

+ 0
- 22
pins/Makefile Ver fichero

@@ -1,22 +0,0 @@

SRC = pins.tex

ifneq ($V,1)
Q ?= @
endif


all: ${SRC}
$Q echo Generating DVI
$Q latex pins.tex

pins.dvi: pins.tex
$Q latex pins.tex

pdf: pins.dvi
$Q dvipdf pins.dvi


.PHONY: clean
clean:
$Q rm -f *.dvi *.aux *.log *.ps *.toc *.bak *~

BIN
pins/pins.pdf Ver fichero


Cargando…
Cancelar
Guardar