Changeset 1925


Ignore:
Timestamp:
Sep 17, 2012, 2:30:56 PM (7 years ago)
Author:
sam
Message:

build: "make generated" now recursively rebuilds all flex/bison targets.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/autotools/common.am

    r1924 r1925  
     1
     2lol_recursive_rule = \
     3        @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \
     4            ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $(patsubst %-recursive, %, $@)) || exit 1; \
     5          done; \
     6        fi
    17
    28bench: bench-recursive
    39bench-recursive:
    4         @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \
    5             ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) bench) || exit 1; \
     10        $(lol_recursive_rule)
     11
     12lolcheck: lolcheck-recursive
     13lolcheck-recursive:
     14        $(lol_recursive_rule)
     15
     16
     17#
     18# Flex and Bison files build rule
     19#
     20
     21generated: generated-recursive
     22generated-recursive:
     23        $(lol_recursive_rule)
     24        @if test -n "$(filter %-scanner.l, $(EXTRA_DIST))"; then \
     25          echo $(MKDIR_P) generated; \
     26          $(MKDIR_P) generated; \
     27          rm -f generated/[a-zA-Z]*; \
     28          for scanner in $(patsubst %-scanner.l, %, $(filter %-scanner.l, $(EXTRA_DIST))); do \
     29            b="`basename $$scanner`"; \
     30            echo flex -o "generated/$$b-scanner.cpp" "$$scanner-scanner.l"; \
     31            flex -o "generated/$$b-scanner.cpp" "$$scanner-scanner.l"; \
     32          done; \
     33          for parser in $(patsubst %-parser.y, %, $(filter %-parser.y, $(EXTRA_DIST))); do \
     34            b="`basename $$parser`"; \
     35            echo bison -o "generated/$$b-parser.cpp" --defines="generated/$$b-parser.h" -d -b "generated/$$b" "$$parser-parser.y"; \
     36            bison -o "generated/$$b-parser.cpp" --defines="generated/$$b-parser.h" -d -b "generated/$$b" "$$parser-parser.y"; \
    637          done; \
    738        fi
    839
    9 lolcheck: lolcheck-recursive
    10 lolcheck-recursive:
    11         @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \
    12             ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) lolcheck) || exit 1; \
    13           done; \
    14         fi
    1540
    16 .PHONY: lolcheck bench
     41#
     42# .lolfx build rule
     43#
    1744
    1845SUFFIXES = .lolfx
     
    2451        | $(CXXCOMPILE) -xc++ -c - -o $@
    2552
     53
     54#
     55# Additional rules
     56#
     57
     58.PHONY: bench lolcheck generated
     59
  • trunk/src/Makefile.am

    r1924 r1925  
    7070    debug/record.cpp debug/record.h debug/stats.cpp debug/stats.h
    7171liblol_a_CPPFLAGS = @LOL_CFLAGS@ -Ibullet
    72 
    73 if TRUE
    74 generated: .FORCE
    75         $(MKDIR_P) generated
    76         rm -f generated/[a-zA-Z]*
    77         flex -o generated/easymesh-scanner.cpp easymesh/easymesh-scanner.l
    78         bison -o generated/easymesh-parser.cpp --defines=generated/easymesh-parser.h \
    79               -d -b generated/easymesh easymesh/easymesh-parser.y
    80         flex -o generated/lolfx-scanner.cpp gpu/lolfx-scanner.l
    81         bison -o generated/lolfx-parser.cpp --defines=generated/lolfx-parser.h \
    82               -d -b generated/lolfx gpu/lolfx-parser.y
    83 .FORCE:
    84 endif
    8572
    8673EXTRA_DIST = easymesh/easymesh-scanner.l easymesh/easymesh-parser.y \
Note: See TracChangeset for help on using the changeset viewer.