Changeset 12743b9
- Timestamp:
- 06/07/09 01:25:24 (15 years ago)
- Branches:
- master
- Children:
- 1e551bd
- Parents:
- 44f59b8
- git-author:
- Mateusz Hromada <ruanda@…> (06/07/09 01:25:24)
- git-committer:
- Mateusz Hromada <ruanda@…> (06/07/09 01:25:24)
- Files:
-
- 1 deleted
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
auto/output/Makefile
r44f59b8 r12743b9 3 3 cat << EOF > Makefile 4 4 # Default target 5 .DEFAULT :all5 .DEFAULT_GOAL = all 6 6 7 7 SHELL = $SHELL … … 44 44 45 45 PROGRAMS = tok 46 46 47 TOK_OBJ_FILES = tok.o tok_cmdline.o 47 48 TOK_FLEX_FILES = tok.l 49 TOK_GGO_FILES = tok_cmdline.ggo 50 tok.o: tok_cmdline.h 51 48 52 CONFIG_FILES = src/config.h Makefile 49 53 … … 51 55 .SUFFIXES: .l .y .h .c .o 52 56 57 .INTERMEDIATE: \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES)) 58 .INTERMEDIATE: \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES)) 59 .INTERMEDIATE: \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES)) 60 53 61 .PHONY: all 54 62 all: \$(PROGRAMS) 55 #make -C app compile 63 56 64 57 65 .PHONY: help … … 70 78 \$(RM) \$(TOK_OBJ_FILES) 71 79 \$(RM) \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES)) 72 #make -C app clean 80 \$(RM) \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES)) 81 \$(RM) \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES)) 73 82 74 83 .PHONY: distclean … … 87 96 \$(CC) -c \$< -o \$@ \$(ALL_CFLAGS) 88 97 89 %. o: %.l98 %.c: %.l 90 99 \$(FLEX) -t \$< > \$@ 100 101 %.c: %.ggo 102 gengetopt --input $< --file-name \$(patsubst %.c,%,\$@) --conf-parser 103 104 %.h: %.ggo 105 gengetopt --input $< --file-name \$(patsubst %.h,%,\$@) --conf-parser 91 106 92 107 %: %.o -
src/tok.l
r635ee52 r12743b9 2 2 #include <stdio.h> 3 3 #include <locale.h> 4 #include " cmdline.h"4 #include "tok_cmdline.h" 5 5 6 6 int filepos=0; … … 56 56 %% 57 57 58 main(int argc, char** argv)58 int main(int argc, char** argv) 59 59 { 60 if (cmdline_parser(argc, argv, &args) != 0) exit(1);60 if (cmdline_parser(argc, argv, &args) != 0) return 1; 61 61 setlocale(LC_CTYPE,""); 62 62 setlocale(LC_COLLATE,""); 63 63 yylex(); 64 return 0; 64 65 } 65 66
Note: See TracChangeset
for help on using the changeset viewer.