CURDIR=root ifneq ($(NOPREPOST),1) LOCAL_INSTALL=local_install LOCAL_POSTINSTALL=local_postinstall endif LOCAL_CLEAN=local_clean DIRS = utils misc translate dialog tlmp modapi xconf netconf \ userconf fstab diajava lib \ images diawxxt diawxgtk rpmfiles \ messages doc version: ./makeversion $(LINUXCONF_REV) $(BUILD_SVNVER) make all make -Ctlmp/tlmpnet build-protocol @echo done include rules.mak # preset info for gdebug dbg: dbgset -a. -b. -m/tmp/modules.dbg -r/tmp/ctrl.dbg -t/tmp/types.lst $(DIRS) typidx /tmp/types.lst /tmp/types.dbg ifeq ($(LINUXCONF_SUBREV),0) package-src: clean (cd ..; \ tar zcvf /x/xconf/linuxconf-$(PACKAGE_REV).src.tar.gz \ linuxconf-$(PACKAGE_REV)/. ) else package-src: clean (cd ..; \ ln -s linuxconf-$(LINUXCONF_REV) linuxconf-$(PACKAGE_REV) ; \ tar zcvf /x/xconf/linuxconf-$(PACKAGE_REV).src.tar.gz \ linuxconf-$(PACKAGE_REV)/. ; \ rm linuxconf-$(PACKAGE_REV) ) endif install.dir: mkdir -p $(RPM_BUILD_ROOT)/install $(BIN) $(SBIN) $(ETC) cp -R conf.files/install/. $(RPM_BUILD_ROOT)/install chmod +x $(RPM_BUILD_ROOT)/install/doinst.sh $(RPM_BUILD_ROOT)/install/uninstall_linuxconf.sh package: rm -fr /tmp/linuxconf-elf make NOPREPOST=1 RPM_BUILD_ROOT=/tmp/linuxconf-elf install.dir install package-elf package-nostrip: rm -fr /tmp/linuxconf-elf make NOPREPOST=1 RPM_BUILD_ROOT=/tmp/linuxconf-elf install.dir install package-elf # the tar must not contain conf.linuxconf because it will overwrite # the one in place after an upgrade. The install script will create it # anyway. package-elf: ( \ cd $(RPM_BUILD_ROOT)/ && \ tar zcvf /tmp/linuxconf-$(PACKAGE_REV).bin-$(BINFORM).tar.gz \ bin/linuxconf bin/remadmin \ usr/X11R6/bin/wxxt-linuxconf usr/lib/linuxconf \ install \ ) ANNOUNCE: ANNOUNCE.txt translate/sgml2flat @translate/sgml2flat $< $@ @rm -f $< ANNOUNCE*.html translate/sgml2flat: translate/sgml2flat.cc make -C translate sgml2flat clean_install: rm -fr $(LIB_LINUXCONF) local_install: @mkdir -p $(BIN) $(SBIN) $(ETC) local_postinstall: install.dir @echo Checking RC scripts @sh /install/doinst.sh install_for_rpm: clean_install mkdir -p $(BIN) $(SBIN) $(ETC) make NOPREPOST=1 install rm -fr $(LIB_LINUXCONF)/std rm -fr $(LIB_LINUXCONF)/debian mkdir $(LIB_LINUXCONF)/uninstall test -f $(ETC)/conf.linuxconf || touch $(ETC)/conf.linuxconf local_clean: rm -f `find . -name \*.bak -o -name DEADJOE -o -name \*~ -o -name core` publish-dropin: rm -fr /n/solucor/home/ftp/pub/linuxconf/dropins/redhat mkdir -p /n/solucor/home/ftp/pub/linuxconf/dropins/redhat (cd / \ && tar zcvf /n/solucor/home/ftp/pub/linuxconf/dropins/redhat/smb-dropin.tar.gz etc/linuxconf/control/smb \ && tar zcvf /n/solucor/home/ftp/pub/linuxconf/dropins/redhat/httpd-dropin.tar.gz etc/linuxconf/control/httpd \ ) RPMTOPDIR=$(HOME)/rpmbuild RPM=rpmbuild buildrpm: ./makeversion $(LINUXCONF_REV) make buildrpm0 buildrpm0: buildspec buildsrc (unset LD_PRELOAD ; cd $(RPMTOPDIR)/SPECS && \ $(RPM) -ba linuxconf-$(PACKAGE_REV).spec | tee /tmp/rpm.log) buildrpmall: buildspecall buildsrc (unset LD_PRELOAD ; cd $(RPMTOPDIR)/SPECS && \ $(RPM) -vv -ba linuxconf-$(PACKAGE_REV).spec | tee /tmp/rpm.log) buildmyrpm: $(MAKE) RPM=myrpm RPMTOPDIR=/tmp/myrpm buildrpm buildmyspec: $(MAKE) RPM=myrpm RPMTOPDIR=/tmp/myrpm buildspec buildsrc build6.2: buildmyspec mv /tmp/myrpm/SOURCES/linuxconf-$(PACKAGE_REV).src.tar.gz \ /rh6.2/usr/src/redhat/SOURCES mv /tmp/myrpm/SPECS/linuxconf-$(PACKAGE_REV).spec /rh6.2/tmp buildspec: @rpmfiles/buildspec.sh $(PACKAGE_REV) $(RPMTOPDIR) $(RPMREV) buildspecall: @ALL_SECTIONS=1 rpmfiles/buildspec.sh $(PACKAGE_REV) $(RPMTOPDIR) $(RPMREV) PKGDIR=$(RPMTOPDIR)/SOURCES/linuxconf-$(PACKAGE_REV) buildsrc: rm -f main/linuxconf rm -fr $(PKGDIR) mkdir $(PKGDIR) find . ! -type d -a ! -name \*.o -a ! -name \*.os -a ! -name \*.a \ -a ! -name \*.bak -a ! -name \*.old \ -a ! -name \*.rej -a ! -name \*.orig \ | fgrep -v .svn/ \ | tar cf - --files-from - \ | dd bs=4000k \ | (cd $(PKGDIR) && tar xf -) (cd $(PKGDIR) && make clean && \ cd .. && \ tar zcf $(PKGDIR).src.tar.gz linuxconf-$(PACKAGE_REV)) rm -fr $(PKGDIR) install-helpwww: mkdir -p $(WWWBASE)/linuxconf/help.files rm -fr $(WWWBASE)/linuxconf/help.files/* clean-newver: rm -f askrunlevel/askrunlevel.o misc/module.o main/main.obt rm -f misc/linuxconf.o misc/linuxconf.os main/linuxconf.o make -C misc make -C askrunlevel make -C main HEADLIST=dialog/dialog.h dialog/dialog.p dialog/dialog_def.h \ dialog/private_msg.h \ misc/dictionary.h \ misc/misc.h misc/sstring.h misc/configf.h misc/fviews.h misc/confdb.h \ misc/misc.p misc/module.h misc/popen.h misc/sstream.h \ misc/subsys.h misc/context.h misc/module_api.h \ netconf/daemoni.h translate/translat.h \ userconf/userconf.h userconf/userconf.p userconf/usercomng.h \ modapi/modapi.h modapi/modapi_def.h \ dialog/dialog.pe netconf/netconf.pe netconf/netconf_def.h \ dialog/modregister.h dialog/cmdsock.h \ fstab/fstab.h fstab/fstab.p diajava/proto.h diajava/protorev.h \ diajava/diajava.h diajava/diajava.p \ tlmp/tlmpdia/tlmpdia.h tlmp/tlmpdia/tlmpdia.p \ tlmp/tlmplib/tlmplib.h tlmp/tlmplib/tlmplib.p \ tlmp/tlmpmod/tlmpmod.h tlmp/tlmpmod/tlmpmod.p \ tlmp/tlmpnet/tlmpnet.h tlmp/tlmpnet/tlmpnet.p install-devel: rm -fr $(INCLUDE)/linuxconf mkdir -p $(INCLUDE)/linuxconf cp $(HEADLIST) $(INCLUDE)/linuxconf rm -fr $(USRLIB)/liblinuxconf.a $(USRLIB)/linuxconf-devel rm -f $(USRLIB)/liblinuxconf.a ar cr $(USRLIB)/liblinuxconf.a misc/*.o dialog/*.o \ diajava/diajava.o diajava/_dict.o modapi/modapi.o modapi/internal.o \ tlmp/tlmpdia/*.o tlmp/tlmplib/*.o \ translate/translat.o translate/notload.o (cd messages && ./install-devel.sh $(USRLIB)/linuxconf-devel) cp translate/msgcomp translate/msgscan \ translate/msgclean translate/msgupd \ $(USRLIB)/linuxconf-devel/ cp -a builder/templates $(USRLIB)/linuxconf-devel/. cp -a builder/module.rpmspec $(USRLIB)/linuxconf-devel/. cp -a builder/filterspec.sh $(USRLIB)/linuxconf-devel/. cp -a builder/ccrules.mak $(USRLIB)/linuxconf-devel/. sed s/XXXLINUXCONFREVXXX/$(LINUXCONF_REV)/ builder/rules.mak \ | sed s/XXXLINUXCONFSUBREVXXX/$(LINUXCONF_SUBREV)/ \ | sed s/XXXLINUXCONFSUBSUBREVXXX/$(LINUXCONF_SUBSUBREV)/ \ > $(USRLIB)/linuxconf-devel/rules.mak cp -a builder/syncmsg.sh $(USRLIB)/linuxconf-devel/. cp -a builder/install_helps.sh $(USRLIB)/linuxconf-devel/. cp -a tlmp/tlmpnet/build-protocol $(USRBIN)/build-protocol install-lib: make -C lib rm -fr $(USRLIB)/linuxconf-lib mkdir -p $(USRLIB)/linuxconf-lib/help.eng cp $(LIB_LINUXCONF)/help.eng/linuxconf*.eng $(USRLIB)/linuxconf-lib/help.eng mkdir -p $(USRLIB)/linuxconf-lib/help.fr cp $(LIB_LINUXCONF)/help.fr/linuxconf*.fr $(USRLIB)/linuxconf-lib/help.fr install -m755 lib/liblinuxconf.so.$(PACKAGE_REV) $(USRLIB)/liblinuxconf.so.$(PACKAGE_REV) ln -sf liblinuxconf.so.$(PACKAGE_REV) $(USRLIB)/liblinuxconf.so.$(LIB_REV) ln -sf liblinuxconf.so.$(PACKAGE_REV) $(USRLIB)/liblinuxconf.so publish_doc: make -C misc doc make -C dialog doc make -C userconf doc make -C doc doc local_doc: make WWWBASE=$(HOME)/n/html/linuxconf/ publish_doc all-index: make -C misc index make -C dialog index make -C netconf index make -C userconf index # Apply "make msg" in all directory with a *.m file all-msg: for f in `find . -name \*.m`; do make -C `dirname $$f` msg; done debug.make: @echo LD_FILE=$(LD_FILE) @echo CRYPTLIB=$(CRYPTLIB) @echo PAMLIB=$(PAMLIB) @echo HAS_PAM=$(HAS_PAM) @echo USRX11LIB=$(USRX11LIB) @echo GPP=$(GPP) @echo GPPLINK=$(GPPLINK)