Changeset cffb044
- Timestamp:
- Apr 19, 2013, 3:23:18 AM (11 years ago)
- Parents:
- 487cc2b (diff), 0625919 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
r78b9503 ra223b6b 4 4 GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%)) 5 5 6 bin_PROGRAMS = b arnowl.bin6 bin_PROGRAMS = bin/barnowl 7 7 if ENABLE_ZCRYPT 8 8 bin_PROGRAMS += zcrypt … … 11 11 zcrypt_SOURCES = zcrypt.c filterproc.c 12 12 13 check_PROGRAMS = tester.bin13 check_PROGRAMS = bin/tester 14 14 dist_check_DATA = t 15 15 dist_check_SCRIPTS = runtests.sh 16 16 17 bin_SCRIPTS = barnowl17 noinst_SCRIPTS = barnowl 18 18 check_SCRIPTS = tester 19 19 20 barnowl tester: %: barnowl-wrapper.in %.binMakefile20 barnowl tester: %: barnowl-wrapper.in bin/% Makefile 21 21 sed \ 22 22 -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ … … 25 25 chmod +x $@ 26 26 27 b arnowl_bin_SOURCES = $(BASE_SRCS) \27 bin_barnowl_SOURCES = $(BASE_SRCS) \ 28 28 owl.h owl_perl.h \ 29 29 owl.c 30 nodist_b arnowl_bin_SOURCES = $(GEN_C) $(GEN_H)30 nodist_bin_barnowl_SOURCES = $(GEN_C) $(GEN_H) 31 31 32 32 dist_man_MANS = doc/barnowl.1 33 33 dist_doc_DATA = doc/intro.txt doc/advanced.txt 34 34 35 b arnowl_bin_LDADD = compat/libcompat.a libfaim/libfaim.a35 bin_barnowl_LDADD = compat/libcompat.a libfaim/libfaim.a 36 36 37 tester_bin_SOURCES = $(BASE_SRCS) \37 bin_tester_SOURCES = $(BASE_SRCS) \ 38 38 owl.h owl_perl.h \ 39 39 tester.c 40 nodist_ tester_bin_SOURCES = $(GEN_C) $(GEN_H)40 nodist_bin_tester_SOURCES = $(GEN_C) $(GEN_H) 41 41 42 tester_bin_LDADD = compat/libcompat.a libfaim/libfaim.a42 bin_tester_LDADD = compat/libcompat.a libfaim/libfaim.a 43 43 44 44 TESTS=runtests.sh … … 96 96 $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES) 97 97 98 do_transform = $(shell echo '$(1)' | sed '$(transform)') 99 install-exec-hook: 100 mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \ 101 $(DESTDIR)$(bindir)/$(call do_transform,barnowl) 102 103 uninstall-local: 104 rm -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl) 105 106 CLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS) $(check_SCRIPTS) 98 CLEANFILES = $(BUILT_SOURCES) $(noinst_SCRIPTS) $(check_SCRIPTS) 107 99 EXTRA_DIST = \ 108 100 autogen.sh \ -
barnowl-wrapper.in
r1dba5bd ra223b6b 1 1 #!/bin/sh 2 2 # This is a wrapper script to point BARNOWL_DATA_DIR at the source dir 3 # if we're running from a build tree. b arnowl.binis the actual built3 # if we're running from a build tree. bin/barnowl is the actual built 4 4 # binary. 5 5 6 EXE=" $0.bin"6 EXE="@abs_builddir@/bin/$(basename "$0")" 7 7 8 8 if test ! -x "$EXE"; then -
configure.ac
r487cc2b r0625919 1 1 dnl Process this file with autoconf to produce a configure script. 2 2 AC_INIT([BarnOwl],[1.10dev],[bug-barnowl@mit.edu]) 3 AM_INIT_AUTOMAKE([1.7.0 -Wall -Wno-portability foreign])3 AM_INIT_AUTOMAKE([1.7.0 foreign std-options -Wall -Wno-portability]) 4 4 AM_MAINTAINER_MODE([enable]) 5 5 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) -
owl.c
r4d9e311c r499224d 34 34 } owl_options; 35 35 36 void usage( void)36 void usage(FILE *file) 37 37 { 38 fprintf( stderr, "Barnowl version %s\n", OWL_VERSION_STRING);39 fprintf( stderr, "Usage: barnowl [-n] [-d] [-D] [-v] [-h] [-c <configfile>] [-s <confdir>] [-t <ttyname>]\n");40 fprintf( stderr, " -n,--no-subs don't load zephyr subscriptions\n");41 fprintf( stderr, " -d,--debug enable debugging\n");42 fprintf( stderr, " -v,--version print the Barnowl version number and exit\n");43 fprintf( stderr, " -h,--help print this help message\n");44 fprintf( stderr, " -s,--config-dir specify an alternate config dir (default ~/.owl)\n");45 fprintf( stderr, " -c,--config-file specify an alternate config file (default ~/.owl/init.pl)\n");46 fprintf( stderr, " -t,--tty set the tty name\n");38 fprintf(file, "Barnowl version %s\n", OWL_VERSION_STRING); 39 fprintf(file, "Usage: barnowl [-n] [-d] [-D] [-v] [-h] [-c <configfile>] [-s <confdir>] [-t <ttyname>]\n"); 40 fprintf(file, " -n,--no-subs don't load zephyr subscriptions\n"); 41 fprintf(file, " -d,--debug enable debugging\n"); 42 fprintf(file, " -v,--version print the Barnowl version number and exit\n"); 43 fprintf(file, " -h,--help print this help message\n"); 44 fprintf(file, " -s,--config-dir specify an alternate config dir (default ~/.owl)\n"); 45 fprintf(file, " -c,--config-file specify an alternate config file (default ~/.owl/init.pl)\n"); 46 fprintf(file, " -t,--tty set the tty name\n"); 47 47 } 48 48 … … 83 83 exit(0); 84 84 case 'h': 85 usage(stdout); 86 exit(0); 85 87 default: 86 usage( );88 usage(stderr); 87 89 exit(1); 88 90 } -
zcrypt.c
r6249a88f r8f335a8 16 16 #include <sys/wait.h> 17 17 #include <ctype.h> 18 #include <limits.h> 19 #include <getopt.h> 18 20 19 21 #include <config.h> … … 26 28 27 29 #include "filterproc.h" 30 31 #ifndef OWL_VERSION_STRING 32 #ifdef GIT_VERSION 33 #define stringify(x) __stringify(x) 34 #define __stringify(x) #x 35 #define OWL_VERSION_STRING stringify(GIT_VERSION) 36 #else 37 #define OWL_VERSION_STRING PACKAGE_VERSION 38 #endif 39 #endif /* !OWL_VERSION_STRING */ 28 40 29 41 /* Annotate functions in which the caller owns the return value and is … … 106 118 } 107 119 120 void usage(FILE *file, const char *progname) 121 { 122 fprintf(file, "Usage: %s [-Z|-D|-E|-R|-S] [-F Keyfile] [-c class] [-i instance]\n", progname); 123 fprintf(file, " [-advqtluon] [-s signature] [-f arg] [-m message]\n"); 124 fprintf(file, " One or more of class, instance, and keyfile must be specified.\n"); 125 } 126 108 127 int main(int argc, char *argv[]) 109 128 { … … 116 135 int mode = M_NONE; 117 136 118 charc;137 int c; 119 138 120 139 int messageflag = FALSE; … … 122 141 zoptions.flags = 0; 123 142 124 while ((c = getopt(argc, argv, "ZDERSF:c:i:advqtluons:f:m")) != (char)EOF) 143 enum { 144 OPT_VERSION = CHAR_MAX + 1, 145 OPT_HELP, 146 }; 147 static const struct option options[] = { 148 {"version", no_argument, NULL, OPT_VERSION}, 149 {"help", no_argument, NULL, OPT_HELP}, 150 {NULL, 0, NULL, 0} 151 }; 152 153 while ((c = getopt_long(argc, argv, "ZDERSF:c:i:advqtluons:f:m", options, NULL)) != -1) 125 154 { 126 155 switch(c) 127 156 { 157 case OPT_VERSION: 158 /* Version */ 159 printf("This is zcrypt version %s\n", OWL_VERSION_STRING); 160 exit(0); 161 case OPT_HELP: 162 /* Help */ 163 usage(stdout, argv[0]); 164 exit(0); 128 165 case 'Z': 129 166 /* Zephyr encrypt */ … … 257 294 if (error || !cryptspec) 258 295 { 259 fprintf(stderr, "Usage: %s [-Z|-D|-E|-R|-S] [-F Keyfile] [-c class] [-i instance]\n", argv[0]); 260 fprintf(stderr, " [-advqtluon] [-s signature] [-f arg] [-m message]\n"); 261 fprintf(stderr, " One or more of class, instance, and keyfile must be specified.\n"); 296 usage(stderr, argv[0]); 262 297 exit(1); 263 298 }
Note: See TracChangeset
for help on using the changeset viewer.