[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting target execution order
From: |
Noel Yap |
Subject: |
Re: Setting target execution order |
Date: |
Mon, 24 Nov 2003 19:22:07 -0500 |
Sorry, I tried going through this "stripped down" version but I just don't have
the time to cut through the extraneous stuff. Can you supply a /really/
stripped down version and provide explanations as to why creating prereq's for
the target "gzip" won't
work in your situation?
Thanks,
Noel
Matt Perry wrote:
>
> On Mon, 24 Nov 2003, Noel Yap wrote:
>
> > The usual way to do what you want /is/ to make all a prereq of gzip. I
> > don't understand your reasoning as to why this wouldn't work. Can you
> > elaborate with an example?
>
> Sure. I've attached a stripped down version of my makefile to the end of
> this message. Notice that I get different output depending on whether I
> use targets of basic, standard, or emacs. If gzip is specified as a
> target on the command line, I want it to execute last no matter what other
> targets have been specifed, if any. But gzip should be optional.
>
> - .\\
>
> archive = config-$(shell date +%Y%m%d).tar
> emacsarc = emacs-$(archive)
>
> basic = .bash_logout .bash_profile .bashrc .exrc .vimrc
> standard = .cvsrc .mailcap .screenrc .slrnrc .wgetrc .ytalkrc
> emacs = .emacs elisp
>
> .NOTPARALLEL:
> .PHONY: dummy clean
> dummy:
> @echo "Usage: make <target>"
>
> basic:
> tar -rf $(archive) $(basic)
>
> standard: basic emacs
> tar -rf $(archive) $(standard)
> tar -Af $(archive) $(emacsarc)
> rm -f $(emacsarc)
>
> emacs:
> tar -rf $(emacsarc) $(emacs)
>
> gzip:
> for file in $(archive) $(emacsarc) ; do \
> if [ -f $$file ]; then \
> gzip $$file ; \
> fi ; \
> done
>
> clean:
> $(RM) $(archive) $(emacsarc)
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-make
--
NOTICE: If received in error, please destroy and notify sender. Sender does
not waive confidentiality or privilege, and use is prohibited.
- Setting target execution order, Matt Perry, 2003/11/24
- Re: Setting target execution order, Noel Yap, 2003/11/24
- Re: Setting target execution order, Matt Perry, 2003/11/24
- Re: Setting target execution order,
Noel Yap <=
- Re: Setting target execution order, Paul D. Smith, 2003/11/24
- Re: Setting target execution order, Matt Perry, 2003/11/24
- Re: Setting target execution order, Noel Yap, 2003/11/24
- Re: Setting target execution order, Matt Perry, 2003/11/25
- Re: Setting target execution order, Noel Yap, 2003/11/25
- Re: Setting target execution order, Paul D. Smith, 2003/11/25
- Re: Setting target execution order, Matt Perry, 2003/11/25
- Re: Setting target execution order, Noel Yap, 2003/11/25
Re: Setting target execution order, Paul D. Smith, 2003/11/24