"Fossies" - the Fresh Open Source Software Archive

Member "modutils-2.4.27/genksyms/Makefile.in" (27 Oct 2003, 2337 Bytes) of package /linux/misc/old/modutils-2.4.27.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 VPATH	= @srcdir@
    2 srcdir	= @srcdir@
    3 include	../Makefile.common
    4 
    5 DEFS = -I. -I$(srcdir) -I$(srcdir)/../include -D_GNU_SOURCE @DEFS@ $(EXTRA_DEFS)
    6 
    7 %.o: %.c
    8 	$(CC) $(CFLAGS) $(DEFS) -c -o $@ $<
    9 
   10 ######################################################################
   11 
   12 all: genksyms
   13 
   14 genksyms: genksyms.o parse.o lex.o ../util/libutil.a
   15 	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
   16 
   17 parse.o: parse.c
   18 	$(CC) $(CFLAGS) $(PARSERCFLAGS) $(DEFS) -c -o $@ $<
   19 
   20 parse.c: parse.y
   21 	@echo "expect 6 shift/reduce conflicts and 5 reduce/reduce conflicts."
   22 	bison -o parse.c -dtv $^
   23 
   24 parse.h: parse.c
   25 
   26 lex.o: lex.c
   27 	$(CC) $(CFLAGS) $(PARSERCFLAGS) $(DEFS) -c -o $@ $<
   28 
   29 lex.c: lex.l parse.h
   30 	flex -o$@ -d $^
   31 
   32 crc32.tab: makecrc32.c
   33 	$(BUILDCC) $(BUILDCFLAGS) -o makecrc32 $^
   34 	./makecrc32 > $@.tmp
   35 	mv $@.tmp $@
   36 
   37 # Cannot rely on timestamps to detect if keywords.c needs to be regenerated or not.
   38 # Repository checkouts and patch can mangle the timestamps.
   39 # If keywords.gperf == keywords.gperf_shipped then use keywords.c_shipped, 
   40 # otherwise regenerate keywords.c using gperf and update the base files.
   41 
   42 keywords.c: keywords.gperf keywords.gperf_shipped keywords.c_shipped
   43 	@cmp $(filter %keywords.gperf_shipped,$^) $(filter %keywords.gperf,$^) && \
   44 	  cp $(filter %keywords.c_shipped,$^) $@ || \
   45 	  (set -ex; \
   46 	   gperf -a -C -E -g -H is_reserved_hash -k 1,3,$$ -N is_reserved_word -p -t $(filter %keywords.gperf,$^) > $@.tmp ; \
   47 	   rm -f $@; \
   48 	   sed -e '/Command-line/s/[^ ]*keywords.gperf/keywords.gperf/' $@.tmp > $@; \
   49 	   rm $@.tmp; \
   50 	   cp -f $(filter %keywords.gperf,$^) $(filter %keywords.gperf_shipped,$^); \
   51 	   cp -f $@ $(filter %keywords.c_shipped,$^); \
   52 	  )
   53 
   54 clean:
   55 	rm -f *.o *.tmp parse.output genksyms makecrc32 keywords.c
   56 
   57 realclean: clean
   58 	rm -f .depend parse.c parse.h lex.c crc32.tab
   59 
   60 	# rm -f keywords.c     gperf is not on all distributions
   61 
   62 distclean: realclean
   63 	rm -f Makefile
   64 
   65 install install-bin: all
   66 	$(MKDIR) $(DESTDIR)$(sbindir)
   67 	$(INSTALL) $(STRIP) genksyms $(DESTDIR)$(sbindir)
   68 
   69 # auto-generated dependancies are almost redundant once we add all the
   70 # rules to get the generated files built first.
   71 dep depend:
   72 
   73 genksyms.o: genksyms.c crc32.tab genksyms.h \
   74   $(srcdir)/../include/util.h $(srcdir)/../include/version.h
   75 lex.o: lex.c keywords.c genksyms.h parse.c $(srcdir)/../include/util.h
   76 parse.o: parse.c genksyms.h