2 CFLAGS += -DD2U_UNICODE
\r
5 dos2unix.obj : $(SRCDIR)\dos2unix.c $(SRCDIR)\querycp.h $(SRCDIR)\common.h
\r
6 $(CC) $(CFLAGS) $(SRCDIR)\dos2unix.c
\r
8 unix2dos.obj : $(SRCDIR)\unix2dos.c $(SRCDIR)\querycp.h $(SRCDIR)\common.h
\r
9 $(CC) $(CFLAGS) $(SRCDIR)\unix2dos.c
\r
11 querycp.obj : $(SRCDIR)\querycp.c $(SRCDIR)\querycp.h
\r
12 $(CC) $(CFLAGS) $(SRCDIR)\querycp.c
\r
14 common.obj : $(SRCDIR)\common.c $(SRCDIR)\common.h
\r
15 $(CC) $(CFLAGS) $(SRCDIR)\common.c
\r
17 wildargv.obj : $(WATCOMSRC)\wildargv.c
\r
18 $(CC) $(CFLAGS) $(WATCOMSRC)\wildargv.c
\r
20 mac2unix.exe : dos2unix.exe
\r
21 copy /v dos2unix.exe mac2unix.exe
\r
23 unix2mac.exe : unix2dos.exe
\r
24 copy /v unix2dos.exe unix2mac.exe
\r
27 exec_prefix = $(prefix)
\r
28 bindir = $(exec_prefix)\bin
\r
29 datarootdir = $(prefix)\share
\r
30 datadir = $(datarootdir)
\r
32 docsubdir = $(PACKAGE)-$(DOS2UNIX_VERSION)
\r
34 docdir = $(datarootdir)\doc\$(docsubdir)
\r
35 INSTALL_OBJS_DOC = README.txt NEWS.txt ChangeLog.txt COPYING.txt TODO.txt BUGS.txt $(DOCFILES)
\r
38 $(prefix): .EXISTSONLY
\r
41 $(bindir): $(prefix) .EXISTSONLY
\r
44 $(datarootdir): $(prefix) .EXISTSONLY
\r
47 $(datarootdir)\doc: $(datarootdir) .EXISTSONLY
\r
50 $(docdir): $(datarootdir)\doc .EXISTSONLY
\r
53 # We only build and install the English manuals, because wildcards on
\r
54 # directory names are not supported in Windows CMD. Like man\*\man1\*.txt will
\r
55 # give a syntax error. It could be done with more scripting, but for simplicity
\r
56 # we stick to English.
\r
58 install: $(PROGRAMS) $(DOCFILES) $(bindir) $(docdir) .SYMBOLIC
\r
59 copy dos2unix.exe $(bindir)
\r
60 copy mac2unix.exe $(bindir)
\r
61 copy unix2dos.exe $(bindir)
\r
62 copy unix2mac.exe $(bindir)
\r
63 copy README.txt $(docdir)
\r
64 copy NEWS.txt $(docdir)
\r
65 copy ChangeLog.txt $(docdir)
\r
66 copy COPYING.txt $(docdir)
\r
67 copy TODO.txt $(docdir)
\r
68 copy BUGS.txt $(docdir)
\r
69 copy man\man1\dos2unix.txt $(docdir)
\r
70 copy man\man1\dos2unix.$(HTMLEXT) $(docdir)
\r
72 man\man1\dos2unix.txt : man\man1\dos2unix.pod
\r
75 man\man1\dos2unix.$(HTMLEXT) : man\man1\dos2unix.pod
\r
76 pod2html --title="$(PACKAGE) $(DOS2UNIX_VERSION) - DOS/MAC to UNIX and vice versa text file format converter" $< > $@
\r
78 TXTFILES = man\man1\$(PACKAGE).txt man\es\man1\$(PACKAGE).txt man\nl\man1\$(PACKAGE).txt
\r
79 HTMLFILES = man\man1\$(PACKAGE).$(HTMLEXT) man\es\man1\$(PACKAGE).$(HTMLEXT) man\nl\man1\$(PACKAGE).$(HTMLEXT)
\r
81 txt : $(TXTFILES) .SYMBOLIC
\r
83 html : $(HTMLFILES) .SYMBOLIC
\r
85 doc : $(DOCFILES) .SYMBOLIC
\r
87 uninstall: .SYMBOLIC
\r
88 -del $(bindir)\dos2unix.exe
\r
89 -del $(bindir)\mac2unix.exe
\r
90 -del $(bindir)\unix2dos.exe
\r
91 -del $(bindir)\unix2mac.exe
\r
92 -rmdir /s /q $(docdir)
\r
94 !ifndef VERSIONSUFFIX
\r
95 VERSIONSUFFIX = -bin
\r
99 ZIPFILE = $(PACKAGE)$(DOS2UNIX_VERSION)$(VERSIONSUFFIX).zip
\r
101 ZIPOBJ = bin\dos2unix.exe bin\mac2unix.exe bin\unix2dos.exe bin\unix2mac.exe share\doc\$(docsubdir) $(ZIPOBJ_EXTRA)
\r
103 CURDISK = $+ $(%cdrive): $-
\r
104 CURDIR = $+ $(%cwd) $-
\r
113 @%create $(DISTCMD)
\r
114 @%append $(DISTCMD) set PREFIX=$(prefix)
\r
115 @%append $(DISTCMD) set PREFIXDISK=%PREFIX:~0,2%
\r
116 @%append $(DISTCMD) %PREFIXDISK%
\r
117 @%append $(DISTCMD) cd $(prefix)
\r
118 @%append $(DISTCMD) unix2dos -k share\doc\$(docsubdir)\*.txt
\r
119 @%append $(DISTCMD) unix2dos -k share\doc\$(docsubdir)\*.$(HTMLEXT)
\r
120 @%append $(DISTCMD) zip -r $(ZIPFILE) $(ZIPOBJ)
\r
121 @%append $(DISTCMD) $(CURDISK)
\r
122 @%append $(DISTCMD) cd $(CURDIR)
\r
123 @%append $(DISTCMD) move $(prefix)\$(ZIPFILE) ..
\r
127 mostlyclean : .SYMBOLIC
\r
135 clean : mostlyclean .SYMBOLIC
\r
137 maintainer-clean : clean .SYMBOLIC
\r