File: Axe.rules

package info (click to toggle)
axe 6.1.2-15.1
  • links: PTS
  • area: non-free
  • in suites: squeeze, wheezy
  • size: 1,600 kB
  • ctags: 2,245
  • sloc: ansic: 20,644; sed: 361; tcl: 72; makefile: 43; sh: 21
file content (81 lines) | stat: -rw-r--r-- 3,294 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* Borrowed from R5 for R4 case */
/* if [ -d ] or [ ! -d ] causes make to fail, define this as - */
#ifndef DirFailPrefix
#define DirFailPrefix
#endif

#ifndef MakeDir
#define MakeDir(dir) DirFailPrefix@if [ -d dir ]; then set +x; \        @@\
		else (set -x; $(MKDIRHIER) dir); fi
#endif

/*
 * InstallNonExecFile - generate rules to install a data file
 */
#ifndef InstallNonExecFile
#define InstallNonExecFile(file,dest)                                   @@\
install:: file                                                          @@\
	MakeDir($(DESTDIR)dest)                                         @@\
	$(INSTALL) -c $(INSTDATFLAGS) file $(DESTDIR)dest
#endif /* InstallNonExecFile */
/* End of R5 borrowing */

#define MakeAxeDefaults(helpdir,interp)					@@\
all::	Axe.ad								@@\
									@@\
Axe.ad:	Axe.ad.sed version.h Axe.tmpl					@@\
	sed -e "s/VERSION/`sed -e 's/.*VERSION \(.*\)/\1/;q' <version.h`/" \@@\
	    -e "s+EXTENSION+interp+"				       \@@\
            -e "s+AXELIBDIR+helpdir+" <Axe.ad.sed >Axe.ad		@@\
									@@\
clean::									@@\
	$(RM) Axe.ad

#define MakeXaw3d(deps)							@@\
Xaw3d::									@@\
	$(RM) deps							@@\
	MakeDir(X11/Xaw3d/X11)                                		@@\
	@(set -x; cd X11/Xaw3d/X11; for i in Xaw Xaw3d; do \		@@\
		$(RM) $$i; \                                            @@\
		ln -s Xaw3dIncDir $$i; \				@@\
	done)

#define InstallAxeDefaults(class,dest)                                  @@\
install:: class.ad                                                      @@\
	MakeDir($(DESTDIR)dest)			                        @@\
	$(INSTALL) -c $(INSTAPPFLAGS) class.ad $(DESTDIR)dest/class

#define ComplaxeProgramTarget(program,bindest,mandest)			@@\
        PROGRAM = program                                               @@\
                                                                        @@\
all::									@@\
	@echo Making in .						@@\
									@@\
AllTarget(program)			                                @@\
									@@\
program: $(OBJS) $(DEPLIBS)                                             @@\
	RemoveTargetProgram($@)                                         @@\
	$(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
                                                                        @@\
InstallProgram(program,bindest)		                                @@\
InstallManPage(program,mandest)						@@\
DependTarget()                                                          @@\
LintTarget()                                                            @@\
                                                                        @@\
clean::                                                                 @@\
	$(RM) $(PROGRAM)						@@\
									@@\
extension::								@@\
	$(RM) $(EXTN_DEPS)						@@\
	$(MAKE)

#define InstallCoaxe(bindest)						@@\
InstallProgram(coaxe,bindest)						@@\
install::								@@\
	if [ -f $(DESTDIR)$(Bindir)/faxe ]; then set +x; \				@@\
	else (cd $(DESTDIR)$(Bindir); set -x; $(LN) coaxe faxe); fi			@@\
/** H. S. Teoh: disabled poleaxe -- coaxe.c seems to have only partial code
 ** that handles poleaxe; possibly dysfunctional.
	if [ -f $(DESTDIR)$(BINDIR)/poleaxe ]; then set +x; \			@@\
	else (cd $(DESTDIR)$(BINDIR); set -x; $(LN) coaxe poleaxe); fi
 **/