Fix "make dist" without "make all"
Fix prerequisites and Automake variables in the Makefiles, so that running "make dist" does not fail if the program is not built. When running help2man, have it execute "gengetopt --show-help" instead of the built program to obtain the help message.
This commit is contained in:
@@ -15,13 +15,11 @@ MAINTAINERCLEANFILES = $(BUILT_SOURCES) ccid-emulator.ggo $(dist_man1_MANS)
|
||||
|
||||
dist_man1_MANS = ccid-emulator.1
|
||||
|
||||
ccid_emulator_SOURCES = ccid.c usbstring.c usb.c scutil.c $(BUILT_SOURCES)
|
||||
ccid_emulator_SOURCES = cmdline.c ccid.c usbstring.c usb.c scutil.c
|
||||
ccid_emulator_LDADD = $(OPENSC_LIBS) $(OPENSSL_LIBS) $(PTHREAD_LIBS)
|
||||
ccid_emulator_CFLAGS = $(OPENSSL_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_srcdir)/src/OpenSC/src
|
||||
|
||||
|
||||
ccid-emulator.c: $(BUILT_SOURCES)
|
||||
|
||||
$(BUILT_SOURCES): ccid-emulator.ggo
|
||||
$(AM_V_GEN)$(GENGETOPT) --output-dir=$(srcdir) < $<
|
||||
|
||||
@@ -33,9 +31,11 @@ ccid-emulator.1:
|
||||
$(AM_V_GEN)$(HELP2MAN) \
|
||||
--output=$@ \
|
||||
--no-info \
|
||||
--no-discard-stderr \
|
||||
--source='$(PACKAGE_STRING)' \
|
||||
--help-option='--input=$< --set-package=$(PACKAGE) --set-version=$(VERSION) --show-help' \
|
||||
--version-string='$(PACKAGE) $(VERSION)' \
|
||||
$(builddir)/ccid-emulator
|
||||
$(GENGETOPT)
|
||||
|
||||
|
||||
bin_PROGRAMS = ccid-emulator
|
||||
@@ -43,5 +43,6 @@ bin_PROGRAMS = ccid-emulator
|
||||
noinst_HEADERS = \
|
||||
ccid.h \
|
||||
ccid-types.h \
|
||||
cmdline.h \
|
||||
scutil.h \
|
||||
usbstring.h
|
||||
|
||||
@@ -21,13 +21,14 @@ pcsc-relay.1:
|
||||
--no-info \
|
||||
--no-discard-stderr \
|
||||
--source='$(PACKAGE_STRING)' \
|
||||
--help-option='--input=$< --set-package=$(PACKAGE) --set-version=$(VERSION) --show-help' \
|
||||
--version-string='$(PACKAGE) $(VERSION)' \
|
||||
$(builddir)/pcsc-relay
|
||||
$(GENGETOPT)
|
||||
|
||||
|
||||
bin_PROGRAMS = pcsc-relay
|
||||
|
||||
pcsc_relay_SOURCES = pcsc-relay.c pcsc.c vpcd.c vpcd-driver.c opicc.c lnfc.c vicc.c lock.c $(BUILT_SOURCES)
|
||||
pcsc_relay_SOURCES = cmdline.c pcsc-relay.c pcsc.c vpcd.c vpcd-driver.c opicc.c lnfc.c vicc.c lock.c
|
||||
pcsc_relay_LDADD = $(PCSC_LIBS) $(LIBNFC_LIBS)
|
||||
pcsc_relay_CFLAGS = $(PCSC_CFLAGS) $(LIBNFC_CFLAGS)
|
||||
|
||||
@@ -35,9 +36,7 @@ if WIN32
|
||||
pcsc_relay_LDADD += -lws2_32
|
||||
endif
|
||||
|
||||
noinst_HEADERS = pcsc-relay.h vpcd.h lock.h
|
||||
|
||||
pcsc-relay.c: $(BUILT_SOURCES)
|
||||
noinst_HEADERS = cmdline.h pcsc-relay.h vpcd.h lock.h
|
||||
|
||||
$(BUILT_SOURCES): pcsc-relay.ggo
|
||||
$(AM_V_GEN)$(GENGETOPT) --output-dir=$(srcdir) < $<
|
||||
|
||||
@@ -37,7 +37,7 @@ $(builddir)/vicc: vicc.in Makefile
|
||||
$(AM_V_GEN)$(do_subst) < $(srcdir)/vicc.in > $(builddir)/vicc
|
||||
@chmod +x $(builddir)/vicc
|
||||
|
||||
vicc.1: vicc.in
|
||||
vicc.1: $(builddir)/vicc
|
||||
$(AM_V_GEN)$(HELP2MAN) \
|
||||
--no-discard-stderr \
|
||||
--output=$@ \
|
||||
|
||||
Reference in New Issue
Block a user