IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1001


Ignore:
Timestamp:
Jun 11, 2004, 9:18:41 AM (22 years ago)
Author:
desonia
Message:

moved the .d files into a build directory.

Location:
trunk/psLib/test
Files:
26 added
25 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataManip/Makefile

    r987 r1001  
    33##  Makefile:   test/sysUtils
    44##
    5 ##  $Revision: 1.10 $  $Name: not supported by cvs2svn $
    6 ##  $Date: 2004-06-10 20:52:14 $
     5##  $Revision: 1.11 $  $Name: not supported by cvs2svn $
     6##  $Date: 2004-06-11 19:18:41 $
    77##
    88##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4242 tst_psImageIO
    4343
    44 OBJS = $(addsuffix .o,$(TARGET))
     44DEPENDENCIES = $(addprefix builddir/,$(addsuffix .d,$(TARGET)))
     45OBJS = $(addprefix builddir/,$(addsuffix .o,$(TARGET)))
    4546
    46 all: $(TARGET)
     47all: builddir $(TARGET)
    4748
    48 include $(OBJS:.o=.d)
     49builddir:
     50        mkdir builddir
     51
     52include $(DEPENDENCIES)
    4953
    5054clean:
    5155        @echo "    Deleting executable and binary files for 'test/sysUtils'"
    52         $(RM) $(TARGET) *.o *.lint
     56        $(RM) $(TARGET) $(OBJS) *.lint
    5357
    54 %.o : %.c
     58builddir/%.o : %.c
    5559        $(CC) $(CFLAGS) $(CPPFLAGS) -I.. -I$(PSLIB_INCL_DIR) -c -o $@ $<
    5660
    57 %   : %.o
     61%   : builddir/%.o
    5862        $(CC) -o $@ $< -L$(PSLIB_LIB_DIR) -lpslib -lpstest -lgsl -lgslcblas $(LDFLAGS)
    5963
     
    6468        splint +posixlib -exportlocal -realcompare $(INCLUDE_GLOBAL) $? > $@; cat $@
    6569
    66 %.d: %.c
     70builddir/%.d: %.c
    6771        $(CC) -MM $(CFLAGS) -I$(PSLIB_INCL_DIR) $< > $@.tmp
    68         sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' $@.tmp > $@
     72        sed 's|\($*\)\.o[ :]*|builddir\/\1.o $@ : |g' $@.tmp > $@
    6973        $(RM) -f $@.tmp
    7074
  • trunk/psLib/test/image/tst_psImageIO.c

    r999 r1001  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-06-11 18:50:49 $
     8 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-06-11 19:18:41 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1616#include <string.h>
    1717#include <stdlib.h>
     18#include <sys/stat.h>
     19#include <sys/types.h>
    1820
    1921#include "psTest.h"
     
    172174
    173175    #define testReadType(TYP,filename) \
    174     testReadTypeSize(1,1,0,0,1,1,TYP,"1x1_" filename); \
    175     testReadTypeSize(M,1,M/4,0,M/2,1,TYP,"Mx1_" filename); \
    176     testReadTypeSize(1,N,0,N/4,1,N/2,TYP,"1xN_" filename); \
    177     testReadTypeSize(M,N,M/4,N/4,M/2,N/2,TYP,"MxN_" filename);
     176    mkdir("tmpImages",0777); \
     177    testReadTypeSize(1,1,0,0,1,1,TYP,"tmpImages/1x1_" filename); \
     178    testReadTypeSize(M,1,M/4,0,M/2,1,TYP,"tmpImages/Mx1_" filename); \
     179    testReadTypeSize(1,N,0,N/4,1,N/2,TYP,"tmpImages/1xN_" filename); \
     180    testReadTypeSize(M,N,M/4,N/4,M/2,N/2,TYP,"tmpImages/MxN_" filename);
    178181
    179182    testReadType(U8,"U8.fits");
     
    222225
    223226    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error as extnum is invalid.");
    224     image = psImageReadSection(image,0,0,M,N,0,NULL,4,"MxN_F32.fits");
     227    image = psImageReadSection(image,0,0,M,N,0,NULL,4,"tmpImages/MxN_F32.fits");
    225228    if (image != NULL) {
    226229        psError(__func__,"Image returned though extnum was invalid.");
     
    228231    }
    229232    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error as extname is invalid.");
    230     image = psImageReadSection(image,0,0,M,N,0,"bogus",0,"MxN_F32.fits");
     233    image = psImageReadSection(image,0,0,M,N,0,"bogus",0,"tmpImages/MxN_F32.fits");
    231234    if (image != NULL) {
    232235        psError(__func__,"Image returned though extnum was invalid.");
     
    288291    GENIMAGE(img,m,n,F32,0);
    289292    GENIMAGE(img2,m,n,F32,row+2*col);
     293    mkdir("tmpImages",0777);
    290294    remove
    291295        ("writeTest.fits");
    292     if (psImageWriteSection(img,0,0,0,NULL,0,"writeTest.fits") != 0) {
     296    if (psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits") != 0) {
    293297        psError(__func__,"Couldn't write writeTest.fits.");
    294298        return 14;
    295299    }
    296     if (psImageWriteSection(img2,0,0,0,NULL,0,"writeTest.fits") != 0) {
     300    if (psImageWriteSection(img2,0,0,0,NULL,0,"tmpImages/writeTest.fits") != 0) {
    297301        psError(__func__,"Couldn't overwrite writeTest.fits.");
    298302        return 15;
     
    302306
    303307    // Did it really overwrite the pixel values?  Let's read it in and see.
    304     img = psImageReadSection(NULL,0,0,m,n,0,NULL,0,"writeTest.fits");
     308    img = psImageReadSection(NULL,0,0,m,n,0,NULL,0,"tmpImages/writeTest.fits");
    305309    if (img == NULL) {
    306310        psError(__func__,"Could not read in writeTest.fits.");
Note: See TracChangeset for help on using the changeset viewer.