Changeset 2418 for trunk/Makefile.am


Ignore:
Timestamp:
Jan 30, 2011, 4:43:08 AM (12 years ago)
Author:
Peter
Message:

fixes #655. add a helper script, gen-yat-pc.sh, that generates yat.pc. Variables are now kept implicit if possible, for example, exec_prefix=${prefix} and similar for includedir and libdir which are defined via ${prefix} and ${exec_prefix}, respectively. Added yat-pc-check that is called within maintainer-check to check that generation of yat.pc is correct with different combinations of arguments to configure and make.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r2417 r2418  
    4949## Some targets useful for the maintainer
    5050##
    51 MAINTAINER_CHECK_LOCAL = maintainer-check-local
     51MAINTAINER_CHECK_LOCAL = maintainer-check-local yat-pc-check
    5252RELEASE_LOCAL = ltversion-check
    5353
     
    7171  && cd test && $(MAKE) $(AM_MAKEFLAGS) prefix=$$mcl_install yat_check_yat_test
    7272
     73# check that yat.pc is correctly generated with different combinations
     74# of ./configure; make. This target is typically used within
     75# mainatiner-check; if used outside mainatiner-check, please not that
     76# the target callc configure possibly with other arguments, so it's
     77# probably a good a idea to re-configure afterwards.
     78yat-pc-check:
     79  $(SHELL) $(srcdir)/configure $(DISTCHECK_CONFIGURE_FLAGS) \
     80  && cd build_support \
     81  && rm yat.pc && make \
     82  && $(GREP) '^prefix=/usr/local' yat.pc \
     83  && $(GREP) '^exec_prefix=$${prefix}' yat.pc \
     84  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
     85  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
     86  && rm yat.pc && make prefix=foo \
     87  && $(GREP) '^prefix=foo' yat.pc \
     88  && $(GREP) '^exec_prefix=$${prefix}' yat.pc \
     89  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
     90  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
     91  && rm yat.pc && make prefix=foo exec_prefix=bar \
     92  && $(GREP) '^prefix=foo' yat.pc \
     93  && $(GREP) '^exec_prefix=bar' yat.pc \
     94  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
     95  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
     96  && rm yat.pc && make prefix=foo exec_prefix=bar libdir=baz includedir=quz\
     97  && $(GREP) '^prefix=foo' yat.pc \
     98  && $(GREP) '^exec_prefix=bar' yat.pc \
     99  && $(GREP) '^libdir=baz' yat.pc \
     100  && $(GREP) '^includedir=quz' yat.pc \
     101  && cd .. \
     102  && $(SHELL) $(srcdir)/configure $(DISTCHECK_CONFIGURE_FLAGS) exec_prefix=/t \
     103  && cd build_support \
     104  && rm yat.pc && make \
     105  && $(GREP) '^prefix=/usr/local' yat.pc \
     106  && $(GREP) '^exec_prefix=/t' yat.pc \
     107  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
     108  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
     109  && rm yat.pc && make prefix=foo \
     110  && $(GREP) '^prefix=foo' yat.pc \
     111  && $(GREP) '^exec_prefix=/t' yat.pc \
     112  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
     113  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
     114  && rm yat.pc && make prefix=foo exec_prefix=bar \
     115  && $(GREP) '^prefix=foo' yat.pc \
     116  && $(GREP) '^exec_prefix=bar' yat.pc \
     117  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
     118  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
     119  && rm yat.pc && make prefix=foo exec_prefix=bar libdir=baz includedir=quz\
     120  && $(GREP) '^prefix=foo' yat.pc \
     121  && $(GREP) '^exec_prefix=bar' yat.pc \
     122  && $(GREP) '^libdir=baz' yat.pc \
     123  && $(GREP) '^includedir=quz' yat.pc 
     124
     125
    73126include $(srcdir)/am/maintainer.am
Note: See TracChangeset for help on using the changeset viewer.