Maxing the x-axis of the time domain plot represent the actual time of the samples...
[debian/gnuradio] / Makefile.gen.gen
1 # -*- Makefile -*-
2 #
3 # Copyright 2009 Free Software Foundation, Inc.
4
5 # This file is part of GNU Radio
6
7 # GNU Radio is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
10 # any later version.
11
12 # GNU Radio is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Radio; see the file COPYING.  If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street,
20 # Boston, MA 02110-1301, USA.
21
22
23 ## ----------------------------------------------------------------
24 ## Special rule for regenerating the local Makefile.gen
25 ##
26 ## Define the variable 'makefile_gen_gen_command' to be the command
27 ## that creates $(srcdir)/Makefile.gen .  The rule below will check to
28 ## make sure that it can create the generated file, and if not exits
29 ## with an error -1.
30 ##
31
32 STAMPS += $(DEPDIR)/Makefile.gen-generate-generate-*
33
34 generate-makefile $(srcdir)/Makefile.gen:
35 ## parallel make protection; can't hurt
36         @trap 'rm -rf $(DEPDIR)/Makefile.gen-generate-*' 1 2 13 15; \
37         if mkdir $(DEPDIR)/Makefile.gen-generate-lock 2>/dev/null; then \
38 ## This code is being executed by the first process.
39                 rm -f $(DEPDIR)/Makefile.gen-generate-stamp; \
40                 rm -f $(DEPDIR)/Makefile.gen-generate-tmp; \
41                 touch $(DEPDIR)/Makefile.gen-generate-tmp; \
42 ## recreate $(srcdir)/Makefile.gen only if ...
43                 do_recreate=0; \
44                 if test -f $(srcdir)/Makefile.gen; then \
45 ## the file exists and can be removed; or ...
46                         if $(RM) $(srcdir)/Makefile.gen 2>/dev/null; then \
47                                 do_recreate=1; \
48                         fi; \
49                 else \
50 ## the file doesn't exist, but can be created (e.g., by touching it).
51                         if touch $(srcdir)/Makefile.gen 2>/dev/null; then \
52                                 do_recreate=1; \
53                         fi; \
54                 fi; \
55                 if test "$$do_recreate" == "1"; then \
56                         echo "Regenerating $(srcdir)/Makefile.gen"; \
57                         $(makefile_gen_gen_command); \
58                 else \
59                         echo "Cannot recreate $(srcdir)/Makefile.gen because the directory or file is write-protected."; \
60                         exit -1; \
61                 fi; \
62                 mv -f $(DEPDIR)/Makefile.gen-generate-tmp $(DEPDIR)/Makefile.gen-generate-stamp; \
63                 rmdir $(DEPDIR)/Makefile.gen-generate-lock; \
64         else \
65 ## This code is being executed by the follower processes.
66 ## Wait until the first process is done.
67                 while test -d $(DEPDIR)/Makefile.gen-generate-lock; do sleep 1; done; \
68 ## Succeed if and only if the first process succeeded.
69                 test -f $(DEPDIR)/Makefile.gen-generate-stamp; exit $$?; \
70         fi;