Skip to content

Commit

Permalink
shared: update Makefile
Browse files Browse the repository at this point in the history
and related packages
  • Loading branch information
tsl0922 committed Jul 23, 2023
1 parent 05ba5b3 commit be370d7
Show file tree
Hide file tree
Showing 673 changed files with 2,263 additions and 2,169 deletions.
4 changes: 2 additions & 2 deletions trunk/configure
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ mkdir -p $ROOTDIR/images
ln -sf vendors/Ralink/config.arch config.arch
cp -fL "$kernel_cf" "$kernel_tf"
cp -fL "$busybox_cf" "$busybox_tf"
cp -fL "$board_mk" "$ROOTDIR/user/shared/board.mk"
cp -fL "$board_h" "$ROOTDIR/user/shared/include/ralink_board.h"
cp -fL "$board_mk" "$ROOTDIR/user/board.mk"
cp -fL "$board_h" "$ROOTDIR/user/shared/src/include/ralink_board.h"
############################# SMP #####################################
if [ -n "$CONFIG_SMP" ] ; then
func_enable_busybox_param "CONFIG_FEATURE_TOP_SMP_CPU"
Expand Down
1 change: 1 addition & 0 deletions trunk/user/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
board.mk
802.1x/rt2860apd
dns2tcp/dns2tcp/dns2tcp
dropbear/dropbearmulti
Expand Down
281 changes: 9 additions & 272 deletions trunk/user/LPRng/Makefile
Original file line number Diff line number Diff line change
@@ -1,278 +1,15 @@
###########################################################################
# LPRng - An Extended Print Spooler System
#
# Copyright 1988-2001 Patrick Powell, San Diego, CA
# [email protected]
# See LICENSE for conditions of use.
#
###########################################################################
# MODULE: Makefile.in
# PURPOSE: top level Makefile for LPD Software
# $Id: Makefile,v 1.1.1.1 2008/10/15 03:28:09 james26_jang Exp $
##########################################################################
include $(ROOTDIR)/rules.mk

#**************###########**************
# You must use ANSI C and GNU Make!
#***************************************
PKG_NAME:=LPRng
PKG_JOBS:=-j1

PACKAGE=LPRng
VERSION=3.8.22
SRC=.
include $(INCLUDE_DIR)/package.mk

INSTALL=/usr/bin/install -c
TARGET_CFLAGS += -I$(STAGING_DIR)/include/shared
TARGET_LDFLAGS += -L$(STAGING_DIR)/lib -lshared

# prefix
prefix=/usr/local
# exec prefix
exec_prefix=${prefix}
# for binaries
bindir=${exec_prefix}/bin
# for admin type of binaries
sbindir=${exec_prefix}/sbin
# for the filters
libexecdir=${exec_prefix}/libexec
# for the configuration stuff
sysconfdir=${prefix}/etc
# for the man pages
mandir=${prefix}/man
# top build directory
top_builddir=.

LPD_PERMS_PATH=\"${sysconfdir}/lpd/lpd.perms\"
LPD_CONF_PATH=\"${sysconfdir}/lpd/lpd.conf\"
PRINTCAP_PATH=\"${sysconfdir}/printcap\"
LPD_PATH=\"${sbindir}/lpd\"
#SHELL="/bin/sh"
LOCKFILE=\"/var/run/lpd\"
PSHOWALL="-ax"
FILTER_DIR=${libexecdir}/filters
LOCALEDIR=${prefix}/share/locale
INIT=
USE_NLS=no
LIBTOOL=$(SHELL) $(top_builddir)/libtool

#=============================================================================
# List the directories you want to generate:
# DIRS for all, clean, etc.
# ALLDIRS for other such as documentation
#=============================================================================

DIRS= UTILS src po man
INSTALLDIRS= UTILS src po man
FILES=./postinstall ./preremove ./postremove ./lpd.conf
ALLDIRS= ${DIRS} ${SRC}/TESTSUPPORT ${SRC}/DOCS
ROMFSDIR = $(ROOTDIR)/romfs

###############################################################################

all: ${DIRS} ${FILES}

SCRIPTS=init.freebsd init.linux init.redhat init.linuxsb init.solaris ltmain postinstall.freebsd postinstall.generic postinstall.linux postinstall.solaris postremove.generic postremove.solaris preinstall.solaris preremove.freebsd preremove.generic preremove.linux preremove.solaris

$(SCRIPTS): header
cat header ${SRC}/$@.sh >$@
chmod 755 $@;

header: Makefile
@echo "#!/bin/sh" >$@
@echo PREFIX=$(prefix) >>$@
@echo LPD_PATH=$(LPD_PATH) >>$@
@echo INSTALL=\"$(INSTALL)\" >>$@
@echo LPD_PERMS_PATH=$(LPD_PERMS_PATH) >>$@
@echo LPD_CONF_PATH=$(LPD_CONF_PATH) >>$@
@echo PRINTCAP_PATH=$(PRINTCAP_PATH) >>$@
@echo SYSCONFDIR=$(sysconfdir) >>$@
@echo SBINDIR=$(sbindir) >>$@
@echo FILTER_DIR=$(FILTER_DIR) >>$@
@echo LOCKFILE=$(LOCKFILE) >>$@
@echo PSHOWALL=\"$(PSHOWALL)\" >>$@
@echo "VERSION=$(VERSION)" >>$@
@echo "INIT=$(INIT)" >>$@
@echo "MANDIR=$(mandir)" >>$@

./postinstall: $(SCRIPTS) Makefile
OSNAME=elf; case "elf" in \
*linux* ) OSNAME=linux;; \
*freebsd* ) OSNAME=freebsd;; \
*solaris* ) OSNAME=solaris;; \
esac; \
if test -f postinstall.$${OSNAME} ; then s=postinstall.$${OSNAME} ; else s=postinstall.generic; fi; \
echo POSTINSTALL "'$$s'"; cp $$s postinstall;

./preremove: $(SCRIPTS) Makefile
OSNAME=elf; case "elf" in *linux* ) OSNAME=linux;; esac; \
if test -f preremove.$${OSNAME} ; then s=preremove.$${OSNAME} ; else s=preremove.generic; fi; \
echo PREREMOVE "'$$s'"; cp $$s preremove;

./postremove: $(SCRIPTS) Makefile
OSNAME=elf; case "elf" in *linux* ) OSNAME=linux;; esac; \
if test -f postremove.$${OSNAME} ; then s=postremove.$${OSNAME} ; else s=postremove.generic; fi; \
echo POSTREMOVE "'$$s'"; cp $$s postremove;

# define default target
.PHONY: all warn TAGS clean uninstall install info dvi check \
tar send realclean mostlyclean distclean dist update ci cifiles $(ALLDIRS) \

MAKETARGET=all

###############################################################################
$(ALLDIRS):
if [ "$@" != po -o "$(USE_NLS)" != "no" ] ; then \
cd $@; $(MAKE) localedir=${LOCALEDIR} \
DESTDIR=$(DESTDIR) $(MAKETARGET) ; \
fi

TAGS clean::
-$(MAKE) MAKETARGET=$@ DESTDIR=$(DESTDIR) $(DIRS)

clean::
-rm -f header lpd.conf $(FILES) $(SCRIPTS) postinstall preremove postremove a.out
-rm -f *.bak ? ?.* core *.old *~ po/*~

#install: all
# $(MAKE) MAKETARGET=$@ DESTDIR=$(DESTDIR) $(INSTALLDIRS)
#
# if [ "${POSTINSTALL}" != "NO" -a "${POSTINSTALL}" != "no" ] ; then \
# MAKEINSTALL=YES DESTDIR=$(DESTDIR) $(SHELL) postinstall ; \
# fi;
# @echo "";

install: all
install -D src/lpd $(INSTALLDIR)/usr/sbin/lpd
$(STRIP) $(INSTALLDIR)/usr/sbin/lpd
$(eval $(call BuildPackage,LPRng))

romfs:
install -D src/lpd $(ROMFSDIR)/usr/sbin/lpd
$(STRIP) $(ROMFSDIR)/usr/sbin/lpd

info dvi check:

./lpd.conf: src/lpd.conf
cp src/lpd.conf $@
chmod 644 $@

src/lpd.conf:
cd src; $(MAKE) MAKETARGET=lpd.conf

realclean mostlyclean distclean: clean
rm -rf DISTRIBUTIONS/FreeBSD*/work DISTRIBUTIONS/FreeBSD*/*.tgz ;
$(MAKE) MAKETARGET=$@ DESTDIR=$(DESTDIR) $(ALLDIRS)
rm -f `find . -type f -name '*.old' -print` \
`find . -type f -name '*.bak' -print` \
`find . -type f -name '*.orig' -print` \
configure.lineno config.cache config.log config.status lpd.conf libtool \
Makefile */Makefile po/POTFILES
rm -f `find . -type f -name '*.in' -print | sed -e 's/\.in$$//' -e /configure/d `

###############################################################################
uninstall:
echo "you must uninstall by hand"

ci: cifiles
for i in $(ALLDIRS); do \
case $$i in \
po ) ;; \
* ) $(MAKE) MAKETARGET=$@ $$i ;; \
esac; \
done;
chmod 755 `find . -name install-sh -print`
chmod 755 `find . -name mkinstalldirs -print`

#CI=
#CO=-kv
CO=-l

cifiles:
for i in . $(ALLDIRS); do \
if test ! -d $$i/RCS ; then \
mkdir $$i/RCS; \
fi; \
done;
checkin() { \
(set +e; rcs -l $$1; exit 0); \
ci $(CI) -l -u -f -mUpdate -t-Initial $$1; \
}; \
for i in * */Makefile po/* ; do \
if test -f "$$i" ; then \
case "$$i" in \
*.mo ) ;; \
config.* ) ;; \
configure ) ;; \
* ) checkin $$i ;; \
esac; \
fi; \
done;

###############################################################################
# Update the patch level when you make a new version
# do this before you start changes
# Don't even think about making this configurable, it is for
# distribution and update purposes only!
# Patrick Powell
###############################################################################

update:
rm -f src/include/license.h src/include/copyright.h
sed -e 's/"/\\"/g' -e 's/.*/"&",/' LICENSE >src/include/license.h
sed -e 's/"/\\"/g' -e 's/.*/"&",/' COPYRIGHT >src/include/copyright.h
for i in VERSION ./src/include/patchlevel.h configure.in ; do \
rcs -l $$i; chmod +w $$i; \
done;
if [ -x /bin/pwd ] ; then DIR=`/bin/pwd`; fi ; \
if [ -x /usr/bin/pwd ] ; then DIR=`/usr/bin/pwd`; fi ; \
DIR=`echo $${DIR} | sed 's,.*/,,'`; \
DIRVER=` echo $${DIR} | sed 's,.*-,,'`; \
echo DIR $${DIR}, DIRVER $${DIRVER}; \
echo "#define PATCHLEVEL \"$${DIR}\"" >./src/include/patchlevel.h; \
echo $${DIR} >VERSION; \
S=`echo *.sh | sed -e 's/\.sh//g'`; \
perl -spi -e "s,=.*,=$${DIRVER}, if(/^VERSION=/ or /^#.* VERSION=/); \
s,^DISTNAME=.*,DISTNAME=$${DIR},; \
s,^PORTNAME=.*,PORTNAME=$(PACKAGE),; \
s,^PORTVERSION=.*,PORTVERSION=$${DIRVER},; \
s,package name \".*\",package name \"$${DIR}\",; \
s,^SCRIPTS=.*,SCRIPTS=$$S,;" \
configure.in lpd.perms.in \
DISTRIBUTIONS/*/Makefile \
po/Makefile.in.in printcap
perl -spi -e 's,.*,"Project-Id-Version: $(PACKAGE) $(VERSION)\\n", if(/^"Project-Id/);' \
po/*.po
sh CREATE_CONFIGURE
sh STANDARD_configuration
# ci $(CI) -l -f -mUpdate -t-Initial Makefile DOCS/Makefile src/Makefile
for i in DOCS man ; do \
(cd $$i ; $(MAKE) $@ ); \
done;
for i in po ; do \
(cd $$i ; $(MAKE) update-po ); \
done

###############################################################################
# Make a gnutar distribution
# - note that not all the source tree is sent out
#
###############################################################################

tar: distclean
rm -f */Makefile Makefile
chmod 755 `find . -name install-sh -print`
chmod 755 `find . -name mkinstalldirs -print`
chmod -R +w .
if [ -x /bin/pwd ] ; then DIR=`/bin/pwd`; fi ; \
if [ -x /usr/bin/pwd ] ; then DIR=`/usr/bin/pwd`; fi ; \
echo $${DIR}; \
DIR=`echo $${DIR} | sed 's,.*/,,'`; \
cd ..; \
tar '--exclude=RCS' -zcf $${DIR}.tgz $${DIR}; \
md5 $${DIR}.tgz | pgp -fast -u papowell@lprng > $${DIR}.tgz.md5
@echo ""

configure: configure.in
autoconf
autoheader

dist: update ci distclean tar send
redist: ci distclean tar send

send:
if [ -f ../SENDTO ] ; then (cd ..; sh SENDTO) ; fi
$(INSTALL_DIR) $(ROMFSDIR)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lpd $(ROMFSDIR)/usr/sbin/lpd
Loading

0 comments on commit be370d7

Please sign in to comment.