Changes in / [cffb044:487cc2b]
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
ra223b6b r78b9503 4 4 GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%)) 5 5 6 bin_PROGRAMS = b in/barnowl6 bin_PROGRAMS = barnowl.bin 7 7 if ENABLE_ZCRYPT 8 8 bin_PROGRAMS += zcrypt … … 11 11 zcrypt_SOURCES = zcrypt.c filterproc.c 12 12 13 check_PROGRAMS = bin/tester13 check_PROGRAMS = tester.bin 14 14 dist_check_DATA = t 15 15 dist_check_SCRIPTS = runtests.sh 16 16 17 noinst_SCRIPTS = barnowl17 bin_SCRIPTS = barnowl 18 18 check_SCRIPTS = tester 19 19 20 barnowl tester: %: barnowl-wrapper.in bin/%Makefile20 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 in_barnowl_SOURCES = $(BASE_SRCS) \27 barnowl_bin_SOURCES = $(BASE_SRCS) \ 28 28 owl.h owl_perl.h \ 29 29 owl.c 30 nodist_b in_barnowl_SOURCES = $(GEN_C) $(GEN_H)30 nodist_barnowl_bin_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 in_barnowl_LDADD = compat/libcompat.a libfaim/libfaim.a35 barnowl_bin_LDADD = compat/libcompat.a libfaim/libfaim.a 36 36 37 bin_tester_SOURCES = $(BASE_SRCS) \37 tester_bin_SOURCES = $(BASE_SRCS) \ 38 38 owl.h owl_perl.h \ 39 39 tester.c 40 nodist_ bin_tester_SOURCES = $(GEN_C) $(GEN_H)40 nodist_tester_bin_SOURCES = $(GEN_C) $(GEN_H) 41 41 42 bin_tester_LDADD = compat/libcompat.a libfaim/libfaim.a42 tester_bin_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 CLEANFILES = $(BUILT_SOURCES) $(noinst_SCRIPTS) $(check_SCRIPTS) 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) 99 107 EXTRA_DIST = \ 100 108 autogen.sh \ -
barnowl-wrapper.in
ra223b6b r1dba5bd 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 in/barnowlis the actual built3 # if we're running from a build tree. barnowl.bin is the actual built 4 4 # binary. 5 5 6 EXE=" @abs_builddir@/bin/$(basename "$0")"6 EXE="$0.bin" 7 7 8 8 if test ! -x "$EXE"; then -
configure.ac
r0625919 r487cc2b 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 foreign std-options -Wall -Wno-portability])3 AM_INIT_AUTOMAKE([1.7.0 -Wall -Wno-portability foreign]) 4 4 AM_MAINTAINER_MODE([enable]) 5 5 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) -
owl.c
r499224d re5210c9 34 34 } owl_options; 35 35 36 void usage( FILE *file)36 void usage(void) 37 37 { 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");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"); 47 47 } 48 48 … … 83 83 exit(0); 84 84 case 'h': 85 usage(stdout);86 exit(0);87 85 default: 88 usage( stderr);86 usage(); 89 87 exit(1); 90 88 } -
zcrypt.c
r8f335a8 r6249a88f 16 16 #include <sys/wait.h> 17 17 #include <ctype.h> 18 #include <limits.h>19 #include <getopt.h>20 18 21 19 #include <config.h> … … 28 26 29 27 #include "filterproc.h" 30 31 #ifndef OWL_VERSION_STRING32 #ifdef GIT_VERSION33 #define stringify(x) __stringify(x)34 #define __stringify(x) #x35 #define OWL_VERSION_STRING stringify(GIT_VERSION)36 #else37 #define OWL_VERSION_STRING PACKAGE_VERSION38 #endif39 #endif /* !OWL_VERSION_STRING */40 28 41 29 /* Annotate functions in which the caller owns the return value and is … … 118 106 } 119 107 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 127 108 int main(int argc, char *argv[]) 128 109 { … … 135 116 int mode = M_NONE; 136 117 137 intc;118 char c; 138 119 139 120 int messageflag = FALSE; … … 141 122 zoptions.flags = 0; 142 123 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) 124 while ((c = getopt(argc, argv, "ZDERSF:c:i:advqtluons:f:m")) != (char)EOF) 154 125 { 155 126 switch(c) 156 127 { 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);165 128 case 'Z': 166 129 /* Zephyr encrypt */ … … 294 257 if (error || !cryptspec) 295 258 { 296 usage(stderr, argv[0]); 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"); 297 262 exit(1); 298 263 }
Note: See TracChangeset
for help on using the changeset viewer.