other non-NetBSD platforms as well (though they may need ALL_TARGET tweaking): - apparently some versions of Linux/gcc combinations require the header file errno.h included in each file in order for it to link (otherwise, it will compile (!?) but bail out when linking) - set ALL_TARGET to LOWER_OPSYS this works for netbsd and linux, and should work for the other bsds at least. - set ALL_TARGET differently for IRIX - use CFLAGS instead of hard-coded ABI flags for IRIX 6 - some install-sh/install can not handle multiple files/directories at once. Newer bootstrapped versions can, but for systems that still have the older one we may as well split this for better compatibility.
142 lines
6.4 KiB
Text
142 lines
6.4 KiB
Text
$NetBSD: patch-aa,v 1.4 2004/06/10 22:42:42 jschauma Exp $
|
|
|
|
--- Makefile.orig 2000-07-17 16:07:03.000000000 -0400
|
|
+++ Makefile 2004-06-10 18:02:25.000000000 -0400
|
|
@@ -8,19 +8,19 @@
|
|
# after "=", this is parsed and rewritten by the configure script.
|
|
#
|
|
# # user-callable executable (plan)
|
|
-DIR=/usr/local/bin
|
|
+DIR=${PREFIX}/bin
|
|
# # auxiliary programs (pland, notifier, PS)
|
|
-LIB=/usr/local/lib
|
|
+LIB=${PREFIX}/libexec/plan
|
|
# # help file (plan.help)
|
|
-SBIN=/usr/local/lib
|
|
+SBIN=${LIB}
|
|
# # system programs (netplan)
|
|
-HELP=/usr/local/lib
|
|
+HELP=${PREFIX}/share/plan
|
|
# # netplan expects netplan.dir/ here
|
|
-NETPLANDIR=/usr/local/lib
|
|
+NETPLANDIR=${LIB}
|
|
# # unformatted nroff manpage (plan.[14])
|
|
-MAN=/usr/local/man
|
|
+MAN=${PREFIX}/man/man
|
|
# # formatted manpage (plan.[14])
|
|
-CATMAN=/usr/catman/local/cat
|
|
+CATMAN=${PREFIX}/man/cat
|
|
# # subdirectory in home dir, or empty
|
|
PLANRULE=
|
|
# # lockfile for plan, %d is uid
|
|
@@ -34,12 +34,12 @@
|
|
# # standard Unix compiler generator
|
|
YACC=yacc
|
|
# # numerical user ID of <nobody> account
|
|
-NOB_UID=60001
|
|
+NOB_UID=32767
|
|
# # default numerical group ID of <nobody>
|
|
-NOB_GID=60001
|
|
+NOB_GID=39
|
|
# # used by plan to pre-process holiday files,
|
|
# # plan will check if this file really exists
|
|
-CPP_PATH='/lib/cpp -P -I$(HELP)'
|
|
+CPP_PATH='/usr/bin/cpp -P -I$(HELP)'
|
|
# # by default, fork on startup? TRUE or FALSE
|
|
DOFORK=TRUE
|
|
# # switching to ISO8859-1
|
|
@@ -55,7 +55,7 @@
|
|
# # do NOT define -O2 on DEC OSF/1 machines!
|
|
DEBUG=-O2
|
|
# # what to do without make arguments
|
|
-DEFTARGET=help
|
|
+DEFTARGET=netbsd
|
|
#------------------------- end of configuration section ----------------------
|
|
|
|
OPT=$(DEBUG) $(PLANRULE) -DPLANLOCK=\"$(PLANLOCK)\" -DPLANDLOCK=\"$(PLANDLOCK)\"
|
|
@@ -102,7 +102,7 @@
|
|
|
|
SGI4_C =
|
|
SGI5_C = -DSYSV -DSVR4 -DDESKTOP
|
|
-SGI6_C = -n32 -mips3 -woff 1110,1167,1185 -DSYSV -DSVR4 -DDESKTOP -D_BSD_SIGNALS
|
|
+SGI6_C = ${CFLAGS} -woff 1110,1167,1185 -DSYSV -DSVR4 -DDESKTOP -D_BSD_SIGNALS
|
|
HP8_C = -Aa -I/usr/include/Motif1.1 -I/usr/include/X11R4 -I/usr/include\
|
|
-D_INCLUDE_HPUX_SOURCE -D_INCLUDE_POSIX_SOURCE\
|
|
-D_INCLUDE_XOPEN_SOURCE -DNOREGEX -DFIXMBAR -DRABBITS
|
|
@@ -140,8 +140,7 @@
|
|
USL_C = -DNOKILL0 -I/usr/X/include
|
|
BSDI_C = -DBSD -DRABBITS -I/usr/X11/include -DFLOCK -DNOREGEX -Dbsdi
|
|
BSDIG_C = -DBSD -DRABBITS -I/usr/X11/include -DFLOCK -DNOREGEX -Dbsdi -ansi
|
|
-NBSD_C = -ansi -I/usr/X11R6/include -DBSD -DRABBITS -DNOLOCK -DNOREGEX\
|
|
- -DNO_MOTIF
|
|
+NBSD_C = ${CFLAGS} -ansi -DBSD -DRABBITS -DNOLOCK -DNOREGEX
|
|
FBSD_C = -ansi -I/usr/X11R6/include -DBSD -DNOLOCK -DNOREGEX -DRABBITS\
|
|
-DSTDLIBMALLOC
|
|
LINUX_C = -I/usr/X11R6/include -D_POSIX_SOURCE -DNOLOCK -DLINUX
|
|
@@ -224,8 +223,8 @@
|
|
BSDI_L2 = -lc
|
|
BSDIG_L1= -L/usr/X11/lib -lXm -lXt -lX11
|
|
BSDIG_L2= -L/usr/X11/lib -lc
|
|
-NBSD_L1 = -L/usr/X11R6/lib -lXm -lXt -lX11
|
|
-NBSD_L2 = -L/usr/X11R6/lib -lc
|
|
+NBSD_L1 = ${LDFLAGS} -lXm -lXt -lX11
|
|
+NBSD_L2 = ${LDFLAGS} -lc
|
|
FBSD_L1 = -L/usr/X11R6/lib -lXm -lXt -lX11 -lXext -lSM -lICE -lXpm
|
|
FBSD_L2 = -L/usr/X11R6/lib -lc
|
|
LINUX_L1= -L/usr/X11R6/lib -L/usr/lib/X11R6/lib -lSM -lXm -lXt -lX11 -lXpm -lc -lXext -lSM -lICE -lX11
|
|
@@ -420,7 +419,7 @@
|
|
env CF="$(BSDIG_C)" L1F="$(BSDIG_L1)" L2F="$(BSDIG_L2)" MYCC=gcc make all
|
|
|
|
netbsd:
|
|
- env CF="$(NBSD_C)" L1F="$(NBSD_L1)" L2F="$(NBSD_L2)" MYCC=gcc $(MAKE) all
|
|
+ env CF="$(NBSD_C)" L1F="$(NBSD_L1)" L2F="$(NBSD_L2)" MYCC=${CC} $(MAKE) all
|
|
|
|
freebsd:
|
|
env CF="$(FBSD_C)" L1F="$(FBSD_L1)" L2F="$(FBSD_L2)" MYCC=${CC} make all
|
|
@@ -569,34 +568,18 @@
|
|
|
|
#---------------------------------------------------------------
|
|
install:
|
|
- -rm -f $(DESTDIR)$(DIR)/pland $(DESTDIR)$(DIR)/notifier $(DESTDIR)$(LIB)/netplan
|
|
- mkdir -p $(DESTDIR)$(DIR)
|
|
- cp plan $(DESTDIR)$(DIR)
|
|
- mkdir -p $(DESTDIR)$(LIB)
|
|
- cp pland notifier ../misc/plan_cal.ps ../language/* $(DESTDIR)$(LIB)
|
|
- mkdir -p $(DESTDIR)$(SBIN)
|
|
- cp netplan $(DESTDIR)$(SBIN)
|
|
- -(test x'$(JAPAN)' != x && cp ../misc/plan_calSJ.ps $(DESTDIR)$(LIB)) || exit 0
|
|
- mkdir -p $(DESTDIR)$(HELP)
|
|
- cp ../language/plan.help $(DESTDIR)$(HELP)
|
|
- -strip $(DESTDIR)$(DIR)/plan $(DESTDIR)$(LIB)/pland $(DESTDIR)$(LIB)/notifier $(DESTDIR)$(SBIN)/netplan
|
|
- -chmod 755 $(DESTDIR)$(DIR)/plan $(DESTDIR)$(LIB)/pland $(DESTDIR)$(LIB)/notifier $(DESTDIR)$(LIB)/netplan
|
|
- -chmod 644 $(DESTDIR)$(HELP)/plan.help $(DESTDIR)$(LIB)/plan_cal.ps $(DESTDIR)$(LIB)/plan.lang.*
|
|
- -(test x'$(JAPAN)' != x && chmod 644 $(DESTDIR)$(LIB)/plan_calSJ.ps) || exit 0
|
|
- mkdir -p $(DESTDIR)$(NETPLANDIR)/netplan.dir
|
|
- -chmod 700 $(DESTDIR)$(NETPLANDIR)/netplan.dir || exit 0
|
|
- -(test x'$(CATMAN)' != xNONE' -a -x "`which nroff`" && nroff -man ../misc/plan.1 >../misc/plan.1cat) || exit 0
|
|
- -(test x'$(CATMAN)' != xNONE' -a -x "`which nroff`" && nroff -man ../misc/plan.4 >../misc/plan.4cat) || exit 0
|
|
- -(test x'$(CATMAN)' != xNONE' -a -x "`which nroff`" && nroff -man ../misc/netplan.1 >../misc/netplan.1cat) || exit 0
|
|
- -(test x'$(MAN)' != xNONE' -a -d $(DESTDIR)$(MAN)1 && cp ../misc/plan.1 $(DESTDIR)$(MAN)1/plan) || exit 0
|
|
- -(test x'$(MAN)' != xNONE' -a -d $(DESTDIR)$(MAN)4 && cp ../misc/plan.4 $(DESTDIR)$(MAN)4/plan) || exit 0
|
|
- -(test x'$(MAN)' != xNONE' -a -d $(DESTDIR)$(MAN)1 && cp ../misc/netplan.1 $(DESTDIR)$(MAN)1/netplan) || exit 0
|
|
- -(test x'$(CATMAN)' != xNONE' -a -d $(DESTDIR)$(CATMAN)1 && cp ../misc/plan.1cat $(DESTDIR)$(CATMAN)1/plan) || exit 0
|
|
- -(test x'$(CATMAN)' != xNONE' -a -d $(DESTDIR)$(CATMAN)4 && cp ../misc/plan.4cat $(DESTDIR)$(CATMAN)4/plan) || exit 0
|
|
- -(test x'$(CATMAN)' != xNONE' -a -d $(DESTDIR)$(CATMAN)1 && cp ../misc/netplan.1cat $(DESTDIR)$(CATMAN)1/netplan) || exit 0
|
|
- -(test -f ${HOME}/.holiday || cp ../holiday/holiday_$(HOLIDAY) ${HOME}/.holiday) || exit 0
|
|
- -(test `uname` = IRIX -o `uname` = IRIX64 && mkdir $$HOME/.icons) || exit 0
|
|
- -(test `uname` = IRIX -o `uname` = IRIX64 && cp ../misc/Plan.icon $$HOME/.icons/Plan.icon) || exit 0
|
|
+ ${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(DIR)
|
|
+ ${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(LIB)
|
|
+ ${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(HELP)
|
|
+ ${BSD_INSTALL_PROGRAM} plan $(DESTDIR)$(DIR)
|
|
+ ${BSD_INSTALL_PROGRAM} pland notifier netplan $(DESTDIR)$(LIB)
|
|
+ ${BSD_INSTALL_DATA} ../misc/plan_cal.ps $(DESTDIR)$(LIB)
|
|
+ ${BSD_INSTALL_DATA} ../language/plan.* $(DESTDIR)$(HELP)
|
|
+ -mkdir -p $(DESTDIR)$(NETPLANDIR)/netplan.dir
|
|
+ -chmod 700 $(DESTDIR)$(NETPLANDIR)/netplan.dir
|
|
+ ${BSD_INSTALL_MAN} ../misc/plan.1 $(DESTDIR)$(MAN)1/plan.1
|
|
+ ${BSD_INSTALL_MAN} ../misc/plan.4 $(DESTDIR)$(MAN)4/plan.4
|
|
+ ${BSD_INSTALL_MAN} ../misc/netplan.1 $(DESTDIR)$(MAN)1/netplan.1
|
|
@echo ""
|
|
@echo "use ../holiday/* as templates for your ~/.holiday file"
|
|
|