Changeset 12743b9


Ignore:
Timestamp:
06/07/09 01:25:24 (15 years ago)
Author:
Mateusz Hromada <ruanda@…>
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)
Message:

Migration to new build system. All tools need to be moved to ./src
directory and checked whether can be compiled by Makefile.

  • tok moved and checked
Files:
1 deleted
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • auto/output/Makefile

    r44f59b8 r12743b9  
    33cat << EOF > Makefile 
    44# Default target 
    5 .DEFAULT: all 
     5.DEFAULT_GOAL = all 
    66 
    77SHELL = $SHELL 
     
    4444 
    4545PROGRAMS = tok 
     46 
    4647TOK_OBJ_FILES = tok.o tok_cmdline.o 
    4748TOK_FLEX_FILES = tok.l 
     49TOK_GGO_FILES = tok_cmdline.ggo 
     50tok.o: tok_cmdline.h 
     51 
    4852CONFIG_FILES = src/config.h Makefile 
    4953 
     
    5155.SUFFIXES: .l .y .h .c .o 
    5256 
     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 
    5361.PHONY: all 
    5462all: \$(PROGRAMS) 
    55         #make -C app compile 
     63 
    5664 
    5765.PHONY: help 
     
    7078        \$(RM) \$(TOK_OBJ_FILES) 
    7179        \$(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)) 
    7382 
    7483.PHONY: distclean 
     
    8796        \$(CC) -c \$< -o \$@ \$(ALL_CFLAGS) 
    8897 
    89 %.o: %.l 
     98%.c: %.l 
    9099        \$(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 
    91106 
    92107%: %.o 
  • src/tok.l

    r635ee52 r12743b9  
    22        #include <stdio.h> 
    33        #include <locale.h> 
    4         #include "cmdline.h" 
     4        #include "tok_cmdline.h" 
    55 
    66        int filepos=0; 
     
    5656%% 
    5757 
    58 main(int argc, char** argv) 
     58int main(int argc, char** argv) 
    5959{ 
    60   if (cmdline_parser(argc, argv, &args) != 0) exit(1); 
     60  if (cmdline_parser(argc, argv, &args) != 0) return 1; 
    6161  setlocale(LC_CTYPE,""); 
    6262  setlocale(LC_COLLATE,""); 
    6363  yylex(); 
     64  return 0; 
    6465} 
    6566 
Note: See TracChangeset for help on using the changeset viewer.